cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO STM32F031K6 Pinout

Nick Sarten
Associate II
Posted on December 20, 2016 at 10:45

I'm putting together a project based on the Nucleo-

F031K6

board, but I've had real trouble tracking down clear and accurate pinout definitions for the board. The first information I stumbled across was the

http://www.st.com/content/ccc/resource/technical/document/user_manual/e3/0e/88/05/e8/74/43/a0/DM00231744.pdf/files/DM00231744.pdf/jcr:content/translations/en.DM00231744.pdf

 (pages 21-22), which lists pins PB3, PB4, and PB5 as the SPI1 output pins. However, I was confused to find that this conflicts with the pins used in the examples included with the STM32Cube code library (PA5, PA6, PA7). Upon further investigation I discovered that page 27 of the

http://www.st.com/content/ccc/resource/technical/document/datasheet/4d/c2/7e/10/77/4f/4a/60/DM00104043.pdf/files/DM00104043.pdf/jcr:content/translations/en.DM00104043.pdf

MCU disagrees with the Nucleo user manual, but agrees with the code in the STM32Cube library.

To me it seems obvious that the MCU datasheet and code examples are most likely to be correct. If this is the case, can the user manual for the Nucleo-32 please be updated with the correct pinout?

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on December 20, 2016 at 11:25

Further to this, I have read through the Nucleo-32 user guide more carefully and found that SB16 and SB18 are set up for PA6 and PA7 to be used for I2C. From looking at the schematics and reading the user guide it seems like this was done to tie PA6/PB6 and PA5/PB7 together to get both I2C and analog in on the same pins for a fully functional arduino nano layout.

I kind of wish it didn't come down to a hack like this, but at least it's possible to work around it. The downside is that in this configuration pins PA6/PB6 and PA5/PB7 can't be used at the same time (unless these solder bridges are removed). I'm probably just going to work around them for the time being, until I run out of pins. Looks like I'll be using PB3/4/5 for SPI1 after all.

View solution in original post

2 REPLIES 2
Nick Sarten
Associate II
Posted on December 20, 2016 at 11:05

My initial assumption was incorrect, I don't think the Nucleo-32 data sheet is completely wrong (PB3, 4, 5 can also be configured as SPI1). I think the cause for my confusion was some missing information; the datasheet for the STM32F031K6 MCU shows that either PB3/4/5 or PA5/6/7 can be set as the SPI1 pins, but the user guide for the Nucleo-32 only shows SPI1 as the alternate function for PB3/4/5, even though PA5/6/7 are also all exposed on the Nucleo-32. Is there a reason to not use these pins on the Nucleo-32 for SPI?

Posted on December 20, 2016 at 11:25

Further to this, I have read through the Nucleo-32 user guide more carefully and found that SB16 and SB18 are set up for PA6 and PA7 to be used for I2C. From looking at the schematics and reading the user guide it seems like this was done to tie PA6/PB6 and PA5/PB7 together to get both I2C and analog in on the same pins for a fully functional arduino nano layout.

I kind of wish it didn't come down to a hack like this, but at least it's possible to work around it. The downside is that in this configuration pins PA6/PB6 and PA5/PB7 can't be used at the same time (unless these solder bridges are removed). I'm probably just going to work around them for the time being, until I run out of pins. Looks like I'll be using PB3/4/5 for SPI1 after all.