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?
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.
- OS, TCP/IP stack, USB, device drivers and simulator for M521X, M521XX, M5221X, M5222X, M5223X, M5225X. One package does them all - "Embedding it better..."
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.
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.