diff --git a/variants/MINIMA/variant.cpp b/variants/MINIMA/variant.cpp index 02c48b595..794854bdf 100644 --- a/variants/MINIMA/variant.cpp +++ b/variants/MINIMA/variant.cpp @@ -79,6 +79,11 @@ void usb_post_initialization() { ((R_USB_FS0_Type*)R_USB_FS0_BASE)->USBMC_b.VDCEN = 1; } +void enableSubclockInputPins() { + R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_CGC); + R_SYSTEM->SOSCCR_b.SOSTP = 1; + R_BSP_RegisterProtectEnable(BSP_REG_PROTECT_CGC); +} void initVariant() { // bootloader configures LED_BUILTIN as PWM output, deconfigure it to avoid spurious signals diff --git a/variants/UNOWIFIR4/variant.cpp b/variants/UNOWIFIR4/variant.cpp index dddc5415f..91542247d 100644 --- a/variants/UNOWIFIR4/variant.cpp +++ b/variants/UNOWIFIR4/variant.cpp @@ -108,6 +108,12 @@ void usb_post_initialization() { ((R_USB_FS0_Type*)R_USB_FS0_BASE)->USBMC_b.VDCEN = 1; } +void enableSubclockInputPins() { + R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_CGC); + R_SYSTEM->SOSCCR_b.SOSTP = 1; + R_BSP_RegisterProtectEnable(BSP_REG_PROTECT_CGC); +} + void initVariant() { __maybe_start_usb(); // bootloader configures LED_BUILTIN as PWM output, deconfigure it to avoid spurious signals