cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX - Nucleo boards - pin conflict how to resolve

Smoun.1
Associate III

Hi I have a STM32F334R8 Nucleo board on which I need to enable SPI. Sadly, CubeMX is greeting me with a conflict between the user LED and the SPI dedicated pins.

Is there a work around that doesn't involve physically unsoldering the LED?

thanks

6 REPLIES 6
S.Ma
Principal

If you are making a cable and not a shield, find another GPIO in arduino or morpho which has the same SPI pin and use it instead.

There are usually 2 or 3 GPIO options for the same peripheral signal.

Arduino board I was told, has an LED on one SPI signal.... go figure...

Thanks - yes this is what I need help with.

I am using CubeIDE, opening the ioc file within cubeIDE shows LD2 on PA5.

When I enable SPI1, well I actually can't unless I first free pin PA5. Once that's done I can add SPI1 (set as full duplex slave mode in my case). Now I have SPI1_SCK on PA5.

I haven't tried running this because with the LED on that pin will just train the current coming from my master (another device is generating the clock).

I am very new to STM32 / CubeMX. I have a lot of unused GPIO's - I am just unsure which one I can use as SPI Clock... I clicked on all grey pins on the pinout view, and none of them have any "SPI stuff".

What am I missing?

Crtl+click on a pin shows alternates, if there are such.

thanks for the tip.

The only pin blinking when CTRL+click on SPI1_SCK is PB3 which is "orange" and labelled SWO.

Not sure why it's orange, but I thought SWO is used for flashing.

0693W000003C5ZgQAK.png

S.Ma
Principal

You can use SWO it's a kind of RS232 TX to the STLink for debug printf and it's totally optional. So you can reassign it as for the STLink side it's an input.

How about using another SPI ? There should be a different set of pins in this case.

Thank you. You guys have been very helpful.

This chip only has a single SPI.

I will reassign the SWO or just leave it off actually. This chip will only be used to generate 6 high resolution PWM output thanks to its HRTIM1 and it won't be anything else. I am using the SPI as slave to listen for new duty cycle instructions from the main MCU (an H7).