2023-10-06 02:54 AM - last edited on 2023-11-30 06:49 AM by Mike_ST
I am using SPI 1 on a pair of Nucleo-G474RE boards that are running the same software image. On of the interfaces is working correctly, the other is not.
A logic analyser shows the following:
Working
Not working
From this, it looks as if there is a spurious clock cycle / glitch at the start of the transfer. What could cause this?
2023-10-06 02:58 AM
Are you sure that the firmware is 100% identical?
And the hardware? External pull-resistors, caps, ... ?
Chip revision?
2023-10-06 03:01 AM - edited 2023-10-06 03:05 AM
>glitch at the start of the transfer. What could cause this?
some capacitive coupling between cs and clk , maybe long wires close together.
a: reduce port speed cs pin , --> slow.
b: reduce coupling or use screened cable (also for your test-wires , use a screened scope tip and test)
2023-10-06 03:01 AM
Yes, I have programmed the same image from the same Cube project onto the boards. The boards have nothing else connected to them so that I could eliminate any external influences on the signals.
2023-10-06 03:02 AM
Both chips are 0x469 Rev X.
2023-10-06 03:44 AM
So the only difference might be the scope wiring? Maybe there's the problem?
Your screenshots look like a PC scope or logic analyzer, do you have a stand alone scope to verify that?
Wildly guessing... ;)
2023-10-06 06:41 AM
Make sure all pins are initialized and the SPI peripheral is enabled prior to CS going low. This can be done by sending an initial dummy transfer with CS high.