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 !!!!

Postby jonesrayan » Fri Oct 28, 2016 9:18 pm

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 !!!!

Postby jonesrayan » Sat Oct 29, 2016 7:30 am

what do you mean by polled delay function ??.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

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

Postby Giovanni » Sat Oct 29, 2016 7:41 am

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 !!!!

Postby jonesrayan » Sat Oct 29, 2016 9:40 am

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

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

Postby Giovanni » Sat Oct 29, 2016 12:14 pm

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


Return to “ChibiOS/RT”

Who is online

Users browsing this forum: No registered users and 10 guests