Skip to main content
Associate
February 21, 2026
Solved

STM32H753XIH6 port K alternate functions TIM1 and TIM8 not working

  • February 21, 2026
  • 1 reply
  • 145 views

SYS CONFIG

===========================================

IO Supplys = 3,3V, VCORE = 2,5V regulator used, FSystem = 200 MHz

Timer1 is configured for Output Compare CH1, sig 0.1MHz 50% duty expected (all necessary clk enabled)

Compare SIG is routed to PK1 via alternate conf 

__HAL_RCC_GPIOK_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
HAL_GPIO_Init(GPIOK, &GPIO_InitStruct);
After exec of this routine, PK1(J15) pin is in floating mode (1V because of 2Meg external pull-up to supply) .

Same signal routed to another port/same load with same routine is working properly 

Same problem and behavior with TIM8 witch can use the same PK1 pin

Note1 : if internal pull-up or pulldown added to pin conf, the pin is no longer floating, Hi(3,3V) for pull-up, Low(0,1V) for pulldown but still no signal output (input mode supposed) 

Note2 : The fact pull mode is reflected to pin when changed implies no addressing error. Output should be Hi or Low for compare output

Note3 : This same pin used as Output (no alternate function) works properly

Note4 : Same PK1 behavior when writing directly into GPIOK.AFRL register with emulator (floating when TIM1 (0x10) or TIM8 (0x30)). Normal output when 0...

===========================================

It seems the alternate functions may not be routed to port K but IDE software and doc say they can... 

Please HELP as this problem implies a very hight modification cost (10 layer board, BGA...)

Best answer by mƎALLEm

Hello @serge_stm32dev and welcome to the ST community,

1- In next time please use </> button to share the code. Your post will be edited to follow this community rule.

2- Check if the IO is not broken by simply toggling it using HAL_GPIO_TogglePin()

3- I also invite you to use CubeMx to configure and generate your code at least for tests.

1 reply

mƎALLEm
mƎALLEmBest answer
Technical Moderator
February 21, 2026

Hello @serge_stm32dev and welcome to the ST community,

1- In next time please use </> button to share the code. Your post will be edited to follow this community rule.

2- Check if the IO is not broken by simply toggling it using HAL_GPIO_TogglePin()

3- I also invite you to use CubeMx to configure and generate your code at least for tests.

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