2022-08-16 07:27 PM
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?
2022-08-16 10:05 PM
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.
2022-08-16 11:33 PM
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.