1 2 Previous Next 20 Replies Latest reply: Mar 14, 2013 9:12 AM by KPAN Go to original post RSS
      • 15. Re: Data not coming for AD7357 interfaced with ADSP BF548 on SPI DMA

        Hi Claire,


        One more doubt.........

        When /CS is high after 16 clocks for a particular durtion. What should be the state of DATA?

        For the time /CS is high CLOCK is zero and DATA is high. But when I increase the speed of SPI, square wave on DATA for this period is getting attenuated. For slow speed DATA and /CS is exactly same wavefrm. For higher speed high on DATA vanishes and it is showing zero.

        At slower speed

        Data __||___  (Data wave s same as /CS)

        /CS  __||___   (/CS toggling between packets)

        At higher speed

        Data ______ (DATA wavform attenuates gradually with increse in speed and vanishes at MAX speed)

        /CS __||___  (/CS toggling between packets)


        This is just the observation on scope. What can be the reason for this and is it related to getting repeating samples???


        I hope I didnt complicate the question


        Thanks and Regards,


        • 16. Re: Data not coming for AD7357 interfaced with ADSP BF548 on SPI DMA

          Hi KP,


          I don't really understand what you mean in your last question - I think attaching a scope capture of the slower speed and higher speed would help a lot.  The AD7357 is capable of outputting data up to an SCLK rate of 80MHz so the speeds that you are running it at are very slow in comparison.


          Regarding the excel captures that you attached to the previous question, it does look as if something is happening. Are you sure that the SPI is running continuously for the capture and the time between every CS falling edge (the sampling instant on the ADC) is equi-distant?




          • 17. Re: Data not coming for AD7357 interfaced with ADSP BF548 on SPI DMA

            Hi Claire,


            SPI is running continuously. 16 clock cycles and silent period for 2 clock cycles in which /CS toggles. It is running continuously. The speed i mentioned is very slow but i am trying to run the spi at 831.25KHz with BAUD= 0x50.

            The waveform i am getting with plotting samples is distorting and showing 'W' and 'M' shape in between meaning missing of some samples or repeating some samples or something else. What can be the reason for it?


            Thanks and Regards,


            • 18. Re: Data not coming for AD7357 interfaced with ADSP BF548 on SPI DMA

              Hi Claire/Jobo


              In addition to above question, my doubts are

              1) Is it possible because of SD card writing speed and DMA reading speed? Same buffer I am using

              2) If that is the problem then I should not get any mismatch if I am plotting the graph manually in excel sheet but still I am getting this issue.

              3) If I increase the speed to maximum I am not even getting proper samples showing sine wave shape but it i am getting data in steps, means many samples with same value


              Can you help me with same?

              It is becoming urgent now as my deadline is coming closer. Please reply.



              • 19. Re: Data not coming for AD7357 interfaced with ADSP BF548 on SPI DMA

                I was traveling last week and just saw that this is still unresolved.  Unfortunately, I do not see anything in here that indicates the problem is with the Blackfin processor SPI.  In the data waveform XLS file that you attached, there are inconsistent problems.  The first valley looks fine.  The first peak appears to repeat 5 samples (but the data is NOT identical, it is just close enough that the plot looks like a perfect repeat).  The second valley appears to repeat 3 samples.  The second peak appears to drop 1 sample.  Then the 3rd valley appears to duplicate 2 samples.


                Rather than dump to XLS, can you simply halt the application and display the contents of the SPI memory buffer?  If the data in there resembles what you're showing here in the plot, then we know that the problem is not with the Blackfin SPI controlling the interface or the Blackfin DMA somehow lagging.  If the data looks clean in the SPI buffer, then we can poke around.

                • 20. Re: Data not coming for AD7357 interfaced with ADSP BF548 on SPI DMA

                  Hi Jobo,


                  As suggested I stopped SPI communication on button press plotted the data in SD card it was proper. then I used DDRRAM for writing data coming continuously.

                  On button press I read some data from DDR and plotted in SD card basically for syncronization. And it worked properly


                  I could achieve maximum speed and data was properly saved in SD card as well ,

                  Then as continuous write I also wanted to read continuously for analysis and save the analysis report .....I implemented the logic but was not working properly.


                  Then I reverted the changes but didnt help so i used the same code from backup which was working for 1 week for maximum speed and data was properly saved.

                  Now i checked that data from the buffer is not proper, eliminating SD card saving and all other things just the data from the raw buffer is not proper at maximum speed, if I reduce the speed waveform improves but still shows some disruptions.


                  So here is my question: With the same hardware and software which was working properly now it is not working. Should I suspect the hardware or any chip stopped working? How can I debug the hardware??????


                  Thanks and Regards,


                  1 2 Previous Next