SPI decode error

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
HRene
Newbie
Posts: 0
Joined: Wed Apr 08, 2020 4:39 pm

SPI decode error

Post by HRene »

Hi

There is a rather annoying bug in the SPI decoding.

With a 16bit SPI word, only 7 bit instead of 8 are decoded with the 2nd byte.
I send a 0xBFE0 and decode a 0xBF70.
I send a 0x8034 and decode a 0xB01A.

Packet Start time End time Data
1 1.99 µs 17.49 µs 10111111 1110000
Packet Start time End time Data
1 1.988 µs 17.49 µs 10000000 0011010

Kind regards
Rene
Attachments
SPI_A-Clk_B-MISO_C-MOSI_D-CS_falligEdge.pssettings
(3.83 KiB) Downloaded 62 times
SPI_DecodeError.psdata
(97.61 KiB) Downloaded 76 times

HRene
Newbie
Posts: 0
Joined: Wed Apr 08, 2020 4:39 pm

Re: SPI decode error

Post by HRene »

@PICO: Is there nobody who could have a look at that?

bennog
Advanced User
Advanced User
Posts: 72
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: SPI decode error

Post by bennog »

try lowering the sample rate to 20MS/sec
2020-04-20_21-04-44.png
2020-04-20_21-04-44.png (20.99 KiB) Viewed 2478 times
by changing this value
2020-04-20_21-08-55.png
2020-04-20_21-08-55.png (7.91 KiB) Viewed 2478 times
I have seen some strange things on high sample rates compared t decode clock rate (ratio of 10:1) us usually the best so in your case at 1Mhz clock 10 - 20 Msample/sec rate

Benno

HRene
Newbie
Posts: 0
Joined: Wed Apr 08, 2020 4:39 pm

Re: SPI decode error

Post by HRene »

Hi Benno

Thanks for your reply.
It tooks me a little bit longer to get my new hardware working and to test your advice.
Unfortunately it does not work. I'll tried some different sample rates - always the same.
The Picoscope ignores the last bit.

Paket Startzeit Endzeit Data
1 988.8 ns 28.73 µs 00000000 00000000 00000000 00000001 00000000 01110111 1001010

Any other ideas?
Could someone reproduce that error?

Thanks and kind regards
René
Attachments
SPI_DecodeError_2.psdata
(28.63 KiB) Downloaded 50 times

bennog
Advanced User
Advanced User
Posts: 72
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: SPI decode error

Post by bennog »

set our clock edge to rising and it will work as expected.

Benno

Post Reply