5 ms·
My alpha Pico-based CH32V003 debug tool is ready for a few testers
- aappleby 3y agoThe CH32V003 is a 10-cent RISC-V microcontroller with a proprietary single-wire debug interface and a corresponding proprietary debug dongle + modified version of OpenOCD. My tool replaces the dongle and OpenOCD with a Pico-based GDB remote host. You can debug and flash a CH32V003 with just a Pico, one pull-up resistor, and gdb-multiarch. Basic testing on the included example app seems to work, and the code should be stable enough to handle a few testers. If you're interested in the CH32V003 and have a Pico on hand, give it a try. -Austin
- krasin 3y agoThank you for this work, Austin. I was looking to try CH32V003, but I was unsure about the toolchain. Thank you for making it better. Edit: any recommendations of a CH32V003 dev board?
- aappleby 3y agoThe official dev boards are available on AliExpress for under $10. You can also get them off Tindie, I believe.
- krasin 3y agoThanks! Ordered. For the benefits of others, these are the product pages on Aliexpress and Tindie: https://www.aliexpress.us/item/3256804778040328.html https://www.aliexpress.us/item/3256804778040328.html https://www.aliexpress.us/item/3256804801806865.html https://www.aliexpress.us/item/3256804801806865.html https://www.tindie.com/products/adz1122/ch32v003-risc-v-mcu-development-board/ https://www.tindie.com/products/adz1122/ch32v003-risc-v-mcu-...
- aappleby 3y agoAlso on AliExpress from the manufacturer - https://www.aliexpress.com/item/1005005269690018.html https://www.aliexpress.com/item/1005005269690018.html
- aappleby 3y agoEr, wait no this link - https://www.aliexpress.us/item/3256804709476544.html https://www.aliexpress.us/item/3256804709476544.html
- krasin 3y agoOh, thx! Sadly, I can't edit my original comment above.
- flaviut 3y agoVery cool! For now, I'm using the PY32F002A for my low-cost MCU needs, but if this project was around a few months ago, I would have had to think harder about it. I like that you've included a GDB server directly in the project, I've had way too much trouble getting a version of openocd that works properly for my pico projects, and now that's just cut out of the picture :)
- snvzz 3y agoI understand pico is cheap, versatile and overall convenient. But is there anything (besides time) stopping you from implementing this on top of e.g. linux gpio?
- aappleby 3y agoThe timing on the SWIO interface needs to be within a few hundred nanoseconds if you want decent bandwidth, but I suppose there's nothing stopping you from running it on a slower and less real-time GPIO pin. You'd just need to swap out the implementation of the PicoSWIO class, the rest would be identical.
- zamnos 3y agoThe RaspberryPi has a SMI mode that should be able to handle 62 MhZ on a single pin usefully, did you investigate using that at all?
- aappleby 3y agoI'm not familiar with that interface, but I suspect it would have similar issues with timing tolerances as just bit-banging gpios.
- zamnos 3y agoIt's a programmable, parallel data bus, like you'd get on an old school micro to access external rom and ram. It'll DMA to/from the Pi's RAM, and has programmable timings for read and write signaling, so it's not at all like bit-banging GPIOs. The only question is if it's usable for your debugger project, as it's not meant for that.
- vardump 3y agoPico is more than capable of handling timing within a few hundred nanoseconds with it's PIO (programmable IO) functionality. You don't usually ever need to bitbang with RP2040.
- 3y ago
- andrewstuart 3y agoThe bigger brother chip is the CH32V307VCT6 AUD$20 https://www.ebay.com.au/itm/304645792686 https://www.ebay.com.au/itm/304645792686 https://github.com/openwch/ch32v307 https://github.com/openwch/ch32v307 RISC-V4F processor, max 144MHz system clock frequency; Single-cycle multiplication and hardware division, hardware float point unit (FPU) ; 64KB SRAM,256KB Flash; Supply voltage: 2.5V/3.3V, GPIO unit is supplied independently; Multiple low-power modes: sleep/stop/standby; Power-on/power-down reset (POR/PDR), programmable voltage detector (PVD); 2 general DMA controllers, 18 channels in total; 4 amplifiers; Single true random number generator (TRNG) 2 x 12-bit DAC; 2-unit 16-channel 12-bit ADC, 16-channel TouchKey; 10 timers; USB2.0 full-speed OTG interface; USB2.0 high-speed host/device interface (built-in 480Mbps PHY) 3 USARTs, 5 UARTs; 2 CAN interfaces (2.0B active); SDIO interface, FSMC interface, DVP; 2 x I2C, 3 x SPI, 2 x IIS; 80 I/O ports, can be mapped to 16 external interrupts; CRC calculation unit, 96-bit unique chip ID; Serial 2-wire debug interface; Packages: LQFP64M, LQFP100.
- aappleby 3y agoI have a CH32V203 that I'll probably add support for, along with the 307 or whatever else I can get access to easily.
- unwind 3y agoVery cool, that's clearly a quite capable controller! The AUD$20 is for the full dev board, the bare chip seems to be around US$3 [1]. I've never hand-soldered anything in LQFP-100, sounds exciting! [1]: https://www.lcsc.com/products/Microcontroller-Units-MCUs-MPUs-SOCs_11329.html?keyword=CH32V307VCT6 https://www.lcsc.com/products/Microcontroller-Units-MCUs-MPU...
- mrktf 3y agoThat cool CH32V307VCT6 chip have 1GBPS ethernet MAC interface, yes 1 gigabit. For me is very interesting what is real benchmark numbers. anybody have any numbers?