Strange Clock-Signal on SPI

Hello everyone,

while my first tests with SPI I wondered about a strange Clock Signal:
[upload|fbq7hz4JqHFv6agCUY62XGpXS2o=]

Yellow is SSP_FRM, Blue is SSP_SCLK.

It looks like some kind of packaging in the transmission.

When zooming in to bit-level I saw a small break of approximately one bit every 11 bit:
[upload|ZVRtvc7FfVxzAaGqNJPcamiGgN4=]

I tried hard to reproduce this behavior, but I’ve never seen it again.

Has anyone seen something like this before?

Any Idea what may be the cause and how to reprocuce it?

Thanks

Grimme

Hi @Grimme

It is not clear which SPI settings you have tried, but it looks like the data is sent with a clock frequency of around 80kHz and 11bits per word.

Best regards
Jaski

Hi Jaski,

I have no idea which settings I used for that and I’ve never seen it again.

I used spidev_test to try several settings including your suggested:

while true; do ./spidev_test -D /dev/spidev0.0 -s 80000 -b11 -S 256 -I 1; done

but the signal is always nice and regular.

Thanks
Grimme

You are welcome. Let us know once you can reproduce the signal.

Hi, Thanks for the feedback.
Have a nice day too.

Hi Jaski,

I accidentely managed to the reproduce this issue.
While trying to improve the latency of the spi driver I experimented with several versions of the kernel module, unloading one and loading the other.
After changing the module I saw a similar clock-signal as above.
It seems that loading of the new module does not properly resetting the hardware, confusing some timing.

Have a nice day,
Grimme