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

292 次查看
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 回复数

255 次查看
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 项奖励
回复

250 次查看
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