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
but I still failed.
I would like to ask how to use RS485
Thanks
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
Hi,
I use a WHILE loop to keep sending data.
The waveform of RTS is as follows
It looks like it's working.
But the information received is incorrect
Looks like there is some problem
Thanks for taking the time to answer
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
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:
0.1ms:
I send data 0x11 continuously,and I received the correct data 0x11
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:
0.025ms:
I send data 0x11 continuously,but I received the error data 0xC4
I think the rise of RTS is too slow, resulting in errors when the baud rate is faster
Do you have any solution?
Thanks