Receive Problem in UART with rs485 MCU LPC55s66

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

Receive Problem in UART with rs485 MCU LPC55s66

1,107 次查看
SotirisEft
Contributor I

Hello,

I am trying to communicate with an RS485 tranceiver via UART in blocking mode exactly as it is in the lpc board keil Examples. The Uart configuration and Pin configuration are shown in the pictures bellow. The problem is that although I can see the data in analyzer connected to the bus. I don't receive anything in my RX buffer. The last picture is my receive function. Any Ideas what is going on?

Thanks In advance,2022-10-24_10h01_54.png2022-10-24_10h02_49.png2022-10-24_10h17_27.png

0 项奖励
回复
4 回复数

1,099 次查看
SotirisEft
Contributor I

Hello and thanks for your help,

The RTS Pin is controlled via Software and that is the reason why I don't check this bits. Also I noticed  that when I try to transmit data from the mcu the data are captured correctly from the analyzer. Do you think that configuring this bits will actually help?

Thanks,

0 项奖励
回复

1,093 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

You said that “The RTS Pin is controlled via Software and that is the reason why I don't check this bits.”, but you configured the FUNC bits of IOCON->PIO[0][9] as 0x01, which means that the PIO0_9 pin functions as RTS of FC4, you can NOT manipulate the RTS with software like GPIO does, the RTS signal will be driven by UART module automatically, in the case, you have to configure the bits I said in last Email.

You can configure the PIO0_9 pin as GPIO function with FUNC bits of IOCON->PIO[0][9] as 0x00, you can configure the direction of PIO0_9 as output, in the case, you can set the GPIO or clear the GPIO so that you can control the transceiver direction of RS485.

If you still have question, pls post the RS485 hardware connection.

BR

XiangJun Rong

0 项奖励
回复

1,091 次查看
SotirisEft
Contributor I

Hello and thank you for your reply,

That was the solution to my problem. It is solved.

0 项奖励
回复

1,101 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

If you want to use RTS signal to control RS485 transceiver direction, you have to configure the OESEL,
OEPOL, and OETA bits in the CFG register.

BTW,I suggest you check the RTS pin signal via scope.

xiangjun_rong_0-1666604139562.png

Hope it can help you

BR

XiangJun Rong

0 项奖励
回复