Search found 57 matches

by 0x3333
Sat Mar 09, 2019 11:19 pm
Forum: ChibiOS/RT
Topic: chVTGetSystemTimeX overflow
Replies: 11
Views: 705

Re: chVTGetSystemTimeX overflow

Will this be upstreamed or should I work with a local patch? Thanks again.
by 0x3333
Sat Mar 09, 2019 9:43 pm
Forum: ChibiOS/RT
Topic: chVTGetSystemTimeX overflow
Replies: 11
Views: 705

Re: chVTGetSystemTimeX overflow

Hi!

With your patch, it worked!

To be honest, I thought about it, but I thought it was too basic to be the truth. Well, it wasn't.

Thanks.
by 0x3333
Sat Mar 09, 2019 4:38 pm
Forum: ChibiOS/RT
Topic: chVTGetSystemTimeX overflow
Replies: 11
Views: 705

Re: chVTGetSystemTimeX overflow

I changed the method chTimeIsInRangeX, added a check, now it is working: static inline bool chTimeIsInRangeX(systime_t time, systime_t start, systime_t end) { // If the end has overflowed and the current time is greater than start, we're good. if (end < start && time > start) { return true; ...
by 0x3333
Sat Mar 09, 2019 4:28 pm
Forum: ChibiOS/RT
Topic: chVTGetSystemTimeX overflow
Replies: 11
Views: 705

Re: chVTGetSystemTimeX overflow

I have some functions that need to wait for a specific number of milliseconds. I'm using chVTGetSystemTimeX to get the start time and check periodically if X milliseconds have passed. This sounds like a busy-loop and is not very efficient. Sometimes you need it when you need a very fast reaction ti...
by 0x3333
Sat Mar 09, 2019 4:03 pm
Forum: ChibiOS/RT
Topic: chVTGetSystemTimeX overflow
Replies: 11
Views: 705

Re: chVTGetSystemTimeX overflow

EDITED BELOW
by 0x3333
Sat Mar 09, 2019 4:02 pm
Forum: ChibiOS/RT
Topic: chVTGetSystemTimeX overflow
Replies: 11
Views: 705

Re: chVTGetSystemTimeX overflow

Hi, The system time is meant to overflow, chVTIsSystemTimeWithinX() also works when end<start. The size of the counter is HW constrained but if you disable tickless mode in chconf.h then you can use a 32 bits system time, in normal mode the counter becomes a normal variable increased by an interrup...
by 0x3333
Thu Mar 07, 2019 10:45 pm
Forum: ChibiOS/RT
Topic: chVTGetSystemTimeX overflow
Replies: 11
Views: 705

chVTGetSystemTimeX overflow

Hi guys! This is my first post! I'm new to Chibios, so if this is a dumb question, please excuse. I'm using a STM32F103, I have some functions that need to wait for a specific number of milliseconds. I'm using chVTGetSystemTimeX to get the start time and check periodically if X milliseconds have pas...

Go to advanced search