K60 RTS/CTS lines and MQX not working?

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

K60 RTS/CTS lines and MQX not working?

1,058 次查看
jpa
Contributor IV

Any secrets to getting HW handshaking working on the K60N512 and MQX?  

 

What I have:

* A jumper on J13 7-8 on the TWR-SER board

* A jumper on J18 1-2 on the TWR-SER board

* The other standard jumpers for the K60 demos

* I open the port using fopen(devname, (char const *) IO_SERIAL_HW_FLOW_CONTROL);

* For kicks, I poll the hardware line using ioctl(dev, IO_IOCTL_SERIAL_GET_HW_SIGNAL, &signals) and test for IO_SERIAL_CTS and IO_SERIAL_RTS and the result of the test doesn't change, even though I can see the signal changing with a breakout box.  

* serial port is configured using the interrupt driver

 

Transmissions from the K60 board continue no matter the state of the external pins...which I guess makes sense if MQX can't see the proper state of the pins either.  

 

JPA

 

0 项奖励
回复
3 回复数

543 次查看
jpa
Contributor IV

Well, I thought I had it by defining

BSPCFG_ENABLE_TTYD_HW_SIGNALS

in the user_config.h file, but after rebuilding the BSP and PSP, it's still no go.  (or rather, still no 'stop')

 

JPA

0 项奖励
回复

543 次查看
Dekiru
Contributor IV

Hi,

 

Can you change to using pooling in stead of interrupt?

Look at the MQX code, you can see that they limited hardware hanshaking for polling only intentionally.

 

Regards

 

0 项奖励
回复

543 次查看
jpa
Contributor IV

Thanks for the suggestion, I'll give it a try.  

 

I wonder why that is, though?  Does it say why in the code?  Handshaking is built into the hardware, so I wouldn't have thought it would complicate the interrupt handling.  

 

I'm new to MQX so I may be missing something, but polling seems antithetical to a multi-tasking RTOS.  

 

JPA

0 项奖励
回复