I have a task that ‘flaps’ in the following
fashion:
run 1 - takes ~ 800 us
run 2 - takes ~ 40ms
run 3 - 800us
run 4 - 40ms…
Any ideas on what makes a task flap like this?
I’ve checked my tick isr - it’s ok.
I’m using FreeRTOS in preemptive mode - and I
don’t have any other tasks with the same priority
as the task that ‘flaps’ - the “flapper”
is the highest priority task in the system.
Yes, the ADC stuff does poll. Do you think I should change this to an ISR?
I thought the polling time would be somewhat of a constant - not that it would vary by 39.2 ms - maybe I’m wrong.
I thought the ADC’s on the 430 were much faster than this… even running at 1024 sample&hold - you’re only talking about something around 128us
if running at 8MHz - correct? So the 800us looks
like more than enough time unless this is some sort of glitch.
Code that does the actual measuring is taking
304 us - seems more reasonable. I guess there’s
too much time being taken in moving this around
in memory.
I’m going to see what can be done to speed off how
this gets from ADC mem to program mem…