cancel
Showing results for 
Search instead for 
Did you mean: 

The right way to graph waveform on display - TouchGFX+FreeRTOS+Interrupts - Oscilloscope Project

MMoha.3
Associate III

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:

  1. initialize all components, including the triple interleaved ADCs, DMA, EXTI, TIM10
  2. in the EXTI IRQ: (at this, point the trigger has happened.)
    1. mask EXTI
    2. copy the current buffer address that is being written by the ADC by reading DMA2_Stream0->NDTR
    3. start TIM10 in interrupt mode
  3. 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.)
    1. stop ADCs
    2. stop TIM10
    3. set "End_Of_Capture" flag
  4. 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.

0 REPLIES 0