Hi,
In CH32V003, PD1 and SWIO are assigned to the same pin, and whether it behaves as GPIO or SWIO is determined by the setting of the built-in register of muc.
In $/system/CH32V00x/USER/system_ch32v00x.c, PD1 is configured to act as gpio as shown below.
RCC->APB2PCENR |= RCC_AFIOEN;
AFIO->PCFR1 |= (1<<15);
Therefore, once you write a sketch to CH32V003, you will never be able to write a sketch to it again.
When developing using the Arduino IDE, most people will likely write sketches multiple times, so this behavior is unacceptable.
I would like this corrected.
Thanks.