New routine for generating fast ticks on windows systems


The Windows simulation of FreeRTOS is a great tool to enable development under windows but unfortunately suffers from a being tick starved. Tick rates only happen at about 40hz which I found unacceptable to real simulation.

In order to solve the slow tick frequency on the windows simulation port, I am providing a new version of the "prvSimulatedPeripheralTimer" routine on port.c. This version uses the windows API routines QueryPerformanceFreqencey and QueryPerformanceCounter to generate high frequency tick rates in excess of 1000 hz.

Windows has internaly a high frequency counter that is dependant of the computers performance, the faster the machine the faster will be this frequency. On my modest machine it's about 2mhz, which allows for very high tick rates if desired.

To use this routine simply download the c source and substiture the function  "prvSimulatedPeripheralTimer" of "port.c " with the new version provided. Don't forget to set the Tick Rate in FreeRtosConfig.h to the desired rate.






Please sign in to leave a comment.