1
\$\begingroup\$

I am sending bytes 0xAA (10101010) and 0xBB (10111011) over SPI and it works! Then I try to decode the signal using the open source tool Pulseview where SPI decoder is not the best and it latches data on every clock change.

This is where I get into trouble, because my SPI clock i.e. iCE_SCK is for some reason oscillating at the higher frequency before the transmission (in the reset state) and SPI decoder also decodes that!

enter image description here

It would be completely fine to somehow prevent iCE_SCK clock from oscillating in the reset state.

This is the schematics (I marked iCE_SCK for convenience):

enter image description here

I tried putting the pullup/pulldown resistor of 10k to the iCE_SCK but it would not help the issue. Do you maybe have any other idea?


It looks I was lucky once when I used the FLASH_MOSI line to trigger on the falling edge:

enter image description here

Unfortunately this is not reproducible... Sometimes it works... Sometimes it does not. There are still some SPI decoding at the beginning where clock iCE_SCK is faster (in reset state).


When I use external triggering on the iCE_SS_BS (CS) and then use two probes on the FLASH_MOSI and iCE_SCK it looks like this - SPI decoding starts too soon anad it fails.

enter image description here

\$\endgroup\$
18
  • 2
    \$\begingroup\$ Have you tried the external trigger? \$\endgroup\$ Sep 17, 2021 at 9:04
  • 1
    \$\begingroup\$ @Andyaka That also came to my mind, but even if it is fixed, the OP won't get the benefits of it, since it has only 2ch scope. \$\endgroup\$ Sep 17, 2021 at 9:06
  • 1
    \$\begingroup\$ "SPI decoder makes the same decoding mistake", I see now. Post the image of what you got usin the ext. trigger. Make also one acquisition with CS and SCK, so we can see this transition . \$\endgroup\$ Sep 17, 2021 at 13:38
  • 1
    \$\begingroup\$ Are you sure that you don't have a setting in the DSO for trigger. Mine has pre-trigger and post-trigger delay. Yours: cdn-shop.adafruit.com/datasheets/Users+Guide+DS1000E.pdf , if I do search pre post trigger: Pre-trigger/delayed trigger: The data collected before and after trigger. The trigger position is typically set at the horizontal center of the screen. In the full-screen display the 6div data of pre-trigger and delayed trigger can be surveyed. More data of pre-trigger and 1s delayed trigger can be surveyed by adjusting the horizontal knob. \$\endgroup\$ Sep 17, 2021 at 19:18
  • 1
    \$\begingroup\$ You have also Pulse Width Trigger, you can trigger acquisition when SCK pulse width becomes larger - clock frequency gets slower. No need for ext. trigger at all. \$\endgroup\$ Sep 17, 2021 at 19:37

1 Answer 1

0
\$\begingroup\$

The only solution (in my case where I have only 2 oscilloscope probes) was to move the trigger to the far left side of the screen and then run the measurement. This is how I manually removed the pretrigger data and SPI decoder does not get confused.

Here is the working example: enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.