drivers: hci: stm32_ipm: Add possibility to work on LSI
Use CLOCK_STM32_LSE as switch for the RF low speed clock source Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
This commit is contained in:
parent
1c4626d324
commit
535bfeb784
1 changed files with 11 additions and 0 deletions
|
@ -327,6 +327,7 @@ static void start_ble_rf(void)
|
|||
LL_RCC_ReleaseBackupDomainReset();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CLOCK_STM32_LSE
|
||||
/* Select LSE clock */
|
||||
LL_RCC_LSE_Enable();
|
||||
while (!LL_RCC_LSE_IsReady()) {
|
||||
|
@ -338,6 +339,16 @@ static void start_ble_rf(void)
|
|||
|
||||
/* Switch OFF LSI */
|
||||
LL_RCC_LSI1_Disable();
|
||||
#else
|
||||
LL_RCC_LSI2_Enable();
|
||||
while (!LL_RCC_LSI2_IsReady()) {
|
||||
}
|
||||
|
||||
/* Select wakeup source of BLE RF */
|
||||
LL_RCC_SetRFWKPClockSource(LL_RCC_RFWKP_CLKSOURCE_LSI);
|
||||
LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSI);
|
||||
#endif
|
||||
|
||||
/* Set RNG on HSI48 */
|
||||
LL_RCC_HSI48_Enable();
|
||||
while (!LL_RCC_HSI48_IsReady()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue