cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB09 Nucleo SPI clock problem

ManuelIgnacio
Associate II

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

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".

View solution in original post

2 REPLIES 2
TDK
Super User

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".

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).