Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(c0): enable usb #2584

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14013,6 +14013,14 @@ Eval.menu.xusb.HS.build.usb_speed=-DUSE_USB_HS
Eval.menu.xusb.HSFS=High Speed in Full Speed mode
Eval.menu.xusb.HSFS.build.usb_speed=-DUSE_USB_HS -DUSE_USB_HS_IN_FS

GenC0.menu.usb.none=None
GenC0.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART)
GenC0.menu.usb.CDCgen.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC
GenC0.menu.usb.CDC=CDC (no generic 'Serial')
GenC0.menu.usb.CDC.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB
GenC0.menu.usb.HID=HID (keyboard and mouse)
GenC0.menu.usb.HID.build.enable_usb={build.usb_flags} -DUSBD_USE_HID_COMPOSITE

GenF0.menu.usb.none=None
GenF0.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART)
GenF0.menu.usb.CDCgen.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC
Expand Down Expand Up @@ -14086,6 +14094,14 @@ GenF7.menu.xusb.HS.build.usb_speed=-DUSE_USB_HS
GenF7.menu.xusb.HSFS=High Speed in Full Speed mode
GenF7.menu.xusb.HSFS.build.usb_speed=-DUSE_USB_HS -DUSE_USB_HS_IN_FS

GenG0.menu.usb.none=None
GenG0.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART)
GenG0.menu.usb.CDCgen.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC
GenG0.menu.usb.CDC=CDC (no generic 'Serial')
GenG0.menu.usb.CDC.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB
GenG0.menu.usb.HID=HID (keyboard and mouse)
GenG0.menu.usb.HID.build.enable_usb={build.usb_flags} -DUSBD_USE_HID_COMPOSITE

GenG4.menu.usb.none=None
GenG4.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART)
GenG4.menu.usb.CDCgen.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC
Expand All @@ -14099,14 +14115,6 @@ GenG4.menu.xusb.HS.build.usb_speed=-DUSE_USB_HS
GenG4.menu.xusb.HSFS=High Speed in Full Speed mode
GenG4.menu.xusb.HSFS.build.usb_speed=-DUSE_USB_HS -DUSE_USB_HS_IN_FS

GenG0.menu.usb.none=None
GenG0.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART)
GenG0.menu.usb.CDCgen.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC
GenG0.menu.usb.CDC=CDC (no generic 'Serial')
GenG0.menu.usb.CDC.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB
GenG0.menu.usb.HID=HID (keyboard and mouse)
GenG0.menu.usb.HID.build.enable_usb={build.usb_flags} -DUSBD_USE_HID_COMPOSITE

GenH5.menu.usb.none=None
GenH5.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART)
GenH5.menu.usb.CDCgen.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC
Expand Down
3 changes: 3 additions & 0 deletions variants/STM32C0xx/C071R(8-B)T/generic_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ WEAK void SystemClock_Config(void)
LL_RCC_HSI_Enable();
while (LL_RCC_HSI_IsReady() != 1) {
}
LL_RCC_HSI48_Enable();
while (LL_RCC_HSI48_IsReady() != 1) {
}

LL_RCC_HSI_SetCalibTrimming(64);
LL_RCC_SetHSIDiv(LL_RCC_HSI_DIV_1);
Expand Down
3 changes: 3 additions & 0 deletions variants/STM32C0xx/C071R(8-B)T/variant_NUCLEO_C071RB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ WEAK void SystemClock_Config(void)
LL_RCC_HSI_Enable();
while (LL_RCC_HSI_IsReady() != 1) {
}
LL_RCC_HSI48_Enable();
while (LL_RCC_HSI48_IsReady() != 1) {
}

LL_RCC_HSI_SetCalibTrimming(64);
LL_RCC_SetHSIDiv(LL_RCC_HSI_DIV_1);
Expand Down