chVTGetSystemTime() restarts every 4s !!!!

Discussions and support about ChibiOS/RT, the free embedded RTOS.
jonesrayan
Posts: 16
Joined: Sat Oct 01, 2016 5:07 pm

Re: chVTGetSystemTime() restarts every 4s !!!!

Post by jonesrayan »

Hinthanks for this detailed answer, polled delay function you mean the oroginal funcion of arduino like delaymicroseconds() ??
jonesrayan
Posts: 16
Joined: Sat Oct 01, 2016 5:07 pm

Re: chVTGetSystemTime() restarts every 4s !!!!

Post by jonesrayan »

what do you mean by polled delay function ??.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: chVTGetSystemTime() restarts every 4s !!!!

Post by Giovanni »

jonesrayan wrote:Hinthanks for this detailed answer, polled delay function you mean the oroginal funcion of arduino like delaymicroseconds() ??


yes
jonesrayan
Posts: 16
Joined: Sat Oct 01, 2016 5:07 pm

Re: chVTGetSystemTime() restarts every 4s !!!!

Post by jonesrayan »

And it does'nt effect the performance of chibios ?? if i put a delaymicroseconds() in a thead ?.
i need those information because i"m building a quadcopter :) so i have to know what danger and what's safe
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: chVTGetSystemTime() restarts every 4s !!!!

Post by Giovanni »

Of course it does affect the performance, that function wastes time into a loop. Your other option is to use hardware timers to generate those output signals.

You would be served better by an MCU with hardware PWMs.

Giovanni
Post Reply