I am using Atmel ARM Cortex (ASF) with FreeRTOS 8.1.1.
I need to read from an ADC at a rate of 2 kHz. I setup a hardware timer to trigger at a rate of 2 kHz and toggle an LED which I am probing.
If I run bare metal (don’t start scheduler) I see a nice 2 kHz toggle. If I start the scheduler and am using a tick mode, I see a nice 2 kHz toggle. However, if I start the scheduler in tickless mode, I see a horrible looking waveform, by this I mean that my toggles are very non-periodic, some very short, others very long.
I took this to mean that tickless mode is doing some type of non deterministic interrupt disabling for “long” periods of time which is causing me to miss interrupts or delay my interrupts. Or am I doing something wrong?
I verified my hardware timer has an interrupt priority of 0 (highest), and it doesn’t call any API functions. I also tried preventing any sleeping modes by “locking” myself in active, and that didn’t help either.
Any help much appreciated!