cancel
Showing results for 
Search instead for 
Did you mean: 

Is there mistake in datasheet?

Vmere.1
Senior

My fellow student says TIM12 has 2 channels and PH9 is configured for TIM12 channel 2 as per the below datasheet.

https://www.st.com/resource/en/datasheet/stm32h743vi.pdf

Now I argue that the tim12 channel 2 is configured to PB15.0693W00000KZyjpQAD.pngAnd he stupidly configured this way.

"""

 GPIO_InitStruct.gpio_port    = GPIOH;

 GPIO_InitStruct.configure.Pin  = GPIO_PIN_9;

 GPIO_InitStruct.configure.Mode = GPIO_MODE_AF_PP;

 GPIO_InitStruct.configure.Pull = GPIO_NOPULL;

 GPIO_InitStruct.configure.Speed = GPIO_SPEED_FREQ_LOW;

 GPIO_InitStruct.configure.Alternate = GPIO_AF2_TIM12;

"""

Who is right and who is wrong? is PH9 (my friends) or PB15 correct?

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @Vmere.1​ ,

Thanks for your feedback,

As @MM..1​  and @TDK​  mentioned, both pins support TIM12_CH2 signal. So using PH9 or PB15 for TIM2_CH2 is correct.

In CubeMX, the default pin that is set to TIM12_CH2 is PB15 but it is possible to change it to PH9. Please check this article on How to remap an alternate function from one GPIO to another using STM32CubeMX

Saying that PB15 is reserved for another signal, in this case CubeMX will automatically use PH9.

I hope this helps !

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

View solution in original post

3 REPLIES 3
MM..1
Chief II

Signal on pinout have more alternative, here two both right, need reconfig on wizard how you need.

TDK
Guru

The datasheet shows that both PB15 and PH9 are able to be connected to TIM12_CH2.

Nobody is wrong, except perhaps you for calling his working code stupid, but that's more opinion than fact.

If you feel a post has answered your question, please click "Accept as Solution".
Sara BEN HADJ YAHYA
ST Employee

Hello @Vmere.1​ ,

Thanks for your feedback,

As @MM..1​  and @TDK​  mentioned, both pins support TIM12_CH2 signal. So using PH9 or PB15 for TIM2_CH2 is correct.

In CubeMX, the default pin that is set to TIM12_CH2 is PB15 but it is possible to change it to PH9. Please check this article on How to remap an alternate function from one GPIO to another using STM32CubeMX

Saying that PB15 is reserved for another signal, in this case CubeMX will automatically use PH9.

I hope this helps !

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.