Skip to content

KINETIS: Add USBx_CTL_RESUME to the KL27Zxxx header - #461

Draft
shubham0x13 wants to merge 1 commit into
ChibiOS:chibios-21.11.xfrom
shubham0x13:kinetis-kl27-usbx-ctl-resume
Draft

shubham0x13 wants to merge 1 commit into
ChibiOS:chibios-21.11.xfrom
shubham0x13:kinetis-kl27-usbx-ctl-resume

Conversation

@shubham0x13

@shubham0x13 shubham0x13 commented Nov 4, 2026 •

Copy link
Copy Markdown

USBx_CTL_RESUME, used by usb_lld_wakeup_host(), is not defined in kl27zxxx.h, so KL27Zxxx builds with HAL_USE_USB enabled fail to compile. It is defined the same way in kl26z.h.

kl27zxx.h (KL27Z32/64) is not changed: its reference manual lists bit 2 of USBx_CTL as reserved.

Tested: testhal/KINETIS/KL27Z/BLINK with HAL_USE_USB set to TRUE fails before and builds after. tools/chbuild.sh passes on testhal/KINETIS and demos/KINETIS.

Found while using the KL27Zxxx device for an NXP MCXC243 board: its reference manual has the bit (bit 2 of USBx_CTL) and USB remote wakeup works on hardware.

usb_lld_wakeup_host() uses USBx_CTL_RESUME, which kl25z.h and kl26z.h
define but kl27zxxx.h did not, so KL27Zxxx builds with HAL_USE_USB
failed to compile. Use the same value as kl26z.h.
@shubham0x13
shubham0x13 force-pushed the kinetis-kl27-usbx-ctl-resume branch from 0d41eb5 to 5b04d19 Compare November 4, 2026 16:34
@shubham0x13 shubham0x13 changed the title KINETIS: Add USBx_CTL_RESUME to the KL27 headers KINETIS: Add USBx_CTL_RESUME to the KL27Zxxx header Nov 4, 2026
@shubham0x13
shubham0x13 marked this pull request as draft November 19, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant