LPC54628 RS485

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

LPC54628 RS485

757 次查看
lua40927
Contributor II

Hi all,

I want to use the UART function of LPC54628 via RS485.

Regarding the setting of RTS, I set OESEL.OEPOL.OETA according to the manual.

The IOCON setting of the RTS pin pin is as shown below

1660804045606.jpg

but I still failed.

I would like to ask how to use RS485

Thanks

标记 (1)
0 项奖励
4 回复数

743 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I think your configuration is correct for both pin assignment and RTS configuration.

After you write the FIFO write data register of FC1 module, can you check the PIO0_14 signal (RTS pin)if the RTS signal toggles?

I suggest you continue to write the FIFO write data register of FC1 module with polling or interrupt mode in a loop, then check if the RTS signal toggles.

BR

XiangJun Rong

 

0 项奖励

731 次查看
lua40927
Contributor II

Hi,

I use a WHILE loop to keep sending data.

The waveform of RTS is as follows

RRRTTTSS.jpg

It looks like it's working.

But the information received is incorrect

亂碼.jpg

Looks like there is some problem

 

Thanks for taking the time to answer

 

0 项奖励

675 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

From the screenshot signal, it appears that the RTS signal is not well, it should have been square waveform with clear rising/falling edge, do you know the reason for example the limited bandwidth of the scope or the signal itself?

Can you show the waveform of both TXD and RTS so that we can see the relationship?

BR

XiangJun Rong

 

0 项奖励

548 次查看
lua40927
Contributor II

Hello,

The following are the parameters I set , 

USART_CFG_OESEL(true) | USART_CFG_OETA(true) |  USART_CFG_OEPOL(true)

In the case of Baud Rate 9.6kbps:

Blue : Tx   Pink:RTS

The difference between the following two signal graphs is only the width of the time axis

0.25ms:

9.6kbps_1.jpg

0.1ms:

9.6kbps_2.jpg

I send data 0x11 continuously,and I received the correct data 0x11

Tx_0x11_Rx_0x11n.jpg

In the case of Baud Rate 57.6kbps:

Blue : Tx   Pink:RTS

The difference between the following two signal graphs is only the width of the time axis

0.1ms:

57.6kbps_1.jpg

0.025ms:

57.6kbps_2.jpg

I send data 0x11 continuously,but I received the error data 0xC4

Tx_0x11, Rx_0xC4.jpg

I think the rise of RTS is too slow, resulting in errors when the baud rate is faster

57.6kbps_2N.jpg

Do you have any solution? 

Thanks 

0 项奖励