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 https://github.com/libopencm3/libopencm3-examples/pull/192
This commit is contained in:
@@ -238,7 +238,7 @@ int main(void)
|
|||||||
|
|
||||||
usbd_device *usbd_dev;
|
usbd_device *usbd_dev;
|
||||||
|
|
||||||
rcc_clock_setup_in_hsi_out_48mhz();
|
rcc_clock_setup_in_hse_8mhz_out_72mhz();
|
||||||
|
|
||||||
rcc_periph_clock_enable(RCC_GPIOC);
|
rcc_periph_clock_enable(RCC_GPIOC);
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rcc_clock_setup_in_hsi_out_48mhz();
|
rcc_clock_setup_in_hse_8mhz_out_72mhz();
|
||||||
|
|
||||||
rcc_periph_clock_enable(RCC_GPIOC);
|
rcc_periph_clock_enable(RCC_GPIOC);
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rcc_clock_setup_in_hsi_out_48mhz();
|
rcc_clock_setup_in_hse_8mhz_out_72mhz();
|
||||||
|
|
||||||
rcc_periph_clock_enable(RCC_GPIOA);
|
rcc_periph_clock_enable(RCC_GPIOA);
|
||||||
rcc_periph_clock_enable(RCC_AFIO);
|
rcc_periph_clock_enable(RCC_AFIO);
|
||||||
|
|||||||
Reference in New Issue
Block a user