wuxx / nanoCH32V305

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nanoCH32V305

中文

Introduce

nanoCH32V305 is a development board made by MuseLab based on WCH CH32V305RBT6 with Dual TYPE-C USB interfaces, LCD interface and SD card interface onboard, can be programmed through the USB port, which is convenient for prototype verification and development.

1 2 4

Feature

  • Dual USB interface, USB1 is USB-FS device, USB2 is USB-HS device
  • Can be downloaded directly via USB without additional downloader
  • Onboard 8MHz and 32.768K crystal oscillator
  • FPC-12P cable interface, can support common LCD (such as ili9341, st7789, etc.)
  • SD card slot, support SD card reading and writing (SPI protocol)

Chip Resources

CH32V305RBT6

How To Use

MounRiver Studio IDE

WCH officially provides MounRiver Studio IDE development environment, which supports Windows/Linux/Mac. The instructions are as follows

MounRiver Studio Download

download the MounRiver Studio IDE from the official website MounRiver Studio, and just select the latest version to download.

Compile

Take the GPIO project as an example, double-click GPIO_Toggle.wvproj to open the project MRS-1 MRS-2
Click Project -> Build Project to compile the project
MRS-3

Program

If use WCH's official downloader WCHLink, click Flash -> Download to program the flash. If you use the USB1 port for program, the operation instructions are as follows
Note: The compiled binary file is located in the obj directory of the project, such as EVT\EXAM\GPIO\GPIO_Toggle\obj\GPIO_Toggle.hex

WCHISPStudio Download

download WCHISPStudio at WCH Official Website

WCHISPStudio Config

ISP-2

The chip series select CH32V30x series, the chip model select CH32V305RBT6, and the download method select USB. Keep pressing the BOOT button on the development board, then press and release the RST button, and finally release the BOOT button to make the chip enter the bootloader. If the bootloader is successfully entered, the target can be detected in the USB device list in the WCHISPStudio. Then select the bin or hex file to be programmed, and click Download to burn the firmware.

Open Source Toolchain

Toolchain Download

Download the RISC-V toolchain https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases to the local, then modify ~/.bashrc and import it into environment variables, for example as follows

export PATH=${PATH}:/home/pi/tool/xpack-riscv-none-embed-gcc-10.2.0-1.2/bin

Compile

$git clone https://github.com/wuxx/CH32V305-makefile-example
$cd CH32V305-makefile-example
$make

Program

use the open source download tool wchisp to program the flash, the operation is as follows
wchisp is a tool written in rust, first update rustc

$rustc -V
$rustup update

install wchisp

$cargo install wchisp --git https://github.com/ch32-rs/wchisp

Press and hold the BOOT button on the development board, then press the RST button and release, and finally release the BOOT button to make the chip enter the bootloader, and then call wchisp to program

$sudo /home/pi/.cargo/bin/wchisp info
$sudo /home/pi/.cargo/bin/wchisp flash ./build/app.bin

Product Link

Aliexpress Tindie

Reference

WCH

https://www.wch.cn/

About