tsandmann / freertos-teensy

FreeRTOS port with C++ std::thread support for ARM boards Teensy 3.5, 3.6, 4.0 and 4.1 (cortex-m4f and cortex-m7f)
95 stars 16 forks source link

Changing FreeRTOS Tick rate #4

Closed ankitbhatia closed 3 years ago

ankitbhatia commented 3 years ago

I wanted to run the freeRTOS port with a tick rate of 10kHZ. Do I need to change anything else except the

#define configTICK_RATE_HZ ( (TickType_t) 10000 )

in FreeRTOSConfig.h?

tsandmann commented 3 years ago

Unfortunately yes, because all the Arduino timing functions rely on one tick every millisecond.

You could try to change void vApplicationTickHook() as the following:

But I haven't tested that yet. I'll try to include a solution for different tick rates in the next release (or at least a warning for unsupported tick rates).