SPRUHZ7K August 2015 – April 2024 AM5706 , AM5708 , AM5716 , AM5718 , AM5718-HIREL
The following programming model explains how to program the module to transmit an IrDA 6-byte frame with no parity, baud rate = 115.2 kbps, FIFOs disabled, 3/16 encoding, 2 stop-bits, and 7-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 |
Load the baud rate (115.2 Kbps) | UART_DLL[7:0] CLOCK_LSB | 0x1A |
UART_DLH[5:0] CLOCK_MSB | 0x00 | |
Set SIR mode | UART_MDR1[2:0] MODE_SELECT | 0x1 |
Disable access to the UART_DLL and UART_DLH registers | UART_LCR[7:0] | 0x00 |
Force DTR output to active | UART_MCR[0] DTR | 1 |
Enable the THR interrupt | UART_IER_IRDA[1] THR_IT | 0x1 |
Set transmit frame length to 6 bytes | UART_TXFLL[7:0] TXFLL | 0x06 |
Set the seven starts of frame transmission | UART_EBLR[7:0] EBLR | 0x08 |
Set SIR pulse width to be 1.6 μs | UART_ACREG[7] PULSE_TYPE | 1 |