SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
The CIR function generates interrupts that can be enabled and disabled by writing to the appropriate bit in the interrupt enable register (UART_IER_CIR). The interrupt status of the device can be checked by reading the interrupt identification register (UART_IIR_CIR).
The UART, IrDA, and CIR modes have different interrupts in the UART module and, therefore, different UART_IER_CIR and UART_IIR_CIR mappings, depending on the selected mode.
Table 13-79 lists the interrupt modes to be maintained. In CIR mode, the sole purpose of the UART_IIR_CIR[5] TX_STATUS_IT bit is to indicate that the last bit of infrared data was passed to the TX pin.
IIR_CIR Bit Number | Interrupt Type | Interrupt Source | Interrupt Reset Method |
---|---|---|---|
0 | RHR interrupt | DRDY (data ready) (FIFO disable) RX FIFO above trigger level (FIFO enable) | Read RHR until interrupt condition disapppears. |
1 | THR interrupt | TFE (THR empty) (FIFO disabled) TX FIFO below trigger level (FIFO enabled) | Write to the UART_THR register until the interrupt condition disappears |
2 | RX_STOP_IT | Receive stop interrupt (depending on value set in the BOF Length register (EBLR)) | Read the UART_IIR_CIR register |
3 | RX overrun | Write to RHR when RX FIFO is full. | Read the RESUME register. |
4 | N/A for CIR mode | N/A for CIR mode | N/A for CIR mode |
5 | TX status | Transmission of the last bit of the frame is complete successfully | Read the UART_IIR_CIR register |
6 | N/A for CIR mode | N/A for CIR mode | N/A for CIR mode |
7 | N/A for CIR mode | N/A for CIR mode | N/A for CIR mode |