cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103ZFH6 SPI3_SCK (PB3) Not working.

Maigonis
Visitor

Hello!

 

I am trying to enable SPI communication through the SPI3 interface on an STM32F103ZFH6. I am aware that pins PA15 and PB3 are used for JTAG and SWJ, but I have disabled both using:


GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);

 

There is no clock signal on SPI3_SCK (PB3) and the pin is always low, as confirmed by using a logic analyzer. The SPI3_NSS pins work, after disabling JTAG though.

I am certain that the SPI settings, clock, and initialization are correct because data is being sent on the MOSI line, and the NSS pin is manually pulled down correctly during communication, just the clock signal is missing. GPIO settings are also correct as the SCK pin is set to GPIO_Mode_AF_PP.

 

I have also probed for continuity on the PCB and everything is correct. There is a series resistor on the MOSI, MISO, and SCK lines.

 

I have added a screenshot of the logic analyzer output I get. Currently, I think the issue may be a hardware issue in the microcontroller itself, but I am not sure how likely that is.

 

Any help or recommendations are appreciated!

1 REPLY 1
TDK
Guru

Initialize the pin as GPIO output and toggle it and verify that you can see the output on your logic analyzer. That will confirm if there is a hardware issue.

 

If you feel a post has answered your question, please click "Accept as Solution".