Three UART channels are configured, and uart0 is receiving and sending correctly. 1. All data received by uart1 is 0.The length of bytes is normal.Please guide me.thanks
config init:
idle Receiving operation
Thank you for your reply.
I have checked the configuration of UART0 and UART1 and they are the same.
UART0 is a separate channel. I check the clock differently
The following is the tool configuration.
Hi @guochuan
Thank you for sharing your configurations.
Could you help confirm if the UART1 works without initializing UART0?
Did you test the UART1 using the same clock frequency as UART0?
Did you test UART1 with diferent baud rate?
Also, could you share oscilloscope images of the TX UART0 and TX UART1?
Hi @guochuan
Could you help me with the following information:
Which DE are you using?
Does UART1 work individually, that is, without configuring UART0?
B.R.
VaneB
HIi @VaneB
Thanks for your reply.
When we use uart+dma+idle mode to realize communication, there is an issue. After repeated verification, it is found that the UART communication is abnormal after DMA is added.
and test the UART+IDLE communication alone is normal.
Attached is the configuration routine, please help to guide, thank you.
hi @VaneB
我们在调试UART+DMA+IDLE时,UART能正常产生Idle中断。产生的顺序是先产生IDLE中断,然后才进入void Lpuart_Uart_Ip_CompleteReceiveUsingDma(uint8 Instance)函数中断,
进入该函数提示如下
初步怀疑是DMA产生的完成中断滞后,导致接收到的数据全是0.请帮助分析,谢谢。
Hi @guochuan
I understood that after the IDE interrupt is generated, a DMA interrupt is generated, which produces a delay in data reception by UART. Did I understand correctly?
Would you help me to maintain communication in English for better interaction?
hi @VaneB
thank you reply.
We use emulator for tracking. Now it is normal to test uart+dma+idle to receive data, but send data is always 0. Both DMA and uart states are successful.
The project is fixed to send 50 bytes full of 0. share the project, please help to guide, thank you..
Hi @guochuan
Did you test the example code I shared with you earlier?
Hi @guochuan
Thank you for the information.
Could you help me with the information requested above?
Also, check the following community post, where you will find an example of UART and DMA that may help you.