cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP135 - BAREMETAL - UART - DMA

jschneider
Associate III

Hello,

 

I am currently using bare-metal MP13 solution in CubeIDE. I want to integrate uart with DMA. After configuring DMA settings for uart4, a following fragment of DMA init code has been generated:

jschneider_1-1704878867812.png

NVIC is not available for Cortex-A, but still its functions are being generated. 

My question is, how can I properly adjust MX_DMA_Init for uart interrupts without NVIC and code generation?

Do you have any ideas?

 

Thank you,

Jacek S.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Erwan SZYMANSKI 

Code genereted from IOC will be definitely incorrect, so I wouldn't trust it.

I'm attaching my main.c with most of the necessary changes to make dma-uart work.

View solution in original post

4 REPLIES 4
jschneider
Associate III

For anyone encountering the same problem here is the solution:

 

Enable ETZPC and add init function to the main (It won't be generated)

Make sure DMA Init runs before UART Init.

jschneider_0-1704986376941.png

If your compiler doesn't see an assert in a scope, comment it out

jschneider_1-1704986619914.png

Adjust MX_ETZPC_Init:

jschneider_2-1704986671339.png

In the end, correct generated MX_DMA_Init accordingly to your own settings.

jschneider_4-1704986787489.png

 

Best,

 

Hello @jschneider ,
First, thank you for having shared your solution on the forum, it can help a lot other users.

Can you share us your IOC file in order to replicate on our side, and correct possible issues ? 

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Erwan SZYMANSKI 

Code genereted from IOC will be definitely incorrect, so I wouldn't trust it.

I'm attaching my main.c with most of the necessary changes to make dma-uart work.

Hello @jschneider ,
Thank your for your sharing, the issue has been reproduced on my side and an internal ticket is opened to solve this. Thank you for having raised it to us.

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.