CH32V00x Evaluation Board Reference en

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

CH32V00x Evaluation Board Reference http://wch.

cn

CH32V00x Evaluation Board Reference


Version: V1.2
http://wch.cn

1. Overview
This evaluation board is applied to the development of the CH32V00x chip. The IDE uses the MounRiver
compiler, with the option of using the on-board or independent WCH-Link for emulation and download, and
provides reference examples and demonstrations of chip resource-related applications.

2. Evaluation board hardware


Please refer to the CH32V00xSCH.pdf document for the schematic of the evaluation board.
CH32V003 Evaluation

Descriptions
1.MCU 3.Power switch 5.Reset button 7.DEBUG interface
2. MCU I/O ports 4.USB interface 6.LED row pins 8. Attention

V1.2 1
CH32V00x Evaluation Board Reference http://wch.cn

The CH32V003 evaluation board shown above comes with the following resources.
Motherboard - CH32V003EVT
1. Master control MCU: CH32V003F4P6
2. MCU I/O port: I/O pinout interface of the master control MCU
3. Power switch S2: Used to disconnect or connect external 5V power supply or USB power supply
4. USB interface: power supply only, not with USB function
5. Button S1: Reset button, used for external manual reset of the master MCU, need to configure the
RST_MODE bit of the user select word register as non-11b to turn on the reset function.
6. LED: LEDs are connected to the main chip I/O port via LED row pins (P4)
7. DEBUG interface: for downloading, simulation debugging, single-wire communication, only need
SWDIO to connect PD1
8. PA1 and PA2 as crystal pins, so R4, R5 resistors are not soldered by default, P1 row of pins lead to PA1
and PA2 pins function cannot be used, if you need to use PA1 and PA2 pins as ordinary I/O, you need to
weld their own, while the need to remove Y1, C7, C8.

3. Software Development
3.1 EVT package directory structure

Description
PUB folder: Provides evaluation board manuals, evaluation board schematics.
EXAM folder: Provides software development drivers and corresponding examples for the CH32V00x
controller, grouped by peripheral. Each type of peripheral folder contains one or more functional application
routines folders.

3.2 IDE use-MounRiver


Download MounRiver_Studio, double click to install it, and you can use it after installation.
(MounRiver_Studio instructions are available at the path: MounRiver\MounRiver_Studio\
MounRiver_Help.pdf and MounRiver_ToolbarHelp.pdf)

3.2.1 Open the project


Ø Open project:
1) Double-click project file directly with the suffix name .wvproj under the corresponding project path.
2) Click File in MounRiver IDE, click Load Project, select the .project file under the corresponding path,

V1.2 2
CH32V00x Evaluation Board Reference http://wch.cn
and click Confirm to apply it.

3.2.2 Compilation
MounRiver contains three compilation options, as shown in the following figure.

Compile option 1 is Incremental Build, which compiles the modified parts of the selected project.
Compile option 2 is ReBuild, which performs a global compilation of the selected project.
Compile option 3 is All Build, which performs global compilation for all projects.

3.2.3 Download/Simulation
Ø Download
1) Debugger download
Connect to the hardware via WCH-Link (see WCH-Link instructions for details, path:
MounRiver\MounRiver_Studio\ WCH-Link instructions.pdf), click the Download button on the IDE, and
select Download in the pop-up interface, as shown in the figure below.

1 for querying the chip read protection status.


2 for setting the chip read protection and re-powering the configuration to take effect.
3 for lifting the chip read protection and re-powering the configuration to take effect.
Note: When CH32V003F4P6 evaluation board uses MRS to download the chip, only WCH-LinkE is supported
(WCH-Link is not supported).

V1.2 3
CH32V00x Evaluation Board Reference http://wch.cn
Ø Simulation
1) Toolbar description
Click Debug button in the menu bar to enter the download, see the image below, the download toolbar.

Detailed functions are as follows.


(1) Reset: After reset, the program returns to the very beginning.
(2) Continue: Click to continue debugging.
(3) Terminate: Click to exit debugging.
(4) Single-step jump-in: Each time you tap a key, the program runs one step and encounters a function
to enter and execute.
(5) Single-step skip: jump out of the function and prepare the next statement.
(6) Single-step return: return the function you jumped into
Instruction set single-step mode: click to enter instruction set debugging (need to use with 4, 5 and 6
functions).
2) Set breakpoints
Double-click on the left side of the code to set a breakpoint, double click again to cancel the breakpoint, set
the breakpoint as shown in the following figure;

3) Interface display
(1) Instruction set interface
Click on the instruction set single-step debugging can enter the instruction debugging, to single-step jump
in for example, click once to run once, the running cursor will move to view the program running, the
instruction set interface is shown as follows.

V1.2 4
CH32V00x Evaluation Board Reference http://wch.cn

(2) Program running interface


It can be used with instruction set single-step debugging, still take single-step jumping in as an example,
click once to run once, the running cursor will move to view the program running, the program running
interface is shown as follows.

4) Variables
Hover over the variable in the source code to display the details, or select the variable and right-click add
watch expression

V1.2 5
CH32V00x Evaluation Board Reference http://wch.cn
Fill in the variable name, or just click OK to add the variable you just selected to the pop-up.

5) Peripheral registers
In the lower left corner of IDE interface Peripherals interface shows a list of peripherals, tick the peripherals
will display its specific register name, address, value in the Memory window.

V1.2 6
CH32V00x Evaluation Board Reference http://wch.cn

Note:
(1) When debugging, click the icon in the upper right corner to enter the original interface.

(2) For documentation to access the compiler, click F1 to access the help documentation for detailed
instructions.

3.3 WCHISPTool.exe Download


Use WCHISPTool tool to download the chip, only support serial port download (PD5, PD6). The tool is only
used for IAP upgrade, the IAP program is cured in BOOT, users can use the tool to realize IAP upgrade by
executing jump to BOOT in the user area. The specific implementation method refers to the IAP routine in
EVT.
The WCHISPTool tool interface is shown in the following figure.

V1.2 7
CH32V00x Evaluation Board Reference http://wch.cn

1. Select MCU series and chip model


2. Select the serial port download mode
3. Identify the device, usually automatically, if it fails to identify, you need to select manually
4. Select the firmware, select the downloaded .hex or .bin target program file
5. Configure the download according to the requirements
6. Click download

3.4 WCH-LinkUtility.exe Download


The download process for the chip using the WCH-LinkUtility tool is:
1) Connect WCH-Link
2) Select chip information
3) Add firmware
4) If the chip is read protected, you need to release the chip read protection.
5) Execute
Note: When CH32V003F4P6 evaluation board uses WCH-LinkUtility tool to download the chip, only WCH-
LinkE is supported (WCH-Link is not supported).

V1.2 8
CH32V00x Evaluation Board Reference http://wch.cn

The WCH-LinkUtility tool can erase all user areas of the chip by controlling the hardware reset pins or by re-
powering the chip.
(Controlling erase by re-powering requires WCH-LinkE to power the chip; controlling erase by hardware reset
pins requires connecting the chip to the reset pins of WCH-LinkE).

Detailed inquiries/questions can be logged in the following.

V1.2 9
CH32V00x Evaluation Board Reference http://wch.cn

WCH Microelectronics Community: http://www.wch.cn/bbs/forum-106-1.html

WCH official website: http://www.wch.cn/

WCH-LINK instructions for use: https://www.wch.cn/products/WCH-Link.html

V1.2 10

You might also like