RS485 using UART module on MCF52259 family

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RS485 using UART module on MCF52259 family

2,105件の閲覧回数
rsk2
Contributor I

Hello, I am trying to implement an RS485 interface between several 9S08s and an MCF52258 as bus master. The Processor Expert Asynchro Serial bean worked great on the 9S08s. But I am running into trouble on the coldfire part because I don't see anyway to trigger an interrupt when the transmission is complete, at whichpoint I need to switch the RS485 transceiver back to Rx mode as quickly as possible. Maybe the chip designer's intention was for us to use the RTS signal, however this would require me modifying my PCB and adding an inverter.

 

Has anyone really liked their implementation of the TX/\RX\ RS485 transceiver signal using the Coldfire UART module?

ラベル(1)
0 件の賞賛
3 返答(返信)

583件の閲覧回数
mjbcswitzerland
Specialist V

Hi

 

I believe that you can use the TXEMP interrupt to generate an interrupt (see USRn) at the end of the last stop bit sent.

 

In the uTasker MODBUS module for the M522XX with RS485 support this was however not used (see http://www.utasker.com/docs/MODBUS/uTasker_MODBUS.PDF appendix B and chapter 11) . Instead the normal character interrupt was used and a timer started to timeout when the RTS line should be changed, allowing for extra control of the timing to, say, several bits times after the last stop bit.

 

Regards

 

Mark

 

 

www.uTasker.com
- OS, TCP/IP stack, USB, device drivers and simulator for M521X, M521XX, M5221X, M5222X, M5223X, M5225X. One package does them all - "Embedding it better..."

0 件の賞賛

583件の閲覧回数
rsk2
Contributor I

Hello, I would love to set an interrupt on TXEMP but I do not see how to do this. I think you can only set an interrupt on TXRDY. Perhaps I will have to implement a timer, but I hope not.

 

Thank you,
Randy

0 件の賞賛

583件の閲覧回数
mjbcswitzerland
Specialist V

Hi Randy

 

Yes, I just checked and it does look to be only a status bit (no interrupt capability, unfortunately). Perhaps this is why we used a timer(?).

 

You could poll the status after serving the final TXRDY interrupt in a message, but I think that the timer is most practical. In our MODBUS module a DMA timer is allocated to each MODBUS serial port and used for inter-character space measuremenst and the RTS control since the two functions are never overlapping.

 

Regards

 

Mark

 

0 件の賞賛