Skip to main content
Associate II
May 16, 2025 5:11 PM UTC
Solved

STM32WB09 Nucleo SPI clock problem

Hello,

I'm having an issue with the SPI clock on the NUCLEO MB2032 board. As you can see in the image, I only have the debugger connected, and the clock signal isn't completely square.

In the code, the only thing I'm running is the following:

const uint8_t EEPROM_RDSR = 0b00000101;

while(1){
      HAL_SPI_Transmit(&hspi3, (uint8_t *)&EEPROM_RDSR, 1, 100);
}

What I'm measuring with the oscilloscope is pin SB14, which, according to the PCB file provided by ST, is directly connected to the SPI clock.

ManuelIgnacio_0-1747415063328.png

 

ManuelIgnacio_1-1747415200222.png



ManuelIgnacio_3-1747415311363.jpeg

ManuelIgnacio_4-1747415355250.png

ManuelIgnacio_5-1747415369456.png

 

 

This topic has been closed for replies.
TDK
TDKBest answer
May 18, 2025 1:54 PM UTC

Ensure pin speed for the SPI pins is set to VERY HIGH FREQUENCY or whatever the highest is for your chip.

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

2 replies

TDK
TDKBest answer
May 18, 2025 1:54 PM UTC

Ensure pin speed for the SPI pins is set to VERY HIGH FREQUENCY or whatever the highest is for your chip.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
May 19, 2025 7:29 PM UTC

Thank you very much for your help, TDK. I solved the problem by checking for inconsistencies in the SPI configuration. I set a prescaler of 32 (baud rate = 1000 KBits/s), and it started generating a clean square wave signal.

I tried setting the clock pin to the maximum frequency, but the signal still looked inconsistent (not like a proper square wave).