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
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?
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
Then I used define MCL_START_SEC_VAR_CLEARED_UNSPECIFIED_NO_CACHEABLE when define the Rx message for DMA transmit.