UART sending by DMA has SBE error with S32K344

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

UART sending by DMA has SBE error with S32K344

1,904 Views
zjldabing
Contributor II

I would like to have LPUART work with DMA instead of interruptting mode with chip K344.There is no such demo project in the SDK. I am trying it with a library project which has been hacked(with RTOS and some brief task in my application SW).The uart0 can send with interruptting mode(by log print function).

It does not work after changing the LPUART to DMA mode.The send process stoped at Configure the transfer control descriptor for the DMA channel in the function of Lpuart_Uart_Ip_StartSendDataUsingDma.Watching the register CH0_ES, the bit "SBE" is set which means :Last recorder error was bus error on source read.

Attach the hacked project.Can anybody help on this? Thanks

 

0 Kudos
Reply
3 Replies

1,876 Views
zjldabing
Contributor II

Could anyone help this issue? Or any method to debug it.As it send the whole string background as soon as the DMA Tx cmd is set. How can I run DMA send step by step to locate the possible error?

0 Kudos
Reply

1,890 Views
zjldabing
Contributor II

Here are the latest update of this issue.Sending by DMA works with that project and no configuration changes.It is a little strange.I forward the development and get another problem.The message printed with messy code at the end of each message.Which DMA setting may it be related with?

0 Kudos
Reply

1,812 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @zjldabing ,
Sorry for the late response. Last week I tried to create an example Uart DMA for you based on the Uart example project . Please check my attachment.
When working with Uart and DMA I noticed that address of Tx and Rx message transmit via DMA should be 32-byte aligned, and store into noncacheable memory region. This note is mentioned in document RTD_MCL_IM.pdf of module MCL.
For the configuration of DMA for Uart, It mentioned in RTD_UART_UM.pdf document, please take a look in it

cuongnguyenphu_0-1684898206103.png

Then I used define MCL_START_SEC_VAR_CLEARED_UNSPECIFIED_NO_CACHEABLE when define the Rx message for DMA transmit.

cuongnguyenphu_1-1684898403128.png