Single-Wire Half-Duplex Mode; Smart Card - WCH CH32V003 Series Reference Manual

Table of Contents

Advertisement

CH32V003 Reference Manual
CK (capture strobe on CK
rising edge in this example)
Data on RX
(from slave)
t
= t
1/16 bit time
SETUP
HOLD

12.5 Single-wire half-duplex mode

Half-duplex mode supports the use of a single pin (TX pin only) for receive and transmit, with the TX and RX
pins connected internally on the chip.
The way to turn on the half-duplex mode is to set the HDSEL position bit in control register 3
(R16_USARTx_CTLR3), but it is also necessary to turn off the LIN mode, smart card mode, IR mode and
synchronous mode, i.e. to ensure that the SCEN, CLKEN and IREN bits are in reset, which are in control
registers 2 and 3 (R16_USARTx_CTLR2 and R16_USARTx_CTLR3).
After setting to half duplex mode, you need to set the IO port of TX to floating input or open drain output high
mode. With TE set, the data will be sent out as soon as it is written to the data register. Special attention should
be paid to the fact that the half-duplex mode may cause bus conflicts when multiple devices use a single bus
to send and receive, which needs to be avoided by the user with software itself.

12.6 Smart card

Smart card mode supports ISO7816-3 protocol access to smart card controllers.
The smart card mode is turned on by setting the SCEN position bit in control register 3
V1.3
Figure 12-2 USART clock timing example (M=0)
Figure 12-3 Data Sample Hold Time
135
valid DATA bit
t
t
SETUP
HOLD
http://wch.cn

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents