STM32L4 STOP2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-07 4:29 PM
Greetings,
I'm writing an application for an STM32L496, and I'm trying to use Stop2 mode to save power. My problem is that whenever I go into Stop2 mode, the sys tick immediately wakes up the MCU, even though I have disabled it right before. What is the right way to disable the sys tick?
Ricardo
HAL_SuspendTick();
HAL_NVIC_DisableIRQ(SysTick_IRQn); __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_MSI); __HAL_RCC_GPIOD_CLK_DISABLE(); __HAL_RCC_GPIOB_CLK_DISABLE(); __HAL_RCC_GPIOA_CLK_DISABLE(); __HAL_RCC_GPIOC_CLK_DISABLE(); __HAL_RCC_GPIOE_CLK_DISABLE(); __HAL_RCC_GPIOF_CLK_DISABLE(); HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-10 1:12 AM
Hi
,- Did you try the STOP2 example under the STM32L4 cube firmware: STM32Cube_FW_L4_V1.0\Projects\NUCLEO-L496ZG\Examples\PWR\PWR_STOP2
To disable the
Systick interrupt:
/* Enter STOP 2 mode */HAL_SuspendTick();HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);HAL_ResumeTick();�?�?�?�?
-Nesrine-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-14 5:57 PM
Hi Nesrine,
I did try that example. I think the issue is related to the fact that I am using FreeRTOS with the timebase set to TIM4. This causes CubeMX to generate those functions you mentioned to start and stop TIM4, but the actual SysTick interrupt still fires.
It turns out that in order to meet other system requirements I'm going to use STANDBY mode instead of STOP2, so this is not a concern at the moment.
Thanks,
Ricardo
