cancel
Showing results for 
Search instead for 
Did you mean: 

HAL PWR Wakeup PINS do not match datasheet and cubemx.

FColl.1
Associate III

Please tell me why the wakeup pin numbers are shifted up by one in the HAL PWR lib?

See.. https://community.st.com/s/question/0D53W00001DKQdnSAH/wake-from-standby-not-working-stm32h753iit6?t=1637613024141

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.

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

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

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.

View solution in original post

8 REPLIES 8
TDK
Guru

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.

0693W00000GYVQCQA5.png 

0693W00000GYVQbQAP.png

If you feel a post has answered your question, please click "Accept as Solution".
FColl.1
Associate III

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.

FColl.1
Associate III

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.

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.

Imen.D
ST Employee

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

  • PI8 = WKUP2
  • PC13 = WKUP3

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
FColl.1
Associate III

@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.

@FColl.1​ , all your feedback are welcome in order to improve our products/solutions :)

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
SofLit
ST Employee

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

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.