2021-11-22 02:28 PM
Please tell me why the wakeup pin numbers are shifted up by one in the HAL PWR lib?
If there is a legitimate reason for this mapping, then why is it not documented anywhere? I had to infer the mapping and test it by trial and error.
Solved! Go to Solution.
2022-11-25 01:24 AM
Dear all,
The correct wake-up pins assignment is as the following:
WKUP1 -> PA0
WKUP2 -> PA2
WKUP3 -> PI8
WKUP4 -> PC13
WKUP5 -> PI11
WKUP6 -> PC1
No more WKUP0.
The datasheet with this update will be released soon.
SofLit
2021-11-22 02:57 PM
The reference manual lists wake up sources as 1-6 and pins as 0-5.
It is documented in the RM, but it would be less confusing if they shared the same numeric base as they do for other interrupt sources. It's also unclear to the CubeMX user what "Wake-up 0" means.
2021-11-22 03:41 PM
I'm waking from Standby, not firing an interrupt. Is the information on the NVIC even directly relevant?
The HAL PWR library only refers to pins. "PWR_WAKEUP_PIN4", "HAL_PWR_DisableWakeUpPin()" etc. This is misleading as these defines and functions actually refer to what? Signals? The HAL docs seem to be machine generated and do not say.
I found a few blog posts with examples of how to do it and even ST's example code. Nowhere was there any mention of this little twist.
2021-11-22 03:48 PM
I still think it is a bug because the HAL libraries explicitly say "pin". At the very least it is a documentation problem. Are you listening ST? I'm new to the ST MCU ecosystem and this is about the third time I've hit a blocker in a last couple of months due to inadequate or vague documentation. I would really think twice before specifying an ST MCU in a system now.
2021-11-24 08:30 AM
Hello @FColl.1 ,
First lest me thank you for having reporting.
Actually as you've already mentioned, CubeMX matches the Data Sheet pin assignment and naming . With this being said, I'll raise your point internally to see how we can address a modification in the interface to make it clearer for the user.
Otherwise, I'm adding @Imen DAHMEN to review from her side the problem related to the HAL library and confirm the issue.
Sorry for any inconvenience that this may cause.
Khouloud.
2021-11-25 07:36 AM
Hello @FColl.1 ,
Thank you for your feedback and sorry for the inconvenience it may cause.
I can understand your frustration with the confusion of wakeup pin numbers and I escalated this HAL issue to the appropriate team to take the necessary action.
I would also like to bring to your attention, that there is a known typo in the H7 datasheets:
A swap between PI8 and PC13
So, the STM32H7 datasheets will be updated in the Table Pin/ball definition, as below:
1) PI8 replace "WKUP3" by "WKUP2"
2) PC13 replace "WKUP2" by "WKUP3"
Thank you for your understanding.
Imen
2021-11-25 12:34 PM
@Imen DAHMEN @Khouloud OTHMAN Thankyou for your responses. I apologise if I was grumpy! I will also be using PC13 to wake from standby so that was very timely information.
2021-11-25 11:10 PM
@FColl.1 , all your feedback are welcome in order to improve our products/solutions :)
Imen
2022-11-25 01:24 AM
Dear all,
The correct wake-up pins assignment is as the following:
WKUP1 -> PA0
WKUP2 -> PA2
WKUP3 -> PI8
WKUP4 -> PC13
WKUP5 -> PI11
WKUP6 -> PC1
No more WKUP0.
The datasheet with this update will be released soon.
SofLit