47.8.2.2 Transmission procedure for (C7816[TTYPE] = 1)When the protocol selected is C7816[TTYPE] = 1, data is transferred in blocks. Beforestarting a transmission, the software must write the size, in number of bytes, for theInformation Field portion of the block into TLEN. If a CRC is being transmitted for theblock, the value in TLEN must be one more than the size of the information field. Thesoftware must then set C2[TE] = 1 and C2[RE] = 1. The software must then monitorS1[TDRE]/interrupt and write the prologue, information, and epilogue field to thetransmit buffer. TLEN automatically decrements, except for prologue bytes and the finalepilogue byte. When the final epilogue byte has been transmitted, the UARTautomatically clears C2[TE] and C3[TXDIR] to 0, and the UART automatically startscapturing the response to the block that was transmitted. After the software has detectedthe receipt of the response, the transmission process must be repeated as needed withsufficient urgency to ensure that the block wait time and character wait times are notviolated.47.8.3 Initialization sequence (non ISO-7816)To initiate a UART transmission:1. Configure the UART.a. Select a baud rate. Write this value to the UART baud registers (BDH/L) tobegin the baud rate generator. Remember that the baud rate generator is disabledwhen the baud rate is zero. Writing to the BDH has no effect without alsowriting to BDL.b. Write to C1 to configure word length, parity, and other configuration bits(LOOPS, RSRC, M, WAKE, ILT, PE, and PT). Write to C4, MA1, and MA2 toconfigure.c. Enable the transmitter, interrupts, receiver, and wakeup as required, by writing toC2 (TIE, TCIE, RIE, ILIE, TE, RE, RWU, and SBK), S2 (MSBF and BRK13),and C3 (ORIE, NEIE, PEIE, and FEIE). A preamble or idle character is thenshifted out of the transmitter shift register.2. Transmit procedure for each byte.a. Monitor S1[TDRE] by reading S1 or responding to the TDRE interrupt. Theamount of free space in the transmit buffer directly using TCFIFO[TXCOUNT]can also be monitored.Application informationK22F Sub-Family Reference Manual, Rev. 4, 08/20161296 NXP Semiconductors