The right way to graph waveform on display - TouchGFX+FreeRTOS+Interrupts - Oscilloscope Project
Hello,
This is a follow-up to my earlier question, to make a 7.2Msps digital oscilloscope using the STM32F429 Discovery board.
In the last post, I was able to capture a buffer from the triple interleaved ADCs of the MCU and display the captured waveform using the STemWin library.
So as a new part of the project, I'm trying to use the dynamic graph widget of TouchGFX instead of the STemWin.
So far here's a summary of the application:
- initialize all components, including the triple interleaved ADCs, DMA, EXTI, TIM10
- in the EXTI IRQ: (at this, point the trigger has happened.)
- mask EXTI
- copy the current buffer address that is being written by the ADC by reading DMA2_Stream0->NDTR
- start TIM10 in interrupt mode
- in the TIM10 IRQ: (at this point, half of the buffer is filled with the data after the trigger event, and half with the data before trigger.)
- stop ADCs
- stop TIM10
- set "End_Of_Capture" flag
- check for the "End_Of_Capture" flag, and if it's set, copy the captured buffer, restart ADCs, add the captured data to the graph, and display the graph.
The earlier project that I had didn't use any OS and was more like a proof of concept.
But in this project, I'm planning to use FreeRTOS to improve user experience if possible.
Since I have little experience with FreeRTOS, my main question is whether it is possible to accomplish these tasks with the FreeRTOS since the TIM10 & EXTI Interrupts need to have the highest priorities possible. (0, 0)
And if the answer to that is positive, do I have to make a separate task for step 4 of my application?
Also, if you have any other suggestions about the whole process feel free to share them.