Skip to content

Commit 90262eb

Browse files
committed
stm32-h103: use proper HSE for USB
HSI is out of spec for reliable USB operation, even though it sometimes works. stm32-h103 board has an 8Mhz external crystal which should therefore be used for any USB work. Originally reported as #192
1 parent f9713ff commit 90262eb

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/stm32/f1/stm32-h103/usb_cdcacm/cdcacm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ int main(void)
238238

239239
usbd_device *usbd_dev;
240240

241-
rcc_clock_setup_in_hsi_out_48mhz();
241+
rcc_clock_setup_in_hse_8mhz_out_72mhz();
242242

243243
rcc_periph_clock_enable(RCC_GPIOC);
244244

examples/stm32/f1/stm32-h103/usb_dfu/usbdfu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ int main(void)
258258
}
259259
}
260260

261-
rcc_clock_setup_in_hsi_out_48mhz();
261+
rcc_clock_setup_in_hse_8mhz_out_72mhz();
262262

263263
rcc_periph_clock_enable(RCC_GPIOC);
264264

examples/stm32/f1/stm32-h103/usb_iap/usbiap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ int main(void)
259259
}
260260
}
261261

262-
rcc_clock_setup_in_hsi_out_48mhz();
262+
rcc_clock_setup_in_hse_8mhz_out_72mhz();
263263

264264
rcc_periph_clock_enable(RCC_GPIOA);
265265
rcc_periph_clock_enable(RCC_AFIO);

0 commit comments

Comments
 (0)