0
\$\begingroup\$

Poorly written question. Let me elaborate.

The Nucleo-32 board I'm developing (STM32G431KB) in STM32CubeIDE shows on the CubeMX "pinout view" that there are 4 distinct pins PA6, PA15, PA5, and PB7, each with their own unique set of alternate functions. I assigned a function to each of those pins (although you don't see PB7 or PA15 populated in this image for reasons discussed below): enter image description here


So after configuring my peripherals, I then went about wiring the board according to the ST User Manual. That's when I realized PA6/PA15 and PA5/PB7 are both assigned to a single pin for each pair (header CN3, pins 7 and 8):


My question is thus: am I prohibited from using a pin if I am simultaneously using a completely separate pin on that same physical header pin? For example, if I'm using alternate function SPI1 SCK on pin PA5, is there no possible way to use pin PB7 for anything at all? Or is there some sort of fancy GPIO muxing feature that I'm not aware of?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I would normally say that if the pins really are tied together, then no. But PB7 already has its own dedicated pins here must be something else going on the board like jumpers because it isn't in the MCU itself. Nucleo-32 boards have their schematics available. \$\endgroup\$
    – DKNguyen
    Jan 26, 2020 at 6:58
  • \$\begingroup\$ If you are not planning to use Arduino, all pins are available. \$\endgroup\$
    – User323693
    Jan 26, 2020 at 7:13

2 Answers 2

2
\$\begingroup\$

For example, if I'm using alternate function SPI1 SCK on pin PA5, is there no possible way to use pin PB7 for anything at all?

Of course there is. Just remove solder bridges SB2 and SB3 and you'll have separate PA5/PA6 on pins 8/7 of CN3 and PB7/PB15 on pins 7/8 of CN4

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Oh wow I feel just ...this made me realize that those pins are actually duplicated on CN3 and also available on CN4. I thought they were only present on CN3. Removed the jumpers! \$\endgroup\$
    – ardnew
    Jan 28, 2020 at 0:47
2
\$\begingroup\$

Please read the datasheet and the user manual. In general, you can definitely use it separately. In this particular board you have limitations. As this is made to be Arduino nano board compatible.

enter image description hereenter image description here

\$\endgroup\$
1
  • \$\begingroup\$ I completely overlooked the fact that PA15/PB7 were present on both CN3 and CN4! Definitely don't need the Nano compatibility, so I just removed the jumpers \$\endgroup\$
    – ardnew
    Jan 28, 2020 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.