I'm seeing a strange behavior when using the Analog-Disco 2 (AD2) for SPI MOSI-MISO decoding. My set-up is as such:
Purpose: Monitoring MOSI-MISO from Microcontroller to Slave device to make sure that commands and replies from MCU to slave chip are correct.
Using: AD2 SPI MOSI MOSI protocol analyzer
DIO 4: Used as an input signal that I toggle in my code (before the third SPI transaction) so the AD2 can trigger on the last transaction (the one I'm investigating)
Microcontroller SPI: running at 120KHz
MCU I/O: 3.3V (5.0V tolerant)
Slave CHIP I/O: 5.0V (3.3 V level compatible)
Run #1: Graph 1: Please refer to attached graphs. Graph 1 shows a successful capture by the AD2. The MOSI is exactly what I sent and the MISO is also correct:
The slave should respond to the very first MOSI command (4 bytes + 1 byte CRC) with 4 bytes = 0x00 and the correspondind correct CRC (=0xB2)- Test passed!
The slave then responds to each succeeding MOSI commands with the adequate MISO responses and the correct CRC - Test passed!
Run #2: Graph 2: This graph shows the exact same operation, as the above, repeated once again. The MOSI is exactly what I sent and the MISO responses are now incorrect:
Notice how the MOSI commands are the same as the above (Run #1)and are correctly captured by the AD2.
Now the AD2 displays the MISO responses as all zeros. I cannot verify the first two MISO responses in my code since the program is running but I can capture in my code the third MISO response (program is halted). Please see the received buffer (rxBuf[0:4]) below Graph 2. You can clearly see that the Microcontroller code did capture the correct (third) MISO response as 0x00, 0x00, 0x81, 0x01, 0x73. (The CRC 0x73 is also correct, so the Microcontroller definitely read the correct response from the Slave). Questions:
Why is the AD2 displaying different MISO data then the Microcontroller rxBuf[0:4] when it is connected to the same MISO line as the Microcontroller MISO input?
In Run #1 = Graph1 all worked perfectly, but in Run #2 = Graph 2 (no changes from Run #1) MISO is displayed wrong. It is as if the first MISO response it just repeated/displayed three times in a row. From the fact that the Microntroller rxBuf[0:4] contains the correct data shows that the AD2 display is not right. Why is that?
What is the line showing in the SPI MISO row? I'm pointing to it on Graph 1 with a blue Arrow?
Question
Electrons4me
Hello Digilent support,
I'm seeing a strange behavior when using the Analog-Disco 2 (AD2) for SPI MOSI-MISO decoding. My set-up is as such:
Run #1: Graph 1: Please refer to attached graphs. Graph 1 shows a successful capture by the AD2. The MOSI is exactly what I sent and the MISO is also correct:
Run #2: Graph 2: This graph shows the exact same operation, as the above, repeated once again. The MOSI is exactly what I sent and the MISO responses are now incorrect:
Questions:
Thanks
E4M
Almost_There_No_MISO_Decode_V2.pdf
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.