UART sending by DMA has SBE error with S32K344

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

UART sending by DMA has SBE error with S32K344

1,771 次查看
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 项奖励
回复
3 回复数

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

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

1,679 次查看
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