Tool/software:
Hello experts,
i am trying to set up communication through SPI between an ads131m08 and an f280049 uC. I have big problems to understand how it should works properly.
Actually i have a routine that should simply read data from the ADC. The SPI clock is set to 10MHz, the ADC clock is 8.192MHz.
My steps are:
1. reset the ADC, and wait for it to exit reset.
2. starting to send NULL frames, to read datas.
The frame i send is 10 words of zeroes, each word is 24 bit, since after reset adc has 24bit size word by default.
My reading routine do the following:
- waits for the adc signal DRDYn to go low.
- i puts 15 16bit words of zeroes in the SPITXBUF of my SpiA
- i wait to receive 15 words in the FIFO RX, of the SpiA.
- I wait for the DRDYn signal from ADC to go up again and then repeat.
What i don't understand is that the DRDYn signal seems to have unpredictable behaviour, sometimes it goes up properly after reading a frame. Sometimes it stays DOWN, and makes a very narrow pike just very before the next conversion occurs (it means the DRDYn stays low for about 244us.). Sometimes the DRDY stay low for 4ms, to the end of ADC spi timeout.
What i am missing, to correctly read data from adc??
Do you have some example code, that interfaces a SPI peripheral of a uC, to this ADC?? just to make a comparison of what i am doing wrong??
Kind Regards
Emanuele Peruzzi