Clockwork
FreeRTOS Periodic Task Exercise
Task
Run the given sample() every 100 ms from FreeRTOS, for as long as the board runs. Call n starts n x 100 ms after the scheduler starts.
Circuit
Pass condition
Each line sample() prints shows the tick its call started on, with the level read at that tick: t=100, t=200, t=300 and on.
Notes
The level on PA0 to PA3 changes while your program runs. sample() takes 5 to 35 ms. Other tasks need the processor between calls. FreeRTOS V11.1.0 ticks at 1 ms. Leave the given code as is.