Author Topic: STM 32F4 PA0/WKUP pin and TIM5 - what are the gotchas?  (Read 2208 times)

0 Members and 1 Guest are viewing this topic.

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 3700
  • Country: gb
  • Doing electronics since the 1960s...
STM 32F4 PA0/WKUP pin and TIM5 - what are the gotchas?
« on: December 14, 2021, 07:22:57 pm »
I have been reading the RM and various stuff online about this, and wonder what the issues are with PA0 if the 32F4 is not used in any low power modes.

On my board, PA0 is set up to be an input with a pulldown, but it otherwise unused because we could not work out the full extent of the limitations. I would like to use it with TIM5 (CH1, via AF2) which is handy because it is a 32-bit timer.

CH1 can be an input or an output so you can use it for PWM etc.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5913
  • Country: es
Re: STM 32F4 PA0/WKUP pin and TIM5 - what are the gotchas?
« Reply #1 on: December 14, 2021, 09:01:38 pm »
I don't get it?
It's very much like a normal GPIO, with the exception that it can be used to wake up the stm32 while in sleep mode.
If configured for that, the pin won't be disabled when the stm32 goes into deep sleep state.
In running state there would be no limitations at all? Have you actually tried to use it as TIM5 CH1?
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 3700
  • Country: gb
  • Doing electronics since the 1960s...
Re: STM 32F4 PA0/WKUP pin and TIM5 - what are the gotchas?
« Reply #2 on: December 15, 2021, 06:02:23 am »
I have not tried it because it could be working "by luck" :)

Also, the timers are complex so something might not be working for multiple reasons.

But from what you say it is simple. The data sheet talks a lot about PA0 and the onboard voltage regulator, etc. and it doesn't sound totally simple.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5913
  • Country: es
Re: STM 32F4 PA0/WKUP pin and TIM5 - what are the gotchas?
« Reply #3 on: December 15, 2021, 10:19:22 am »
What F4?
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 3700
  • Country: gb
  • Doing electronics since the 1960s...
Re: STM 32F4 PA0/WKUP pin and TIM5 - what are the gotchas?
« Reply #4 on: December 15, 2021, 12:49:19 pm »
Sorry - STM 32F417
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8178
  • Country: fi
Re: STM 32F4 PA0/WKUP pin and TIM5 - what are the gotchas?
« Reply #5 on: December 15, 2021, 02:36:39 pm »
I don't see any issue.

I understand your concern, I myself feel like validating every normal thing I do on STM32 because always there is a gotcha somewhere, or outright silicon bug, documented or non-documented.

But you have to draw the line somewhere, you need to assume that the alternative functions listed in the pin mapping section of the datasheet means those alternative functions actually work.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 3700
  • Country: gb
  • Doing electronics since the 1960s...
Re: STM 32F4 PA0/WKUP pin and TIM5 - what are the gotchas?
« Reply #6 on: December 16, 2021, 06:32:39 am »
Thank you :)

The data could directly state that PA0 is a GPIO pin unless low power modes are used, but it doesn't say that.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf