cancel
Showing results for 
Search instead for 
Did you mean: 

STM32-DMA-IDLE with ring buff and parsing

Ariel1
Associate II

Hi, I would be happy to consult,

I am trying to implement the following with FREErtos and DMA NUCLEO-H743ZI2

I want to receive packets sequentially on UART at some frequency.

To parse the packets and then save only the valid ones for later use.

What is the best way to approach this?
https://github.com/karlyamashita/Nucleo-G071RB_UART_DMA_Idle_Circular

https://github.com/karlyamashita/Nucleo-G431RB_Three_UART/wiki
I found that it looks really good but without FREErtos and parser.

And its using Normal mode in RX dma and not circular. 

 

Do you think this is a good basd and can it be converted relatively easily?

And if so, what is the correct way to approach this?
Thank you very much

@Karl Yamashita 

2 REPLIES 2
Karl Yamashita
Principal

Both projects have the same approach by having a message queue which you can parse. The only exception is that the circular project has an extra step of parsing through the circular buffer prior to placing the message in a message queue.

You can implement either project in a RTOS environment. Just picture the PollingRoutine() function as a task.

Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.

 

 

Can I use the circular project with multiple UARTS? 

And if so whats the best way doing so? 

 

And i see that the 3UART you used normal mode not circular and you are not using the big buffer.

You just writing directly into the queue so how you can parse there? 

Thanks alot