SPI waveform

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI waveform

1,400 Views
kanimozhiraju
Contributor I

Hi EARL GOODRICH,

                I sent you the spi waveform D0-sck,D1-mosi,D2-miso,D3-cs..I have attached waveform of mosi sck and cs.First i tr with 4mhz since my slave needs 4mhz but i was not able to see data its just oscillate.then i have changed clock and tried.The data is not getting written to slave.Thank you

Original Attachment has been moved to: screenshot-of-spi.rar

0 Kudos
Reply
5 Replies

1,226 Views
egoodii
Senior Contributor III

I'm not sure what you did starting with pic VB8012-307EC97_2017-06-16_11-28-19.png, but it looks like you re-enabled 'continuous SCK', which isn't going to help ANYTHING.  Turn that back off!

What I see in VB8012-307EC97_2017-06-16_11-13-54.png as your 2nd write, to register 0x20, BUT you must have done something different in your code as regards the CONT bit (other than what I have shown all along), because CS is only active for the first 3 bytes.  Figure 2 in the AFE4490 datasheet clearly shows a full 32-bit CS (STE) requirement.  Until you get that full-width CS, nothing else will ever work.

0 Kudos
Reply

1,226 Views
kanimozhiraju
Contributor I

VB8012-307EC97_2017-06-19_15-41-39.pngVB8012-307EC97_2017-06-19_15-42-48.pngVB8012-307EC97_2017-06-19_15-43-36.pngVB8012-307EC97_2017-06-19_15-46-44.pngVB8012-307EC97_2017-06-19_15-46-56.png

hi egoodii‌,

              I have attached the spi waveform since i have modified the code with what you have given me .Last two waveforms are concentrated on clk,miso and cs.Others are clk,mosi and cs.PCS is enable for 4bytes and while reading Miso is in zero state.I felt clk will be problem.Because if we use 4mhz or 8mhz waveform is not displaying in logic analyzer when i reduce the clock to 1 or .7mhz waveforms are displaying.I follow your suggestion and trying to progress in it.Thank you.

0 Kudos
Reply

1,226 Views
egoodii
Senior Contributor III

I can't say what is going on with your scope's waveform sampling that it isn't showing you 4 or 8MHz, OR whether maybe your hardware has 'long unterminated traces', but in any case the waveforms you show look 'OK', except that now I don't see ANY activity on CS, so I don't know what you did to PCS controls to kill THAT off...

0 Kudos
Reply

1,226 Views
kanimozhiraju
Contributor I

hi egoodii‌,

         The printf statements in realterm 

data written to addrs 0
data written to addrs :4
data written to addrs :1
data read from addrs 0
data written to addrs 0
data written to addrs :4
data written to addrs :1
data read from addrs 0
data written to addrs 0
data written to addrs :4
data written to addrs :1
data read from addrs 0
data written to addrs 0
data written to addrs :4
data written to addrs :1

0 Kudos
Reply

1,226 Views
egoodii
Senior Contributor III

The printf's don't tell me anything.  Please try some new waveforms with CONT set for the first three bytes only, and PCS pattern set for all four.

0 Kudos
Reply