nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: CanFestival events scheduling nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210:

nico@210: CanFestival events scheduling nico@210:

nico@210: A CanOpen node must be able to take delayed actions. nico@210: nico@210:

nico@210: As exemples, periodic sync emission, heartbeat production or SDO timeout nico@210: need to set some alarms that will be called later and do the job. nico@210: nico@210:

nico@210: µC generaly do not have enough free timers to handle all the nico@210: CanOpen needs directly. Moreover, CanFestival internal data may be nico@210: corrupt by reentrant calls. nico@210: nico@210:

nico@210: CanFestival implement a micro-scheduler (timer.c). It uses only one nico@210: timer to mimic many timers. It manage an alarm table, and call alarms nico@210: at desired time. nico@210: nico@210:

nico@210:

nico@210: Image 100000000000022C000000DEDAD2140C nico@210: nico@210:
nico@210: nico@210:

nico@210: Scheduler can handle short clock value ranges limitation found on some nico@210: µC. As an example, value range for a 16bit clock counter with nico@210: 4µs tick is crossed within 0.26 seconds... Long alarms must be nico@210: segmented. nico@210: nico@210:

nico@210: Chronogram illustrate a long alarm (A) and a short periodic alarm (B), nico@210: with a A value > clock range > B value. nico@210: Values t0...t8 are successive setTimer call parameter values. t1 nico@210: illustrates an intermediate call to TimeDispatch, caused by a delay nico@210: longer than clock range. Because of long alarm segmentation, at the end nico@210: of t1, TimeDispatch call will not trig any alarm callback. nico@210: nico@210:

nico@210:

nico@210: Image 1000000000000396000000FFC42573DA nico@210: nico@210:
nico@210: nico@210:

nico@210: nico@210:

nico@210: nico@210:
nico@210: epimerde nico@211: 2007-06-06 nico@210:
nico@210: nico@210: