Please tell me if there is a more appropriate group! I'm just starting with STM developmeent using STM32CubeIDE. I have a background in programming (C#/C++/C) on the desktop and some minor experience in electronics. I am able to follow along simple labs like "Blinky" no problem.
HOWEVER, I'd like to know a little bit more about what is going on with the labs. For example, this step:

"In this example we are going to use one of the LEDs present on the STM32C031 Nucleo board (connected to PA5 as seen in the schematic below)"

I did this fine, but how would we know that PA5 is connected to the LED? Where is the schematic showing how the various pins and outputs from the chip are connected to the NUCLEO board? As a specific example, my board is the NUCLEO-C031C6 which I believe means that the processor its the C031C6. I have reason to believe there is only one user available led on the board, BUT I fail to see how one would know that PA5 is the correct GPIO_Output to use. Why not PA4, PA6, etc. And on more powerful boards, I believe there are more than one user led available correct? It would be fun to redo or extend the lab to use other leds. I have done research and have found: https://www.st.com/resource/en/user_manual/um2953-stm32-nucleo64-board-mb1717-stmicroelectronics.pdf but I don't see a diagram linking the processor pins and outputs to the board peripherals. As you can probably guess, I'm curios how to figure out what is available and which outputs to use, for a more advanced board, not just the NUCLEO-C031C6. I feel like there is some systematic way I'm missing....

Bonus question. The board I have actually says:



What extra info, if any does the second line with the "$" give?

Note, I believe the C0 series is just a more limited version of the G0 series. Hence my picking stm32g as a tag. Thanks!

UPDATE: I do see on the IDE itself, if you pick the board number to start the project and say "Yes" to map peripherals, it will show you how some (all?) of the pins from processor are wired to board. Thanks to @justme to point this out. However, the question still remains, is there a document showing how the pins are mapped from processor to board? Picture shows LED at PA5


1 Answer 1


Generally, you look at the board schematics and then you control the pins where LEDs happen to be.

The document you linked does not have a schematic, however, it has a section called "LEDs" where it is listed that one of the LEDs is on pin PA5. Try doing a search on the PDF.

For the boards made by ST, the examples are written to work on the ST boards, and CubeIDE comes with CubeMX which allows you to start a new project on a specific board so the IO pins and peripherals are already mapped for you, so you don't have to look at the board schematics and configure the IO pins and peripherals according to the hardware.

  • \$\begingroup\$ Thanks @justme for the quick response. I see on the IDE that I can see PA5 is going to the LED on the board. I updated my answer to show this picture. However, I still think there must be a document that shows all of this. That is the pin assignments from processor to board for each processor-evaluation board combination. I wouldn't be surprised if there is both a document and a description. \$\endgroup\$
    – Dave
    Mar 27 at 16:43
  • \$\begingroup\$ Yes, they are the schematics and they are available for different ST eval boards. Go to website of your board and see all documentation for it. So my answer still holds. \$\endgroup\$
    – Justme
    Mar 27 at 16:55
  • \$\begingroup\$ Thanks @justme. Duly marked as answer with much gratitude! For those following this later, the IDE itself does show how the peripherals are setup. Finding documentation is considerably more difficult. For this particular board (NUCLEO-C01C6) the best I could find was: st.com/resource/en/user_manual/… which doesn't have a diagram, but has a section on LEDs (for example) that calls out the mapping from processor to board. For other boards (and maybe this one) there is a "reference" manual. \$\endgroup\$
    – Dave
    Mar 28 at 16:14
  • 1
    \$\begingroup\$ For Nucleo and other boards, full board design and manufacturing file packages are available under Resources tab and the packages includes schematics in PDF form \$\endgroup\$
    – Justme
    Mar 28 at 16:38

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.