Post Go back to editing

ADPD4100 SPI Reconfig

Hi Analog Devices team!

Quick question for you - I've been playing with the ADPD4100 and trying to reconfigure a few registers rapidly after a set of timeslots has completed so that different LEDs are active for timeslots A-I on the following cycle. I've initially done this with many calls to adi_adpddrv_RegWrite(), but only 1 register is reconfigured at a time, with a ~10us delay (for my MCU) between SPI writes.

When I try to increase the SPI rate by writing new values to 2 or more registers with no delay in between, it seems that the ADPD4100 exhibits odd behavior (either stops working completely or has unexpected values), even though an oscilloscope shows the same values are being written as when repeatedly calling adi_adpddrv_RegWrite().

Is there any intermediate approach that will allow one to rapidly reconfigure the device? What is the minimum time required between SPI register writes to the ADPD4100 for reconfiguration on the fly?

Thank you very much!


  • Hi Tyler,

    Can you specify the writing sequence in your code? are you writing registers after receiving success code from driver?


    Sathishkumar K

  • Hi Sathishkumar,

    Sure! Here's an example - I prepare a transmit buffer containing eight bytes, and write all eight bytes out via a single call to

    Adpd400x_SPI_Transmit(anTxDatanTxSize), where nTxSize = 8.

    In one example, the registers and values I'm writing are: {0x0102, 0x0001}, {0x0105, 0x0010} - which gets processed in the usual way (last bit high, MSB first) before being written in succession.

    Hope that helps!


  • Hi,

    Seems your are writing register continuously without desert Chip Select between first and second register. 

    In the example you are trying too write 0x102 & 0x105 register, if you are not dessert the CS pin then the ADPD4xx device will assume the next byte is register value. So, as per your code 0x105 value will be written to 0x102 register.

    Continuous write can be used for continuous registers only.

    You can find those details in data sheet under SPI Operation section.


    Sathishkumar K