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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

224 Views
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 Kudos
2 Replies

187 Views
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 Kudos

182 Views
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