0
\$\begingroup\$

I've studied and worked with STM32F407 during the spring, and I was wondering about the rationale behind how it organizes external interrupts. To understand this, it would be beneficial if I could understand how it works at the hardware level, how signals from pins are wired to EXTI interrupt lines. I assume multiplexers are used, and that is what I want to ask about.

I assume there are general trends across how microcontrollers or computers solve external interrupts, so answers do not have to specifically be about STM32F407 (if schematics for it happen to be hard to find), but I'll use it as a reference in my question.

The EXTI system has 16 interrupt lines, EXTI0 to EXTI 15, and each can interface the corresponding pin in any of the GPIO ports, of which there are roughly 10 (9 or 11 depending on exact version of STM32F4**), I will use 10 here. So each EXTI line has to be able to select one of 10 signals. I would assume it uses a multiplexer with 10 inputs and one output for that.

The configuration for what GPIO port an EXTI line should use, is done in SYSCFG in 4 bit registers, I assume these registers are used as selection input to the multiplexers.

What I want to ask is, is 16 multiplexers likely used for the 10 GPIO ports to route the pin from the desired port to the EXTI line?

Follow-up question if anyone is interested

If yes, is the reason they only allow the corresponding pin for an EXTI line, instead of any pin to any EXTI line, that the latter would require multiplexers with 160 inputs instead of 10, and 8 bit selection inputs, and that this is a lot of added parts?

Or is there some other rationale for why they use the pin_x to line_x mapping?

\$\endgroup\$
11
  • \$\begingroup\$ What kind of answer do you expect? If you want a generic explanation, I'm afraid that the question is too broad. If you want a specific answer for the STM32F407, the reference manual (you read it, didn't you?) has a lot to say. In the latter case, why did the RM not help you, what specific detail is left open? Please edit your question and clarify. \$\endgroup\$ Commented Aug 2, 2023 at 6:02
  • \$\begingroup\$ I think I cover that in question already. Datasheets and reference manual typically cover absolute minimum user needs to know, the rest is proprietary. If I had a schematic I would not have asked here. Is that not well know, why would I have to clarify it? I have no experience with how GPIO pins may interface EXTI, so, it is reasonable to ask on a hardware Q&A where people may have experience with it. And, general solutions usually exist and trends exist. I can't really see a good way to do it besides multiplexers but maybe there is, and someone with experience would know that straight away. \$\endgroup\$ Commented Aug 2, 2023 at 15:52
  • \$\begingroup\$ What makes you think that chip designers follow trends? In these days there is a lot of abstract hardware description, which separates the designer from the final result. When is a multiplexer a multiplexer for you? If the programming model of the data sheet shows it? If you could spot transistors in the silicon, building gates that resemble the typical school multiplexer? I would not expect that. And why is it important for you to know whether there are multiplexers or not? The relevant thing is the programming model of the specific microcontroller. \$\endgroup\$ Commented Aug 2, 2023 at 17:58
  • \$\begingroup\$ my impression is that in anything engineered, ever, in the history of mankind, there are trends. You have already asked why I did not look at the RM, while anyone knows it does not cover proprietary detail. A multiplexer is a multiplexer when you route one of multiple signals to an output, this is also not something I should need to clarify, is it? \$\endgroup\$ Commented Aug 2, 2023 at 18:01
  • 1
    \$\begingroup\$ @BipedalJoe - If you disagree with closure of a question, the process is here. I have left your one allowed comment - I don't think it's constructive enough to help you, but (within the limits of the CoC) it's allowed. You are not allowed to to use vulgar language (so 1 comment deleted), nor is this the correct place to criticise standard SE model about VTC (so another comment deleted). If you want to petition to change SE policy, write a post on Meta.SE. If you want to politely question the closure of your question, ask on our Meta. Do not reply here. TY \$\endgroup\$ Commented Aug 3, 2023 at 3:53

1 Answer 1

1
\$\begingroup\$

As @thebusybee suggested in a comment, I should read the reference manual. I dismissed that it was covered there, but then double checked and it actually was. On page 382 and section 12.2.5: https://www.st.com/resource/en/reference_manual/rm0090-stm32f405415-stm32f407417-stm32f427437-and-stm32f429439-advanced-armbased-32bit-mcus-stmicroelectronics.pdf.

My assumption about multiplexers and such was right.

In the block diagram below from the manual, it shows the pins being routed to multiplexers.

enter image description here

This does not directly answer what the rationale is to choose that design (only one pin X from any GPIO allowed to be used for external interrupt). If anyone knows, I am interested. For now, I'll assume that it is to cut down on parts (multiplexers input decreased by 16x and selection bit inputs by 2x) unless I find a better explanation.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.