Author Topic: [STM32F407] System configuration controller clock question?  (Read 577 times)

0 Members and 1 Guest are viewing this topic.

Offline kgavionicsTopic starter

  • Regular Contributor
  • *
  • Posts: 195
  • Country: ca
[STM32F407] System configuration controller clock question?
« on: March 01, 2023, 04:33:57 pm »
Hello
AFAIK, the first step to configure external interrupts is to enable System configuration controller clock in the RCC APB2ENR register (bit 14), but to my surprise my external interrupts are working fine without enabling it!
Can someone shed some light on this subject please?
Thanks in advance
« Last Edit: March 01, 2023, 04:35:31 pm by kgavionics »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8110
  • Country: fi
Re: [STM32F407] System configuration controller clock question?
« Reply #1 on: March 01, 2023, 05:01:32 pm »
STM32 SYSCFG is a weird thing. It just seems some kind of catch-all name under which some random registers were put in absence of better placement.

I'm not surprised at all that some of these registers seem to work without enabling the SYSCFG clock. It's probably something like the SYSCFG-located EXTI configuration registers being clocked from EXTI and not SYSCFG; i.e., maybe the registers are, after all, in one place, with rest of EXTI registers (EXTI_IMR etc.). If this is the case, it's beyond me why they are documented as being part of SYSCFG, but it would be typical ST. This is just a guess though.

But don't count on it working reliably, or with every device.
 
The following users thanked this post: kgavionics

Offline kgavionicsTopic starter

  • Regular Contributor
  • *
  • Posts: 195
  • Country: ca
Re: [STM32F407] System configuration controller clock question?
« Reply #2 on: March 01, 2023, 05:22:45 pm »
Thank you for the clarification, Siwastaja!
 

Offline wek

  • Frequent Contributor
  • **
  • Posts: 486
  • Country: sk
Re: [STM32F407] System configuration controller clock question?
« Reply #3 on: March 01, 2023, 08:29:59 pm »
> my external interrupts

Let me guess: on PAx pins?

JW
 

Offline kgavionicsTopic starter

  • Regular Contributor
  • *
  • Posts: 195
  • Country: ca
Re: [STM32F407] System configuration controller clock question?
« Reply #4 on: March 01, 2023, 08:39:12 pm »
> my external interrupts

Let me guess: on PAx pins?

JW
yes!
Is there something special with GPIOA pins?
 

Offline wek

  • Frequent Contributor
  • **
  • Posts: 486
  • Country: sk
Re: [STM32F407] System configuration controller clock question?
« Reply #5 on: March 01, 2023, 08:42:28 pm »
They are selected by default in SYSCFG->EXTICRx, so you don't need to set anything in those registers.

If SYSCLK does not have clock, it means you can't set those registers, but not that they "don't work" - these in particular are pure memory-like registers which hold the value they've written, and internally they drive the EXTI input multiplexers. They hold zero after reset, and that corresponds to PAx pins in the EXTI multiplexers.

JW
 
The following users thanked this post: kgavionics, Siwastaja

Offline kgavionicsTopic starter

  • Regular Contributor
  • *
  • Posts: 195
  • Country: ca
Re: [STM32F407] System configuration controller clock question?
« Reply #6 on: March 01, 2023, 08:50:52 pm »
They are selected by default in SYSCFG->EXTICRx, so you don't need to set anything in those registers.

If SYSCLK does not have clock, it means you can't set those registers, but not that they "don't work" - these in particular are pure memory-like registers which hold the value they've written, and internally they drive the EXTI input multiplexers. They hold zero after reset, and that corresponds to PAx pins in the EXTI multiplexers.

JW
Thank you Wek for this nice explanation! That makes sense now!
« Last Edit: March 01, 2023, 11:39:00 pm by kgavionics »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf