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.

LMK04821: read and write registers

Part Number: LMK04821

Hello,

 One customer used LMK04821 and the SPI timing is as following, the read timing  is according to the datasheet : R/W(read=1)+W1W0(00)+A12A0 +data, but when he read back any registers, the value is always 0x00. The problem is that he could write the registers, but couldn't read back any value. Please help to analyze.

Best regards

Kailyn 

  • Hi Kailyn,

    LMK04821 supports 3-wire readback and 4-wire readback, and can support both simultaneously.

    For 3-wire mode:

    • 3-wire mode is controlled by SPI_3WIRE_DIS field in R0. If SPI_3WIRE_DIS=1, no 3-wire transaction will occur. If SPI_3WIRE_DIS=0, the SDIO pin on LMK04821 will be turned around from input to output on the 16th falling edge of the SPI transaction.
    • SDIO_RDBK_TYPE field controls whether 3-wire SPI uses open-drain or push-pull signaling. The POR default is open-drain (1) so unless there is a pull-up resistor on SDIO, they will not see any signal on the output. If SDIO_RDBK_TYPE=0, the SDIO pin will be set to push-pull mode. Be careful in push-pull mode that there is no bus conflict on the data line.

    For 4-wire mode:

    • One of the GPIO pins (STATUS_LDx, CLKIN_SELx, RESET) must be repurposed for SPI readback by setting the appropriate _TYPE register for that GPIO to SPI readback and setting the output style to one of the open-drain or push-pull options. This transforms the GPIO into the device's SDO pin.
    • Multiple pins can actually be configured as SPI SDO, if for some reason needed to do this.
    • 4-wire mode can be enabled simultaneous to 3-wire mode as well, if for some reason needed to do this.

    Thanks!

    Regards,

    Ajeet Pal