UART DMA transmit only works when stopping code with breakpoint otherwise data corrupted

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART DMA transmit only works when stopping code with breakpoint otherwise data corrupted

225件の閲覧回数
sdusheyko
Contributor I

Hello

I have tested my app on the dev board and it works. Now on custom hardware I am having this issue. The problem is that the UART output is corrupted when the debugger is running without breakpoints. When I interrupt the code with a breakpoint the expected behavior is observed. Is this a problem that anyone else has seen? It looks like what is described in the provided link. The poster mentioned assigning the TX buffer to a specific area of memory, though I have not seen this solution elsewhere including examples. Please advise, thanks!

 

https://community.nxp.com/t5/LPC-Microcontrollers/UART-DMA-works-as-intended-when-debugging-but-does...

0 件の賞賛
2 返答(返信)

188件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @sdusheyko,

Please specify the MCU part, and if you use SDK/RTD, the revision of it.

The data could be corrupted if the buffer is placed in a cacheable memory.

 

Regards,

Daniel

0 件の賞賛

183件の閲覧回数
sdusheyko
Contributor I

Thanks for the tip, Daniel, that solved it. I did it as follows: 

#pragma GCC section bss ".mcal_bss_no_cacheable"
uint8_t buffer_test[SIZE_OF_BUFFER];
#pragma GCC section bss

 

To your questions, this is for a s32K312 using s32ds3.5