This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/PGA970EVM: Issue with data read back from DEMOD1_DATA1-4 registers: DATA3 and DATA4

Part Number: PGA970EVM
Other Parts Discussed in Thread: PGA970, USB2ANY

Tool/software: Code Composer Studio

When I read the registers with the PGA970 GUI, I get different values than when I use a Hercules microcontroller over SPI to read the data. I am sending the same commands from both (observed on oscilloscope):

Send over SPI 0x02 00 00, which is a read at the start of the DEMOD1_DATA register

Send over SPI 0x02 40 00 and read from the SPI in the Hercules controller. The 0x02 40 00 is to read the next 16 bits of the ADC, and the read of the data the SPI has is done here because I am aware the PGA970 provides requested data on the SPI transfer after the first read command has been sent. 

Send over SPI 0x02 40 00 and read from the SPI. This is a dummy command, just meant to pull the data the PGA970 will send from the previous SPI command.


Now when I run my Hercules software, it sends the commands above, and receives 0x0202 0xB6AA (data processed out of the SPI messages). This is weird, because the response SHOULD not contain data in the first 8 bits (the data is represented in 32 bits, but the ADC only writes to 24bits, so all reads should be 0x00XX 0xXXXX), and it isn't the software because I'm watching the data on the oscilloscope and it matches this data. BUT if I unplug the Hercules controller and plug in the USB2ANY without cycling power to the PGA970 EVM (leaving everything configured as it was by the Hercules software) and ask the GUI to read the data, it sends the same commands over SPI (watched on oscilloscope), but receives different data over the SPI (again, verified with the oscilloscope that the data being received matches the data actually sent), to the tune of 0x004B, 0xB858. The second word in the data is close enough that the data seems to match, but the first word is completely different. And this is with the same commands being sent over SPI.

Is there something I'm missing? Does the GUI automatically configure some extra settings every time it establishes contact with the PGA970? Do I need a delay between reads of the DEMOD1 register?
And it may be related, by why does the data change when just operating from the GUI? Here's what I do:

From the Low Level Configuration page of the GUI:
Click on DEMOD1_DATA1, click read (read data in noise floor, dont care what it is)
Click on DEMOD1_DATA3, click read (read 0x4B back)
Click on DEMOD2_DATA1, click read (read data in noise floor, dont care what it is)
Click on DEMOD2_DATA3, click read (read 0x22 back)
Click on DEMOD1_DATA3, click read (read 0x22 back)

If I read DEMOD_ first, I receive a different answer in the most significant bits of the opposite DEMOD__DATA3 section of the register. Why?! This value should be unchanged. In fact, I think it is unchanged, since I can read from DEMOD1_DATA1 and then read from DEMOD1_DATA3 and it has gone right back to 0x4B. It should be consistent call to call regardless of which register is read first, right?

  • Software bug: indexing into the wrong portion of the register. I mistook readings on my oscilloscope as the same, when they were only mostly the same.

    Still doesn't explain the fact I can read from the GUI and cause erroneous readings... if anybody else can explain the issue seen from the GUI, I would appreciate it.