Skip to main content
choro
Associate
December 28, 2018
Solved

The PF0 pin of STM32F030R8T6 can't use interrupt function?

  • December 28, 2018
  • 2 replies
  • 972 views

I use STM32cubeMX tool, generate interrupt function, compile and program successful in Keil V5. But this function doesn't work. How to solve the question?

This topic has been closed for replies.
Best answer by S.Ma

Are we talking of EXTI interrupt source? Checklist:

  • If PF0 is used other than GPIO, in CubeMX, EXTI and peripheral Alternate Function don't work as stacked pin. The direct HW register programming works fine.
  • If other GPIO port 0 is used: In EXTI you can't have say PB0 and PF0 as interrupt source. Only one per pin number.
  • Run the debugger, run the code, stop it and view the EXTI/GPIO registers manually. Modify manually the registers then let the code run to see if you find the culprit. Avoids lots of guessless recompile cycles.

2 replies

S.Ma
S.MaAnswer
Principal
December 28, 2018

Are we talking of EXTI interrupt source? Checklist:

  • If PF0 is used other than GPIO, in CubeMX, EXTI and peripheral Alternate Function don't work as stacked pin. The direct HW register programming works fine.
  • If other GPIO port 0 is used: In EXTI you can't have say PB0 and PF0 as interrupt source. Only one per pin number.
  • Run the debugger, run the code, stop it and view the EXTI/GPIO registers manually. Modify manually the registers then let the code run to see if you find the culprit. Avoids lots of guessless recompile cycles.
choro
choroAuthor
Associate
January 2, 2019

Thanks a lot.

In last week, I check the schematic of STM32 Nucleo-64 development board with STM32F030R8 MCU, found the pin connect to the MCO pin of ST-Link, I guess that it is the cause of the question. But I don't understand the function of the MCO pin?

waclawek.jan
Super User
December 28, 2018

In addition to KIC's checklist, PF0 is OSC_IN, so if HSE is switched on (see Using the HSE or LSE oscillator pins as GPIOs subchapter in RM), it is unavailable for any other use.

JW