How-To Guide

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 920 of 1852
Nov 30, 2020
RX23W Group 32. USB 2.0 Host/Function Module (USBc)
32.3 Operation
32.3.1 System Control
This section describes the register settings that are necessary for initialization of this module and power consumption
control.
32.3.1.1 Setting Data to the USB Related Register
Setting the SYSCFG.USBE bit to 1 after starting the clock supply to the USB (SYSCFG.SCKE bit = 1) enables and starts
USB operation.
32.3.1.2 Controller Function Selection
For the USB, the host or function controller can be selected using the SYSCFG.DCFM bit. Note that the DCFM bit
should be modified in the initial settings immediately after a reset is released or when pull-up resistors of the D+ and D–
lines and pull-down resistors of the D+ and D– lines are disabled (the SYSCFG.DPRPU bit = 0, DMRPU bit = 0, and
DRPD bit = 0).
32.3.1.3 Controlling USB Data Bus Resistors
The USB has pull-up and pull-down resistors for the D+ and D– lines. Pull up or pull down these lines by setting the
SYSCFG.DPRPU, DMRPU, and DRPD bits.
When the function controller is selected, confirm that connection to the USB host is made, then set the DPRPU or
DMRPU bit to 1 and pull up the D+ line (during full-speed) and D– line (during low-speed).
When the DPRPU or DMRPU bit is set to 0 during communication with the PC, the USB module disables the pull-up
resistor of the USB data line, thus notifying the USB host of disconnection.
When the host controller is selected, set the DRPD bit and pull down the D+ and D– lines.
Table 32.11 Controlling USB Data Bus Resistors
Settings Controlling USB Data Bus Resistors
DRPD DPRPU DMRPU D– D+ Remarks
000OpenOpenWhen not used
010OpenPull-upWhen operating as the function controller (full-speed)
001Pull-upOpenWhen operating as the function controller (low-speed)
100Pull-downPull-downWhen operating as the host controller
Other than above Setting prohibited