Page 1 of 1

Problem using time in microseconds

Posted: Sat Sep 13, 2014 7:39 am
by nikhil
Hello,

I want to use chThdSleepMicrosecond function. I have set CH_FREQUENCY to 1000000. But code hangs when call above function. Same code works fine when I call chThdSleepMilliseconds. Am I missing something? I am using chibios 2.6.5 with stm32f4.


--
Nikhil

Re: Problem using time in microseconds

Posted: Sat Sep 13, 2014 7:43 am
by Giovanni
Hi,

There is a limit to the resolution you can get, the CPU is not able to serve 1000000 interrupts per second. See the GPT driver if you need higher resolutions. You may also use halPolledDelay().

Giovanni