GD32VF103 User Manual
339
Figure 16-11. Example of USART in synchronous mode
USART
(master mode)
RX
TX
CK
Device
(slave mode)
Clock input
Data input
Data output
Figure 16-12. 8-bit format USART synchronous waveform (CLEN=1)
CK pin(CPL=1, CPH=0)
CK pin (CPL=0, CPH=1)
CK pin (CPL=1, CPH=1)
Master data output
Master data input
frame data (8-bit)
Idle
Idle
Start
Stop
bit4
bit5
bit6
bit7
bit0
bit1
bit2
bit3
bit4
bit5
bit6
bit7
bit0
bit1
bit2
bit3
CK pin (CPL=0, CPH=0)
16.3.10.
IrDA SIR ENDEC mode
The IrDA mode is enabled by setting the IREN bit in USART_CTL2. The LMEN, STB[1:0],
CKEN bits in USART_CTL1 and HDEN, SCEN bits in USART_CTL2 should be cleared in
IrDA mode.
In IrDA mode, the USART transmission data frame is modulated in the SIR transmit encoder
and transmitted to the infrared LED through the TX pin. The SIR receive decoder receives the
modulated signal from the infrared LED through the RX pin, and puts the demodulated data
frame to the USART receiver. The baud rate should not be larger than 115200 for the encoder.