AnsweredAssumed Answered

Bug report: _time_delay() not the good delay.

Question asked by arnogir on Jan 13, 2015
Latest reply on Jan 13, 2015 by arnogir



I made some test because task period seem to me so long..


Then I with test MQX 4.1 and only one task:



 /*Port initialization */

 for (;;)
   /* Toggle led */
   /* ****** Here instruction which toggle Led ****/




Then I measured the SIgnal on the Led and measure the period for different value of "X" passed in _time_delay();.


X= 1   measured time = 10ms
X= 5   measured time = 10ms

X= 10   measured time = 15ms

X = 12   measured time = 20ms

X = 100   measured time = 105ms.


For information, BSP_ALARM_FREQUENCY  = 200   (5ms)


Then, the time is always delayed by 5ms. (When asked time is a multiple of BSP_ALARM_FREQUENCY)


What do you think of this? How can I make _time_delay exactly the asked time?