Each UNICOMM peripheral contains a SUSPEND bitfield, see the below registers for each
module. When this bit is set, the module returns to an idle state and stops further
communication on the external pins. The transmit line/lines are driven to the idle
state and any further toggles on the receives line/lines are not processed. To
suspend the module, follow the below steps.
- Check that the UNICOMM module is in an IDLE state
- UNICOMM-UART
- STAT.BUSY needs to read '0'.
- In LIN mode, if transmitting, the checksum needs to be loaded
into the TX FIFO.
- In LIN mode, if receiving, the checksum needs to be received
from the RX FIFO.
- In idleline multiprocessor mode, if transmitting, all address
and data bytes for the current frame need to be loaded into the
TX FIFO
- In idleline multiprocessor mode, if receiving, SR.IDLE needs to
read '1'.
- If using RTS/CTS flow control, if transmitting, pull nRTS line
high after TX FIFO is empty.
- If using RTS/CTS flow control, if receiving, pull nCTS line high
after receiving the current byte.
- UNICOMM-SPI
- In Controller mode, CS needs to be idle.
- In Peripheral mode, CS needs to read back as idle.
- UNICOMM-I2CC
- SR.BUSY needs to read '0'.
- If transmitting, the receiving target must send a NACK
- If receiving, NACK must be sent on the line
- In multi-controller mode, STOP condition needs to be sent on the
line
- UNICOMM-I2CT
- SR.BUSY needs to read '0'.
- If transmitting, receiving controller must send a NACK
- If receiving and clock stretching is enabled, NACK must be sent
on the line
- If receiving and clock stetching is disabled, transmitting
controller must send a STOP or address a different target
- Set the SUSPEND bit
- UNICOMM-UART: LCRH.SUSPEND=1
- UNICOMM-SPI: CTL1.SUSPEND=1
- UNICOMM-I2CC: CTR.SUSPEND=1
- UNICOMM-I2CT: CTR.SUSPEND=1
- Clear the RX FIFO
- Disable the module
- UNICOMM-UART: CTL0.ENABLE=0
- UNICOMM-SPI: CTL1.ENABLE=0
- UNICOMM-I2CC: CTR.ENABLE=0
- UNICOMM-I2CT: CR.ENABLE=0
Note: Before re-enabling the UNICOMM module, the SUSPEND bit needs to be cleared.