Closed prairielandelec closed 3 months ago
I think you're missing some driver. In my Windows 11 system I see both a USB Serial COM port and under Interfaces a WCH-LinkRV device. The latter I believe handles the SWIO pin for programming and real-time debugging, while the COM port allows showing output from Serial.println() and input via Serial.read(). (For flashing the chip the debugging port is used).
It would appear that is the case, I could not find any instructions in this repo and scant documentation in general. My understanding was that the WCH-LinkE utilized the OpenOCD drivers to some degree. I was looking through the Platoform IO Platform for this chip and saw the following section of their documentation: https://pio-ch32v.readthedocs.io/en/latest/installation.html#install-drivers-rules
I tried this driver on a spare laptop I had and it seemed to get things working. Biggest difference was seeing the WCH-Link interface appear in the "interfaces" section of device manager. I was able to program the following to the chip:
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
}
The verification check seemed to pass just fine, however I do not see the output toggling on any of the pins. Is there any documentation on the pin naming? From what I can tell from other examples I have configured everything correctly.
Just trying to pinpoint if this is a problem with the flashing process, the code, or the chip on my dev board.
Thanks for the help!
There are some cheat sheets that show the pinouts of the various chips. For the F4P6 I made a PDF out of the image I found somewhere: ch32v003f4p6_pinout.pdf
Usually I use pin names such as PC1, PA1, etc. Have fun!
When using wch-linke, it is important to ensure that the driver for wch-linke is installed correctly and that its firmware version is the latest. This can be done through the "WCH LinkUtility" tool to install the driver and update the firmware. https://www.wch.cn/downloads/WCH-LinkUtility_ZIP.html
In addition to using pinout diagrams similar to those provided by maxint-rd, there is also an imperfect way to query through the file "variantCH32V003F4.cpp" and the RM
Just got a CH32C0003F4P6-Ro-1v1 and a WCH-LinkE-Ro-1v1 and am attempting to upload a test sketch.
First I installed the board packed per the instructions in this repo
I have connected SWDIO to PD1 on the dev board as well as 3v3 and GND and RX to PD5
When I look at Device manager there is a USB Serial Device and an unknown device WCH-Link
I select the USB Serial Device as the port in the Arduino IDE and the CH32V00x as the board and put in a simple blink test.
When I click "upload" I get the following:
Is this just a faulty WCH-LinkE? Or am I missing some step of the initial configuration process? The bin builds just fine but after this error shows up nothing happens.
Thanks!