Page 2 of 2

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

Posted: Fri Oct 28, 2016 9:18 pm
by jonesrayan
Hinthanks for this detailed answer, polled delay function you mean the oroginal funcion of arduino like delaymicroseconds() ??

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

Posted: Sat Oct 29, 2016 7:30 am
by jonesrayan
what do you mean by polled delay function ??.

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

Posted: Sat Oct 29, 2016 7:41 am
by Giovanni
jonesrayan wrote:Hinthanks for this detailed answer, polled delay function you mean the oroginal funcion of arduino like delaymicroseconds() ??


yes

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

Posted: Sat Oct 29, 2016 9:40 am
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

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

Posted: Sat Oct 29, 2016 12:14 pm
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