Rabbit 6000. Clearing Serial TX interrupt without sending data.

According to the rabbit 6000 documentation, an interrupt is generated when one of the serial TX buffers is emptied. This interrupt is cleared when another byte is written to the register.

Is there another method of clearing this interrupt? How does one pause or stop sending without the ISR being repeatedly called? Does the interrupt clear itself eventually if ignored, or must something else be done?

The base RS232 libraries don’t cover our needs (streaming serial data from circular buffers in extended memory to multiple ports with some immediate pauses/responses based on contents of the RX stream [basically proxy handling of DC1/DC2/DC3]), so we’re writing custom ISRs.

This seems to be the only thing that’s a bit ambiguous in the documentation, though maybe I’ve skimmed over something.


Is it correct that this is done by writing any value to SXSR, and that that value will be completely ignored with the exception of clearing the interrupt?

Just found something to that effect in the SXSR bit descriptions.

Based on my reading of spx_tx_isr, I would say that’s correct. If there is a byte to send, you load it to SxDR (or SxLR for a long stop). If the outbound buffer skip that step. Regardless, write any byte to SxSR to clear the interrupt.

I’d think that spx_tx_isr would be a good starting point for writing your own ISR.

1 Like

Looks like the documentation is conflicting on whether SxLR or SxAR should be written to when appending an extra logical “1”. As such, I’ll trust that spx_tx_isr has it right and it’s SxLR. That matches two spots in the documentation, where there’s only one spot where it says the opposite.

Page 190 of the Rabbit 6000 manual states: “To transmit with a “1” address bit appended, write the data to SxAR instead of SxDR; to append a “0” address bit write to SxLR instead.” I believe this is a typo and, as you stated, the opposite is true. Not sure who would update that, but it’s worth adding to the list. Not sure if there’s an “errata” in existence.

I’m not familiar with this 9th-bit addressing technique, but it’s possible that an address bit of 1 corresponds to a 0 on the Tx pin (e.g., one section of documentation refers to the address bit in code, the other to the signal level).