RS485 on K60?

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

RS485 on K60?

跳至解决方案
1,139 次查看
danielchai
Senior Contributor I

Hi All,

I tried the RS485 sample code. The reading task works. It can read from a terminal. But the write task does not work.

Is there any specific configuration I need for write?

Thanks.

-Daniel

0 项奖励
回复
1 解答
885 次查看
dereksnell
NXP Employee
NXP Employee

Hi Daniel,

It works for me.  The example \Freescale_MQX_4_0_1\mqx\examples\rs485\cw10\rs485_twrk60n512 is written to use the driver ittyd.  I had to enable this driver in user_config.h, and then rebuild the BSP.  With the TWR-K60N512 board, UART3 (used with ittyd driver) is routed to the 9-pin serial port on the TWR-SER board.  Running the example with a terminal connected to that serial port at 115,200 baud shows the string "RS485 send example" prints out successfully.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
886 次查看
dereksnell
NXP Employee
NXP Employee

Hi Daniel,

It works for me.  The example \Freescale_MQX_4_0_1\mqx\examples\rs485\cw10\rs485_twrk60n512 is written to use the driver ittyd.  I had to enable this driver in user_config.h, and then rebuild the BSP.  With the TWR-K60N512 board, UART3 (used with ittyd driver) is routed to the 9-pin serial port on the TWR-SER board.  Running the example with a terminal connected to that serial port at 115,200 baud shows the string "RS485 send example" prints out successfully.

0 项奖励
回复
885 次查看
danielchai
Senior Contributor I

Hi Derek,

Now it works. I did not disconnect the J15.

Thanks.

-Daniel

0 项奖励
回复
885 次查看
danielchai
Senior Contributor I

Hi Derek,

Actually, I am confused about the serial port. It has RS485_RXP0, RS485_RXN0, RS485_TXP0, RS485_TXN0. Which two are corresponding to RS485 A and B?

If I connect the 9-pin serial port to my computer, do I need a RS485 to RS232 converter?

What is the functionality of J15?

Thank you.

-Daniel