2016-12-20 01:45 AM
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 (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 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?
Solved! Go to Solution.
2016-12-20 03:25 AM
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.
2016-12-20 02:05 AM
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?
2016-12-20 03:25 AM
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.