PGA970: PGA970 SPI

Part Number: PGA970


1. Is the 24-bit protocol in datasheet section 7.3.1.14.3.1 “SPI Master to PGA970 Commands” the SPI access format when M0 is in reset? The datasheet mentions that only when M0 is in reset can SPI access all memory. If M0 is running, SPI can only access the COMBUF registers.  

image.png

2. When M0 is running, if I want to read LVDT sensor sample data or open-/short-circuit diagnostic data via the SPI interface, how should I write data to the COM_DIF_TO_MCU register (what is the SPI data format) so that the corresponding data can be received on the MOSI interface? Do I just write the address of the register I want to read, and then M0 will transfer the corresponding register data to COM_MCU_TO_DIF, which can then be read through the SPI interface? What is the exact workflow, and how should I operate it?

  • Hi Dan, 

    Welcome to E2E!

    1. Table 5 shows the SPI format expected by PGA970 when the device is running or in reset. You are correct that you can only use the COMBUF registers when the PGA970 is running, but you use the same SPI format to read/write the COMBUF registers. 

    2. As I mention above, you will use the same SPI format when the PGA970 is running. You have to define commands in your firmware to use the COMBUF For a more explicit example, let's say that I define the following COMBUF command in my firmware: 0x55. When the PGA970 is running, and the COMBUF receives 0x55, then it will report the two upper bytes of DEMOD1_DATA (that is, 0x10 and 0x11 on DI page 0x0). My SPI would look something like this (x= don't care):

    1. Send 0x55 to COM_DIF_TO_MCU_B2: 0x000 00001001 1 01010101 xxxx
    2. Poll COM_TX_STATUS until I read back 0x01: 0x000 00000110 0 xxxxxxxxxxxx, send another SPI transaction to get the readback on MISO
    3. Read COM_MCU_TO_DIF_B1/2: 0x000 00000100 0 xxxxxxxxxxxx, send another SPI transaction to get the readback on MISO

    Since I have defined 0x55 as a COMBUF command, once the command is received (as indicated by COM_TX_STATUS) the M0 will automatically place the data from the DEMOD1_DATA upper bytes into the COMBUF readback registers. 

    Thanks,

    Maggie