cancel
Showing results for 
Search instead for 
Did you mean: 

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

choro
Associate

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?

1 ACCEPTED SOLUTION

Accepted Solutions
S.Ma
Principal

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.

View solution in original post

3 REPLIES 3
S.Ma
Principal

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.

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

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?