ADPD4100 (EVAL-ADPD4100Z-PPG) SPI Configuration Procedure

Hello,

I am trying to configure the ADPD4100 registers over SPI. Per the spec sheet, I have been writing to the registers in order one after the other after giving the first register address. However, when I read back one of the register values after writing (specifically, 0x0106), the value returned is all zeroes. The way I currently write to the registers is to write to every single register, including read-only ones. Could this be the issue? Are some of the registered skipped over during the writing process?

Brandon

  • Update:

    I tried writing discretely to the register that I mentioned and now the value is taking. So I guess it becomes a question of determining which registers I actually need to even write to in the first place (ones that diverge from default value) and based on my assumption, which registers are being skipped during the writing process if I move forward with writing to all registers.

  • 0
    •  Analog Employees 
    on Sep 28, 2020 2:27 PM 1 month ago

    Hi Brandon,

    Please start debugging by taking one step at a time. Are you able to read register 0x0008? If you could read the correct value, which should be 2C2, are you able write registers that are supposed to be written one-by-one and read them back? 

    Also, more in-depth info on SPI:

    The SPI write operation is illustrated in Figure 5-1, showing a single register write. The first 2 bytes contain the 15 bit register address and also specifies that a write is requested. The remaining two bytes are the 16 data bits to write to the register. The register write only occurs if all 16 bits are shifted in prior to de-assertion of the CSB signal. In addition, multiple registers can be written if additional 16 bit data is shifted in before de-assertion of the CSB signal. The register address automatically increments to the next register after each 16 bits of data. The SPI read operation is illustrated in Figure 5-2, showing a single register read. The first 2 bytes contain the 15 bit register address and also specifies that a read is requested. Register bits are shifted out starting with the msb. In addition, multiple registers can be read if additional 16 bit data is shifted out prior to de-assertion of the CSB signal. Reading from the FIFO can be done byte-wise, there is no requirement to read multiples of 16 bits.

  • Hi Yigit,

    Thank you for your reply. I am able to read from the 0x0008 register, or any register from that matter. I've also been able to verify that values that I write to registers are taking by reading them back after the write. I added an update above in the reply to myself where I am now. Do you have any insight as to possibly registers that would be skipped during the consecutive writing process? Based on the spec sheet, it appears that some registers are not even listed (namely, from 0x90 to 0xB3). The same goes for the registers that are listed when viewing the config in the Wavetool Evaluation Software with the ADI microcontroller.

  • +1
    •  Analog Employees 
    on Sep 28, 2020 3:06 PM 1 month ago in reply to bdester

    Hi Brandon,

    We don't want you to write any of the registers that are not listed on the datasheet. There are a bunch of test registers that are used for testing/quality control purposes. You must NOT write any of those registers. 

    Typically there are read-only/reserved bit fields but no register is fully read-only, EXCEPT the signal/FIFO/dark registers from 2F to 8F. Registers from 2F to 8F are read only because they store output signal codes. But all the other registers could be written.

    In terms of register 0x106, it is an LED driver register. It should read 0000 if you do not turn on an LED tied to 3A,3B,4A,4B in that timeslot(for 106, it's timeslot A). Is timeslot A supposed to turn on an LED that is tied to 3A or 3B and 4A or 4B?

  • Thank you for your help Yigit! I decided to go back and write to each register that I needed to discretely and now I'm getting the results I expect.