U5 ENCODER in STOP2 does not update count
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-05 12:44 AM - edited ‎2023-12-05 12:47 AM
I'm using NUCLEO U575ZI with LPTIM1 configured as Quadrature ENCODER with 32kHz internal clock
In RUN mode peripheral works properly but when I switch in STOP2 mode peripheral doesn't count.
I can assume the peripheral is powered ON because when I exit STOP2 counter value is steel the same before entering STOP2.
I'm also using L4 and it works properly in RUN and STOP2 mode.
Any idea to solve the problem?
Alex
Solved! Go to Solution.
- Labels:
-
STM32U5 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-05 1:15 AM - edited ‎2023-12-05 1:16 AM
Hello @amoli.1
Try to set the LPTIM1AMEN bit in the RCC_SRDAMR register to enable autonomous mode in stop mode.
You can use the __HAL_RCC_LPTIM1_CLKAM_ENABLE() macro to do this.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-05 1:15 AM - edited ‎2023-12-05 1:16 AM
Hello @amoli.1
Try to set the LPTIM1AMEN bit in the RCC_SRDAMR register to enable autonomous mode in stop mode.
You can use the __HAL_RCC_LPTIM1_CLKAM_ENABLE() macro to do this.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-05 1:36 AM
WORKS!!!!!!!
Thank you so much
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-05 1:44 AM
Question:
Is there a check in CUBE_MX that can help to make this option automatically available or settable in CUBE_MX?
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-05 2:05 AM
No, that's not implemented in CubeMX
The thing is if you're using LP peripherals in STOP mode, always check to see if you should be setting bits in the RCC SmartRun domain peripheral autonomous mode register
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
