wagiminator / Development-Boards

Collection of various development boards for microcontrollers (e.g., CH55x, CH32, PY32, STC8, STM32) and accompanying example software.
Other
140 stars 19 forks source link

[no issue] CH32X035 : nano and pro micro replacement #3

Open trimarco232 opened 6 months ago

trimarco232 commented 6 months ago

Hi , I am planning to replace my existing nano and pro micro (AVR) with more capable MCUs , ie. the 29 pins device , in order to have enough pins ; I will design my own boards ; so I have few questions , about programming and USB : 1) I don't need PD , so can I use CC1 and CC2 as IO pins , and still use USB for bootloader and CDC ? 2) after uploading , can I put a reset button , instead of having to disconnected the board from the USB port and all voltage sources ? ( use UDP for BOOT button is good idea from WCH ) ( there is an interesting bootloader here : [https://github.com/maxgerhardt/ch32x035-arduino-usb-serial] ) 3) why two 5k1 resistors ? does it not work if one connect CC1 and CC2 together , and then only use one 5k1 resistor to connect both to 0v ? thanks for all !

wagiminator commented 6 months ago
  1. I think so.
  2. Yes, but a function must be implemented in the firmware that resets the MCU to BOOT mode when the reset button is pressed.
  3. Each CC line must have its own pulldown resistor! You may be able to omit the resistors if you are not using USB PD and you are not powering your board via a USB PD power adapter and a USB Type-C cable.