cancel
Showing results for 
Search instead for 
Did you mean: 

PB7 doesn't work as GPIO output when using SPI1 at NUCLEO-F303K8.

Shinya
Associate II

I set PB7 for the output pin to light a LED when PB7 is HIGH. However, after the function "HAL_SPI_Receive_IT()." is called, my LED doesn't light or turns off even if setting PB7 as output HIGH.

I use CubeMX ver. 6.6.1-RC2 and CubeIDE ver. 1.10.1.

Do you have any ideas about this problem and the solution?

2 REPLIES 2
S.Ma
Principal

You probably have a dual use pin. Check board schematics interconnect. Use debugger and break/stop the code once malfunctionning. View the gpio hw registers MODE, if your pin is anything else than 01, else if the OUT reigster is wrong output level, then keep digging to find the root cause.

Shinya
Associate II

Thanks to your reply, I found PB7 and SPI1_SCK connected by default on the Nucleo-F303K8 board. I will try to unsolder the connecting jumper resistor.