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.

ADS54J42: C Code to read and write all registers, all banks, all pages

Part Number: ADS54J42

Hello,

I am having a difficult time reading and writing all registers, all banks, and all pages of the ADS54J42.  I don't understand the documentation on how to switch banks and pages.  Does someone have some real-world examples or C language code that would help me?  Thanks.

Below is an example of my difficulty.  I want to write the JESD digital page register 0x01 and then read it back.  Below is my code.  What am I doing wrong?

WriteBuffer[0] = 0x40;
WriteBuffer[1] = 0x03;
WriteBuffer[2] = 0x00;
XSpi_Transfer(SpiInstancePtr, WriteBuffer, NULL, 3);

WriteBuffer[0] = 0x40;
WriteBuffer[1] = 0x04;
WriteBuffer[2] = 0x69;
XSpi_Transfer(SpiInstancePtr, WriteBuffer, NULL, 3);

WriteBuffer[0] = 0x00;
WriteBuffer[1] = 0x01;
WriteBuffer[2] = 0x02;
XSpi_Transfer(SpiInstancePtr, WriteBuffer, NULL, 3);

WriteBuffer[0] = 0xE0;
WriteBuffer[1] = 0x01;
WriteBuffer[2] = 0x00; // don't care
XSpi_Transfer(SpiInstancePtr, WriteBuffer, ReadBuffer, 3);

  • SPI writes.docxTony,

    See if the attached document helps. Use this with the SPI info shown in the data sheet.

    Regards,

    Jim

     

  • Hi Tony,
    For reference refer to SPI operation starting on page 33 of www.ti.com/.../ads54j42.pdf
    I find flow chart on page 43 is also helpful.

    Some example register writes are shown on page 46, let's take a deeper look at Table 16 on this page
    (There was a comment typo in the datasheet that I have corrected below)
    SPIw(0x40 04 69); // select JESD digital page (0x69 .. )
    SPIw(0x40 03 00); // select JESD digital page (0x.. 00)
    // register page is now 0x69 00

    SPIw(0x60 01 02); // set digital 2x mode

    SPIw(0x40 04 6A); // select JESD analog page (0x6A .. )
    // register page is now 0x6A 00

    SPIw(0x60 16 02); // set SERDES PLL 40x

    So, in general :
    First 4 bits written are 0x4 or 0x6
    0x4 SPI write, JESD SPI bank, Page select, [both channels]
    0x6 SPI write, JESD SPI bank, Register access, [both channels]
    next 12 bits are register location
    final 8 bits are 'data'
  • (continued)
    I'll attempt to update your request based on the example:
    // JESD digital page register 0x01 and then read it back
    SPIw(0x40 03 00);
    SPIw(0x40 04 69);
    // register page is now 0x69 00
    SPIw(0x60 01 02); // fixed from SPIw(0x00 01 02);
    // set JESD mode 2X
    SPIr(0xE0 01 00); // should read from 0x69 00 : 01

    Regards,
    Brian
  • Hi Jim, I did exactly as you say but got nothing back (or all zero bits) from the ADS54J42. The interesting thing is that the following works:

    SPIw(0x00 0x11 0x80)
    SPIw(0x00 0x23 0x0F)
    SPIr(0x80 0x23 0x00)
    Here I get back 0x0F, as expected.

    Any ideas?
  • Tony,

    The device will allow you to write and read from the general registers and Master page, but requires the SYSREF and device clock to be running to allow access to all of the other registers.

    Regards,

    Jim

  • Hi Jim,

    When you say "device clock" you mean CLKINP and CLKINM, correct? Thanks.

    T
  • Correct.

  • I was missing SYSREF.  Now I can write and read all banks, pages, and registers except the JESD Analog Page (0x6A00).  Is there an additional clock or signal I might be missing?  Thanks.

  • Additional information: The ADS54J42 syncs up with my JESD204 RX chip.  This implies that all the digital interfacing is working. However, the data that I get is all zeros.  This coupled with the fact that I can't read meaningful values from the JESD analog page registers is baffling me.  I have verified that all the power supplies look good (AVDD, AVDD3V, DVDD, IOVDD).  Thanks for the help and any suggestions.

  • Also, I am able to turn on the transport layer test pattern and the data I receive looks correct. Again, thanks.
  • Tony,

    You must first do a digital reset before you can access this register. Do this by writing a 0x01 then a 0x00 to address 0x6800 in the main digital page.

    Regards,

    Jim

  • Tony,
    Please confirm that you are writing the following to access the JESD analog pages:
    SPIw 4003 00
    SPIw 4004 6A
    SPIr E016 00 // read from JESD Analog page 6A00 register 16 JESD PLL mode

    I am fairly certain that the entire JESD analog page registers initialize as 0x00. So, please confirm if you are able to write one of the valid R/W bits and then read back.

    Regards,
    Brian