AVR32 UC3 Error in prvScheduleNextTick

meerkoetter wrote on Wednesday, April 24, 2019:


I used a V7.x version of FreeRtos so far. Last week I tried to switch my project to V10.2.0. It compiled, but worked in a strange way. After some debugging I found that the function prvScheduleNextTick in port.c is broken. This function is used, if the tick irq is generated by the CPU internal count register (Option configTICK_USE_TC==0).
In the V7.x version the code was correct, but now it assumes that the system register COUNT is free running and can be used to detect missed ticks. That’s not possible, the register is cleared to 0 at each compare match.
This wrong assumption will lead to a completely wrong tick frequenzy.

rtel wrote on Wednesday, April 24, 2019:

I’ve just checked the latest version of FreeRTOS against version 7.5.0,
and other than the data types having been updated to use stdint.h types,
the port has not changed. I suspect your original code came from Atmel,
not us, as they maintained their own version. Our original version was
created for ES chips, and the behaviour of the chips changed, while
Atmel updated their code there were some very elaborate usage of the
pre-processor in their drivers that we were not able to figure out so
were unable to update ours.