CANopen Slave Documentation
Version 6.16.04
Loading...
Searching...
No Matches
cos_sync.h File Reference

Detailed Description

The Synchronisation Object is broadcasted periodically by the SYNC producer. This SYNC provides the basic network clock. The time period between the SYNCs is specified by the standard parameter communication cycle period (Object 1006h: Communication Cycle Period), which may be written by a configuration tool to the application devices during the boot-up process. There can be a time jitter in transmission by the SYNC producer corresponding approximately to the latency due to some other message being transmitted just before the SYNC. In order to guarantee timely access to the CAN bus the SYNC is given a very high priority identifier (Object 1005h). Devices which operate synchronously may use the SYNC object to synchronise their own timing with that of the Synchronisation Object producer. The details of this synchronisation are device dependent.

+ Include dependency graph for cos_sync.h:

Functions

void CosSyncEventRcvPdo (void)
 
void CosSyncSetProducer (uint16_t uwTimeV)
 

Function Documentation

◆ CosSyncEventRcvPdo()

void CosSyncEventRcvPdo ( void  )

Handle RPDOs on SYNC reception.

This function is called upon reception of a SYNC message when the device is operational and the device has Receive PDOs. Please note that Receive PDOs do not have a SYNC counter feature, they are updated on every reception of the SYNC message.

◆ CosSyncSetProducer()

void CosSyncSetProducer ( uint16_t  uwTimeV)
Parameters
[in]uwTimeVSYNC producer time in milli-seconds

This function allows to enable or disable a SYNC producer by the application. Using a value > 0 for uwTimeV enables the SYNC producer, a value of 0 switches the service to SYNC consumer. The value for uwTimeV is given in multiples of 1 milli-second.

The function has impact on the values of objects 1005h and 1006h and will modify the current setting.

Please refer to the description of CosMgrOnStart() for a code example.