Complete list of pins for external attachInterrupt()?

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
Holes Flow
Posts: 9
Joined: Fri Nov 03, 2017 12:47 am

Complete list of pins for external attachInterrupt()?

Post by Holes Flow » Mon Nov 13, 2017 1:32 am

Experts,
Here we're discussing the F103s, but this would be extremely useful for the whole 32-bit ARM line, IMHO...

Roger posted here that he thought most GPIO pins cold be used, but I would like a more concise, accurate listing for at least these chips (as a start).

Does there exist a complete chart, table, or matrix of all the pins that can be used? I would imagine a comprehensive spreadsheet-even posted on GDocs/GDrive-would be of great value to folks like me.

If nobody knows of this info, would making a reference be a worthy cause?

TIA!

User avatar
RogerClark
Posts: 7465
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Complete list of pins for external attachInterrupt()?

Post by RogerClark » Mon Nov 13, 2017 2:05 am

There are details on the old maple mini page

http://docs.leaflabs.com/static.leaflab ... -mini.html

I guess we should probably copy this to the wiki before Leaflabs eventually take it offline

Note. The problem with the leaflabs docs are that it uses the Maple Mini pin numbers and not the official Port + Pin designation

Though it could be converted using search and replace

stevestrong
Posts: 1819
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Complete list of pins for external attachInterrupt()?

Post by stevestrong » Mon Nov 13, 2017 9:08 am

This is the EXTI pin map:
http://docs.leaflabs.com/static.leaflab ... i-exti-map
As Roger said, it should be converted to PXY naming, and put onto wiki, or at least posted here.
So feel free ;)

Also relevant: viewtopic.php?f=14&t=2216#p30064
fpiSTM wrote:
Tue Jun 20, 2017 6:43 am
For STM32, there is one EXTi per GPIO pin number. So, 16 EXTI (PX0 to Px15).
Warning: set an EXTI on PA0 and PB0 will raised the same EXTI without way to know which GPIO port it is.

victor_pv
Posts: 1745
Joined: Mon Apr 27, 2015 12:12 pm

Re: Complete list of pins for external attachInterrupt()?

Post by victor_pv » Mon Nov 13, 2017 8:30 pm

ALL gpio pins can be used for EXTI.
There are 16 EXTI lines, and they go to the corresponding pin 0 to 15 to each GPIO.

Since each line is shared for all corresponding pin of all GPIO ports, only 1 of them can be enabled a time.

Example
PA0, PB0, PC0... share EXTI0. Only 1 can be enabled for EXTI. If you attach PA0, and later on attach PB0, that will automatically disable the EXTI capability in PA0
PA1, PB1, PC1... share EXTI1. As above, only 1 port line at a time.

You can have an interrupt in up to 16 lines, and they can be in the same port or different, as long as 2 of them are not in the same line.

Example:
You can attachInterrupt to PA0, PA1, PB2, PC3, PA4... all at the same time.
You can not have interripts in PA0, PA1, PB1, PC1 at the same time (since PA1, PB1 and PC1 share a line, only 1 of them will be active, the last one you "attached")

This post explains is well and graphically:
http://embedded-lab.com/blog/stm32-external-interrupt/

Holes Flow
Posts: 9
Joined: Fri Nov 03, 2017 12:47 am

Re: Complete list of pins for external attachInterrupt()?

Post by Holes Flow » Tue Nov 14, 2017 3:52 am

or at least posted here
Not to be one to sit back and post a "why doesn't someone make a _____" post, I started a horribly awful draft to try to put together some of this...

Bold means 5v tolerant (this will eventually change to cell shading, but shading and font fanciness is futile in the beginning, as it doesn't move with values!). There are a few notes ("comments" under a few cells, which I temporarily abandoned in this early phase...

Disclaimer: This is not complete, or formatted, or thorough, or even right. I can't figure out the 36 & 144 pin versions, how many pins low/med/high have, or even pin counts as somehow the various STM32 docs aren't agreeing with each other. I just started with the 4 STM32F103 classes.

I'm not suggesting a thorough examination would be just F103 chips, it's just that I use the F103C8T6 cheapies a lot... I also did not expand all the 4 types (T, C, R, and V), as I'm just trying to figure out how to compress column space. Other tabs (worksheets) have other stuff just plopped in...

Although it seems obvious, I started with "I/O" (bold = 5v tolerant), and later copied over them with the EXTI assignment. There are cells I did not extend these (mainly for low density) because I just wasn't sure what went where-again, the STM32 docs I was going off of were not clear about which chips had how many pins, and therefore whether they even had an EXTI__ . For example, 144 pin chips are mentioned, but never referenced-only up top 100 pins...

Consider it a skeleton to throw raw meat at...

"Work in progress" is an overstatement...

TIA!
Attachments
STM32_GPIO.xlsx
Working with ods, exported to xlsx
(101.55 KiB) Downloaded 34 times

Post Reply