PLL Ready Interrupt not firing as expected
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-18 7:06 AM
Posted on November 18, 2016 at 16:06
STM32L053R8 (Nucleo dev board)
When setting the PLL state in HAL_RCC_OscConfig, rather than sit in a while loop waiting for RCC_CR_PLLRDY I want to enter sleep mode and wake based on the PLL ready interrupt. I have a locally modified version of HAL_RCC_OscConfig which (A) clears the flag (if set, which it isn't), (B) enables the interrupt, (C) disables systick (to stop systick from waking it), (D) enter sleep mode: (A) RCC->CICR |= RCC_CICR_PLLRDYC; (B) __HAL_RCC_ENABLE_IT(RCC_IT_PLLRDY); (C) SysTick->CTRL = 0; (D) HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI); I was expecting it to hit an interrupt when the PLL is set and then leap out of sleep mode back into normal operation. I have tried waiting for RCC_IT_PLLRDY (E) and that works but I want to be in a lower power state while the PLL settles. (E) while ((RCC->CR & RCC_CR_PLLRDY) == 0); I have tried leaving systick enabled and that makes no difference. I have RCC_IRQHandler() declared in the same file as RTC_IRQHandler() and EXTI2_3_IRQHandler() but it is never hit. I suspect/hope I am missing something simple and obvious. Has anyone successfully used the PLL ready interrupt? Are there any examples people are aware of that would help me to determine what I have done wrong? #stm32l0-pll #pll #stm32l0xx
Labels:
- Labels:
-
STM32L0 Series
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-18 8:36 AM
Posted on November 18, 2016 at 17:36
Not using the L0, do you get the interrupt if you don't sleep the core? How long do you see the PLL taking to lock?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-18 10:29 AM
Posted on November 18, 2016 at 19:29
Wait for PLL ready in state where all clock are off? GOOD IDEA.
this will never workOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-21 2:15 AM
Posted on November 21, 2016 at 11:15
Thank you for the clear reply.
It had been suggested to me as a way to save power while waiting. I'll look down other avenues.