Hello,
I have a low priority task1 that starts an automatic ADC/DMA sequence to aquire some data in realtime. When the sequence is started,
the low priority task1 suspends itsself. At the end of the sequence, a DMA complete interrupt fired and task1 is resumed and starts
to process the aquired data with low priority. This works well in lower load situation, however in high CPU load situations, a higher priority
task2 preempts the low priority task1 and before OS_Suspend is called, the automatic sequence finishes and calls OS_Resume which leads to
an OS_Error.
What would be a reliable and good way to solve this? Of course I cuold poll for a volatile flag instead of the OS_Suspend but this seems
ugly to me. Is there a nicer way to fix this?
Regards,
Christian
I have a low priority task1 that starts an automatic ADC/DMA sequence to aquire some data in realtime. When the sequence is started,
the low priority task1 suspends itsself. At the end of the sequence, a DMA complete interrupt fired and task1 is resumed and starts
to process the aquired data with low priority. This works well in lower load situation, however in high CPU load situations, a higher priority
task2 preempts the low priority task1 and before OS_Suspend is called, the automatic sequence finishes and calls OS_Resume which leads to
an OS_Error.
What would be a reliable and good way to solve this? Of course I cuold poll for a volatile flag instead of the OS_Suspend but this seems
ugly to me. Is there a nicer way to fix this?
Regards,
Christian