Other Parts Discussed in Thread: ADS8684A, SYSCONFIG
Tool/software:
Hello!
I am testing a design where a MSPM0G3507 (controller) communicates via SPI with an ADS8684A (peripheral).
I validated communication on each channel of the ADC individually-- successfully storing conversions. I am now working on obtaining conversions from each channel in succession, starting with Channel 0. I am doing manual instead of automatic scanning as I plan to implement averaging later on.
To achieve this operation with the ADC, I am transmitting data to the ADC in this order:
1) Setting the ADC input range to 0V to 10.24V in the program registers of the ADC: 0x0B05, 0x0D05, 0x0F05, 0x1105.
2) Sending the following commands for obtaining conversions: 0xC0, 0xC4, 0xC8, 0xCC. Then, repeating this cycle starting at 0xC0.
My software is based on the spi_controller_repeated_fifo_dma_interrupts example from the SDK. In this example, an SPI frame is sent every 1 second using Timer0. I modified the .syscfg so the SPI clock is 1MHz, clock polarity is low, and clock phase is high to capture data on the falling edge.
I have been using a lab oscilloscope to observe the SPI waveforms. As the SPI frames are sent every 1 second, I can observe the operation of the system with the naked eye. The oscilloscope is triggered on the falling edge of the chip select.
In order to observe the desired system behavior on the oscilloscope, I have written the following code. I have highlighted the code I added throughout to achieve this behavior. I did not observe 0x00 being transmit over the PICO line on the oscilloscope. Without this block of code, I observed the following messages being transmit over PICO on the oscilloscope: 0x0B05, 0x0F05, 0xC0, CxC8, 0xC0, 0xC8... Essentially, every other message to the ADC was skipped. This does not align with my current understanding of the MSPM0G3507 or ADS8684A, so I am looking for some clarity as to what is going wrong here.