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
Problem using time in microseconds
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Problem using time in microseconds
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
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