2024-04-23 05:13 PM - edited 2024-04-23 05:16 PM
I fear there is an error in the new Nucleo-U031R8 board. The D13 pin is labeled as the SPI1 SCK pin on the boards' silkscreen. However, the board schematic shows that this is connected to PA5. STM32CubeMX reports pin PA1 as the actual SPI1 SCK pin.
Source: https://www.st.com/resource/en/schematic_pack/mb1932-u031r8-b01-schematic.pdf
Source: STM32CubeMX configuration starting from the Nucleo-U031R8Tx board.
I've confirmed A1 (Connected to PA1) to be the actual SCK pin with both a logic analyzer and functioning SPI sensor (which was not the case with SCK -> D13).
Solved! Go to Solution.
2024-04-23 09:11 PM
Hello @JSGraaf and welcome to the ST Community 😊.
The Nucleo-U031R8 is based on the STM32U031R8T6 MCU. If we take a look at the table STM32U031x4/6/8 pin/ball definition of the DS14581, we will find that the SPI1_SCK is mapped to both PA1 and PA5. When you enable SPI1 using CubeMX, CubeMX always select a default pinout (Sck, Miso, Mosi,....). You can change the SPI1_SCK from PA1 to PA5 directly by selecting PA5 as SPI1_SCK on the pinout of the MCU (click on the pin PA5 on the screenshot that you have share it from CubeMX and selzct SPI1_SCK as function) and it will be automatically changed.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-04-23 09:11 PM
Hello @JSGraaf and welcome to the ST Community 😊.
The Nucleo-U031R8 is based on the STM32U031R8T6 MCU. If we take a look at the table STM32U031x4/6/8 pin/ball definition of the DS14581, we will find that the SPI1_SCK is mapped to both PA1 and PA5. When you enable SPI1 using CubeMX, CubeMX always select a default pinout (Sck, Miso, Mosi,....). You can change the SPI1_SCK from PA1 to PA5 directly by selecting PA5 as SPI1_SCK on the pinout of the MCU (click on the pin PA5 on the screenshot that you have share it from CubeMX and selzct SPI1_SCK as function) and it will be automatically changed.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-04-24 03:05 AM
I missed that due to the pin being pinned. Apologies and thank you!