For specific integration testing, I’d like to be able to control the functions that FreeRTOS uses for timing. For example, I’d like to be able to speed time up by 10x (or any arbitrary number) so that tests can run faster than real time.
I’m running on an ARM Cortex-M0+ (an ATSAML22). I’ve not tried it, but I think upping the frequency on SYSTICK (for main system ticks) and TC0 (for wake timer in tickless mode) would maybe do the right thing, but I’m fuzzy on the relationship between the two.
Update: As I read through tasks.c and the port-specific read_wake_timer() function, it looks like I can get away with only changing TC0’s rate, since that will bump xTickCount whenever the system comes back from a sleep.
Is there a preferred FreeRTOS idiom for doing this sort of thing?