2025-05-16 10:11 AM - last edited on 2025-05-16 10:32 AM by Andrew Neil
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.
Solved! Go to Solution.
2025-05-18 6:54 AM
Ensure pin speed for the SPI pins is set to VERY HIGH FREQUENCY or whatever the highest is for your chip.
2025-05-18 6:54 AM
Ensure pin speed for the SPI pins is set to VERY HIGH FREQUENCY or whatever the highest is for your chip.
2025-05-19 12:29 PM
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).