Skip to content

Commit

Permalink
ports/stm32: Allow HSE to be a wakeup source for BLE for the WB55.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattytrentini authored and pi-anl committed Aug 2, 2024
1 parent d1685a3 commit b28128a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ports/stm32/rfcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,12 @@ void rfcore_init(void) {
while (LL_HSEM_1StepLock(HSEM, CFG_HW_PWR_STANDBY_SEMID)) {
}

// Select LSE as RF wakeup source
// Set the wakeup source to LSE or fall back to use HSE
#if MICROPY_HW_RTC_USE_LSE
RCC->CSR = (RCC->CSR & ~RCC_CSR_RFWKPSEL) | 1 << RCC_CSR_RFWKPSEL_Pos;
#else
RCC->CSR = (RCC->CSR & ~RCC_CSR_RFWKPSEL) | 3 << RCC_CSR_RFWKPSEL_Pos;
#endif

// Initialise IPCC and shared memory structures
ipcc_init(IRQ_PRI_SDIO);
Expand Down

0 comments on commit b28128a

Please sign in to comment.