I am using AD7124-8 with Atmel SAM L21 MCU for data acquistion. I can establish basic communication between MCU and AD7124 and read channel conversion. I am using MCU clock of 48MHz and SPI clock of 4MHz. I need to read channels conversion orderly like channel 0,1,2 3 and so on.As for 70 sps on all 7 channels, I am using timer having period of 15ms to read each sample conversion ((1/70)=13.7ms ). Even though, I am reading random channel conversion.I have attached my code. Please suggest a solution.
My application have 7 channels (unipolar).
I represent each sample by 5 bytes. 3 of 5 bytes are data and remaining two to represent channel number and device number