SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
The following programming model explains how to program the module to transmit an IrDA 4-byte frame with no parity, baud rate = 4 Mbps, FIFOs enabled, and 8-bit word length.
Step | Register/Bit Field/Programming Model | Value |
---|---|---|
Disable UART mode | UART_MDR1[2-0] MODE_SELECT | 0x7 |
Grant access to the UART_DLL and UART_DLH registers | UART_LCR[7-0] | 0x80 |
Enable access to change UART_FCR[0] | UART_DLL[7-0] CLOCK_LSB | 0x0 |
UART_DLH[5-0] CLOCK_MSB | ||
FIFO clear and enable | UART_FCR[2-0] | 0x7 |
Set the FIFO trigger level | see Section 12.1.6.4.3, Load FIFO trigger and DMA mode settings | |
Set FIR mode | UART_MDR1[2-0] MODE_SELECT | 0x1 |
Disable access to the UART_DLL and UART_DLH registers | UART_LCR[7-0] | 0x00 |
Set FIR mode and enable auto-SIP mode | UART_MDR1[7-0] | 0x45 |
Set frame length | UART_TXFLL[7-0] TXFLL | 0x4 |
UART_TXFLH[7-0] TXFLH | 0x0 | |
Force output DTR to active | UART_MCR[0] DTR | 1 |
Enable the UART_THR interrupt | UART_IER_IRDA[1] THR_IT | 1 |
Set the eight additional starts of frame transmission | UART_EBLR[7-0] EBLR | 0x08 |
SIP is sent at the end of transmission | UART_ACREG[3] SEND_SIP | 1 |