Skip to content

Commit e4324fa

Browse files
Fixed issue with GD32 USB reset time being too short, and not enumerating on some PCs
1 parent 71e8282 commit e4324fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

STM32F1/variants/generic_gd32f103c/wirish/boards_setup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ namespace wirish {
9696
gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_OUTPUT_PP);
9797
gpio_write_bit(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit,0);
9898

99-
for(volatile unsigned int i=0;i<256;i++);// Only small delay seems to be needed, and USB pins will get configured in Serial.begin
99+
for(volatile unsigned int i=0;i<512;i++);// Only small delay seems to be needed, and USB pins will get configured in Serial.begin
100100
gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_INPUT_FLOATING);
101101
#endif
102102
Serial.begin();// Roger Clark. Changed SerialUSB to Serial for Arduino sketch compatibility

0 commit comments

Comments
 (0)