Merge 9c71bbd4fe into 9b8beed836
This commit is contained in:
commit
4e85825159
14 changed files with 24 additions and 24 deletions
|
|
@ -63,7 +63,7 @@ typedef enum {
|
|||
CO_HBconsumer_UNCONFIGURED = 0x00U, /**< Consumer entry inactive */
|
||||
CO_HBconsumer_UNKNOWN = 0x01U, /**< Consumer enabled, but no heartbeat received yet */
|
||||
CO_HBconsumer_ACTIVE = 0x02U, /**< Heartbeat received within set time */
|
||||
CO_HBconsumer_TIMEOUT = 0x03U, /**< No heatbeat received for set time */
|
||||
CO_HBconsumer_TIMEOUT = 0x03U, /**< No heartbeat received for set time */
|
||||
} CO_HBconsumer_state_t;
|
||||
|
||||
/**
|
||||
|
|
@ -104,7 +104,7 @@ typedef struct {
|
|||
/**
|
||||
* Heartbeat consumer object.
|
||||
*
|
||||
* Object is initilaized by CO_HBconsumer_init(). It contains an array of CO_HBconsNode_t objects.
|
||||
* Object is initialized by CO_HBconsumer_init(). It contains an array of CO_HBconsNode_t objects.
|
||||
*/
|
||||
typedef struct {
|
||||
CO_EM_t* em; /**< From CO_HBconsumer_init() */
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ extern "C" {
|
|||
* @{
|
||||
* Process data objects are used for real-time data transfer with no protocol overhead.
|
||||
*
|
||||
* TPDO with specific identifier is transmitted by one device and recieved by zero or more devices as RPDO. PDO
|
||||
* TPDO with specific identifier is transmitted by one device and received by zero or more devices as RPDO. PDO
|
||||
* communication parameters(COB-ID, transmission type, etc.) are in the Object Dictionary at index 0x1400+ and 0x1800+.
|
||||
* PDO mapping parameters (size and contents of the PDO) are in the Object Dictionary at index 0x1600+ and 0x1A00+.
|
||||
*
|
||||
|
|
@ -113,7 +113,7 @@ extern "C" {
|
|||
#define CO_PDO_MAX_MAPPED_ENTRIES 8U
|
||||
#endif
|
||||
|
||||
/** Number of CANopen RPDO objects, which uses default CAN indentifiers. By default first four RPDOs have pre-defined
|
||||
/** Number of CANopen RPDO objects, which uses default CAN identifiers. By default first four RPDOs have pre-defined
|
||||
* CAN identifiers, which depends on node-id. This constant may be set to 0 to disable functionality or set to any other
|
||||
* value. For example, if there are several logical devices inside single CANopen device, then more than four RPDOs may
|
||||
* have pre-defined CAN identifiers. In that case RPDO5 has CAN_ID=0x200+NodeId+1, RPDO6 has CAN_ID=0x300+NodeId+1,
|
||||
|
|
@ -122,7 +122,7 @@ extern "C" {
|
|||
#define CO_RPDO_DEFAULT_CANID_COUNT 4U
|
||||
#endif
|
||||
|
||||
/** Number of CANopen TPDO objects, which uses default CAN indentifiers. If value is more than four, then pre-defined
|
||||
/** Number of CANopen TPDO objects, which uses default CAN identifiers. If value is more than four, then pre-defined
|
||||
* pre-defined CAN identifiers are: TPDO5 has CAN_ID=0x180+NodeId+1, TPDO6 has CAN_ID=0x280+NodeId+1, TPDO9 has
|
||||
* CAN_ID=0x180+NodeId+2 and so on. For description see @ref CO_RPDO_DEFAULT_CANID_COUNT. */
|
||||
#ifndef CO_TPDO_DEFAULT_CANID_COUNT
|
||||
|
|
|
|||
|
|
@ -386,12 +386,12 @@ reverseBytes(void* start, OD_size_t size) {
|
|||
|
||||
#if ((CO_CONFIG_SDO_SRV)&CO_CONFIG_SDO_SRV_SEGMENTED) != 0
|
||||
/* Helper function for writing data to Object dictionary. Function swaps data if necessary,
|
||||
* calcualtes (and verifies CRC) writes data to OD and verifies data lengths.
|
||||
* calculates (and verifies CRC) writes data to OD and verifies data lengths.
|
||||
*
|
||||
* @param SDO SDO server
|
||||
* @param [out] abortCode SDO abort code in case of error
|
||||
* @param crcOperation 0=none, 1=calculate, 2=calculate and compare
|
||||
* @parma crcClient crc checksum to campare with
|
||||
* @param crcClient crc checksum to compare with
|
||||
*
|
||||
* Returns true on success, otherwise write also abortCode and sets state to CO_SDO_ST_ABORT */
|
||||
static bool_t
|
||||
|
|
@ -498,11 +498,11 @@ validateAndWriteToOD(CO_SDOserver_t* SDO, CO_SDO_abortCode_t* abortCode, uint8_t
|
|||
return true;
|
||||
}
|
||||
|
||||
/* Helper function for reading data from Object dictionary. Function also swaps data if necessary and calcualtes CRC.
|
||||
/* Helper function for reading data from Object dictionary. Function also swaps data if necessary and calculates CRC.
|
||||
*
|
||||
* @param SDO SDO server
|
||||
* @param [out] abortCode SDO abort code in case of error
|
||||
* @parma countMinimum if data size in buffer is less than countMinimum, then buffer is refilled from OD variable
|
||||
* @param countMinimum if data size in buffer is less than countMinimum, then buffer is refilled from OD variable
|
||||
* @param calculateCrc if true, crc is calculated
|
||||
*
|
||||
* Returns true on success, otherwise write also abortCode and sets state to CO_SDO_ST_ABORT */
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ typedef enum {
|
|||
* 0 < blksize < 128.
|
||||
* - byte 3..7: Reserved.
|
||||
* - SDO server waits for response.
|
||||
* - If c was set to 1 and all segments were successfull received, then communication enters SDO block upload end
|
||||
* - If c was set to 1 and all segments were successful received, then communication enters SDO block upload end
|
||||
* phase. */
|
||||
CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_CRSP = 0x65U,
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -48,14 +48,14 @@ extern "C" {
|
|||
*
|
||||
* SYNC message is used for synchronization of the nodes on network. One node can be SYNC producer, others can be SYNC
|
||||
* consumers. Synchronous TPDOs are transmitted after the CANopen SYNC message. Synchronous received PDOs are
|
||||
* accepted(copied to OD) immediatelly after the reception of the next SYNC message.
|
||||
* accepted(copied to OD) immediately after the reception of the next SYNC message.
|
||||
*
|
||||
* ####Contents of SYNC message
|
||||
* By default SYNC message has no data. If _Synchronous counter overflow value_ from Object dictionary (index 0x1019) is
|
||||
* different than 0, SYNC message has one data byte: _counter_ incremented by 1 with every SYNC transmission.
|
||||
*
|
||||
* ####SYNC in CANopenNode
|
||||
* According to CANopen, synchronous RPDOs must be processed after reception of the next sync messsage. For that reason,
|
||||
* According to CANopen, synchronous RPDOs must be processed after reception of the next sync message. For that reason,
|
||||
* there is a double receive buffer for each synchronous RPDO. At the moment, when SYNC is received or transmitted,
|
||||
* internal variable CANrxToggle toggles. That variable is then used by synchronous RPDO to determine, which of the two
|
||||
* buffers is used for RPDO reception and which for RPDO processing.
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ bool_t CO_fifo_trimSpaces(CO_fifo_t* fifo, bool_t* insideComment);
|
|||
* Get token from FIFO buffer
|
||||
*
|
||||
* Function search FIFO buffer for token. Token is string of only graphical characters. Graphical character is any
|
||||
* printable character except space with acsii code within limits: 0x20 < code < 0x7F (see isgraph() function).
|
||||
* printable character except space with ascii code within limits: 0x20 < code < 0x7F (see isgraph() function).
|
||||
*
|
||||
* If token is found, then copy it to the buf, if count is large enough. On success also set readPtr to point to the
|
||||
* next graphical character.
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ CO_ReturnError_t CO_SRDO_config(CO_SRDO_t* SRDO, uint8_t SRDO_Index, CO_SRDOGuar
|
|||
/**
|
||||
* Send SRDO on event
|
||||
*
|
||||
* Sends SRDO before the next refresh timer tiggers. The message itself is send in CO_SRDO_process(). Note that RTOS
|
||||
* Sends SRDO before the next refresh timer triggers. The message itself is send in CO_SRDO_process(). Note that RTOS
|
||||
* have to trigger its processing quickly. After the transmission the timer is reset to the full refresh time.
|
||||
*
|
||||
* @param SRDO This object.
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ CO_LSSmaster_IdentifyFastscan(CO_LSSmaster_t* LSSmaster, uint32_t timeDifference
|
|||
case CO_LSSmaster_FS_STATE_SCAN:
|
||||
ret = CO_LSSmaster_FsScanWait(LSSmaster, timeDifference_us, fastscan->scan[LSSmaster->fsLssSub]);
|
||||
if (ret == CO_LSSmaster_SCAN_FINISHED) {
|
||||
/* scanning finished, initiate verifcation. The verification message also contains
|
||||
/* scanning finished, initiate verification. The verification message also contains
|
||||
* the node state machine "switch to next state" request */
|
||||
next = CO_LSSmaster_FsSearchNext(LSSmaster, fastscan);
|
||||
ret = CO_LSSmaster_FsVerifyInitiate(LSSmaster, timeDifference_us, fastscan->scan[LSSmaster->fsLssSub],
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ extern "C" {
|
|||
* - Activate bit timing parameters
|
||||
* - Store configuration
|
||||
*
|
||||
* The LSS master is initalized during the CANopenNode initialization process. Except for enabling the LSS master in the
|
||||
* The LSS master is initialized during the CANopenNode initialization process. Except for enabling the LSS master in the
|
||||
* configurator, no further run-time configuration is needed for basic operation. The LSS master does basic checking of
|
||||
* commands and command sequence.
|
||||
*
|
||||
|
|
@ -331,7 +331,7 @@ typedef struct {
|
|||
*
|
||||
* This initiates searching for a unconfigured node by the means of LSS fastscan mechanism. When this function is
|
||||
* finished
|
||||
* - a (more or less) arbitrary node is selected and ready for node ID assingment
|
||||
* - a (more or less) arbitrary node is selected and ready for node ID assignment
|
||||
* - no node is selected because the given criteria do not match a node
|
||||
* - no node is selected because all nodes are already configured
|
||||
*
|
||||
|
|
@ -356,7 +356,7 @@ fastscan.scan[CO_LSS_FASTSCAN_REV] = CO_LSSmaster_FS_SKIP;
|
|||
fastscan.scan[CO_LSS_FASTSCAN_SERIAL] = CO_LSSmaster_FS_SCAN;
|
||||
* \endcode
|
||||
*
|
||||
* This example will take 2 scan cyles for verifying vendor ID and product code and 33 scan cycles to find the serial
|
||||
* This example will take 2 scan cycles for verifying vendor ID and product code and 33 scan cycles to find the serial
|
||||
* number.
|
||||
*
|
||||
* For scanning, the following limitations apply:
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ PIC32, dsPIC30, dsPIC33
|
|||
* Features: OD storage for PIC32, SDO client demo for PIC32, error counters
|
||||
* Development tools: MPLAB X
|
||||
* Demo hardware: Explorer 16 from Microchip, [Max32 board](https://reference.digilentinc.com/reference/microprocessor/max32/start)
|
||||
* Example with smallest resuorces (less than 2kb RAM), 4TPDO+4RPDO: 16-bit dsPIC30F4011
|
||||
* Example with smallest resources (less than 2kb RAM), 4TPDO+4RPDO: 16-bit dsPIC30F4011
|
||||
|
||||
|
||||
[Analog Devices Inc](https://www.analog.com): MAX32662, MAX32690
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Trace usage
|
|||
**TRACE DOES NOT WORK IN THE LAST VERSION**
|
||||
|
||||
CANopenNode includes optional trace functionality (non-standard). It monitors
|
||||
choosen variables from Object Dictionary. On change of state of variable it
|
||||
chosen variables from Object Dictionary. On change of state of variable it
|
||||
makes a record with timestamp into circular buffer. String with points can later
|
||||
be read via SDO.
|
||||
|
||||
|
|
@ -39,6 +39,6 @@ case CANopenSocket must first receive PDO data from remote node(s) and store it
|
|||
to the local Object Dictionary variable. CANopenSocket's trace then monitors
|
||||
that variable. Text buffer is then read with the similar command as above. But
|
||||
local SDO data access from CANopenSocket itself doesn't occupy CAN bus, so large
|
||||
data is transfered realy fast. Besides that, Linux machine has much more RAM to
|
||||
data is transferred really fast. Besides that, Linux machine has much more RAM to
|
||||
store the monitored data. Except timestamp is less accurate.
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ Communication Specific Parameters
|
|||
* Sub Index 0: Contains number of actual errors. 0 can be written to clear error history.
|
||||
* sub-index 1 and above:
|
||||
* bit 16-31: Manufacturer specific additional information
|
||||
* bit 0-15: Error code as transmited in the Emergency object
|
||||
* bit 0-15: Error code as transmitted in the Emergency object
|
||||
|
||||
### 0x1005 - COB-ID SYNC message
|
||||
| Object Type | Count Label | Storage Group |
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@
|
|||
<description lang="en">* Sub Index 0: Contains number of actual errors. 0 can be written to clear error history.
|
||||
* sub-index 1 and above:
|
||||
* bit 16-31: Manufacturer specific additional information
|
||||
* bit 0-15: Error code as transmited in the Emergency object</description>
|
||||
* bit 0-15: Error code as transmitted in the Emergency object</description>
|
||||
<q1:dataTypeIDRef uniqueIDRef="UID_ARR_1003" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100300" access="readWrite">
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ bool_t CO_eeprom_init(void* storageModule);
|
|||
* @param len Length of data, which will be stored to that location
|
||||
* @param [out] overflow set to true, if not enough eeprom memory
|
||||
*
|
||||
* @return Asigned eeprom address
|
||||
* @return Assigned eeprom address
|
||||
*/
|
||||
size_t CO_eeprom_getAddr(void* storageModule, bool_t isAuto, size_t len, bool_t* overflow);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue