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.

PCI Configuration Data for Auto-Init Checksum and I2C Address

Other Parts Discussed in Thread: TMS320DM6437

hi,

I'm using a TMS320DM6437 plugged in to a PCI slot. I want to change the default Vendor/Device ID so I need to program the I2C eeprom with new data starting at 0x400 as explained by the "Using the TMS320DM643x Bootloader" SPRAAG0.

I have two questions about this

1)  The document states 0x41a/0x41b contains a check-sum for the Auto-Init data. How do I calculate this check-sum?

2) What I2C address does the DSP use when it talks to the eeprom device to read the PCI configuration data out during power up?

thank you

Chris Hossack

  • hi,

    after some searching I have found the following answers to some of my questions

    2) I2C address is 0x50. I'm using a Digital Spectrum 6437 evm board. I connected some probes and made the following measurments from power up.
                               
                                                  6ms
                                           : 8ms ____
    I2C         --------------------------------<____>
                                           :
                                           :__________
    nReset      ___________________________|

                                  16us-->  :<---
                                         _____________
    nResetOut   _________________________|
                                           :
                                    <-2ms->:
                                    __________________
    nPCI_RST    ___________________|
                                           :
                    <----322ms ------------>:
                   ___________________________________
    nPOR        ___|


    8ms after nReset goes high the DSP access the I2C clocking at 390kHz. (total time is aprox 6ms)

    There are 28 reads, eg

        for n = 0 to 27

            write 0x50, 0x40, 0x00+n, read 0x50, <pci configuration data>


    After 305ms (PC dependant) the PC attempts to reads the PCI configuration registers


    1) Other PCI documents for similar DSP chips state the checksum is a simple XOR of the PCI configuration data.

    I've tried using the XOR checksum and wrote data to the eeprom, but when I power up the PC it just hangs. After connecting a JTAG I noticed that PCICFGDONE is set to zero. This means the PCI configuration wasn't completed. I'm guessing it's my checksum.

    Does anybody have an example of the 28 bytes of PCI configuration data I can use as test case?

    cheers

    Chris

  • hi,

    After getting in contact with TI directly they are now releasing a new version of the document "Using the TMS320DM643x Bootloader - SPRAAG0E" which contains the vital missing information, which is different from their other chips. Below is the vital information.

    0x41a Byte Checksum
    0x41b Reserved (must use 0xAA)

    Byte Checksum = AAh XOR Byte0(400h) XOR Byte1(401h)… XOR Byte25(419h)

    I've written a test program below that might be helpful to future people using the Autoinitialization for the 643x


    void WritePciConfiguration( void )
    {
        int i;
        uint8_t data[0x1C];

        uint16_t VendorId           = 0x104C;
        uint16_t DeviceId           = 0xB001;
        uint32_t ClassCode          = 0x118000;
        uint16_t SubsystemVendorID  = 0;
        uint16_t SubsystemID        = 0;
        uint8_t Max_Latency         = 0;
        uint8_t Min_Grant           = 0;
        uint8_t RevisionId          = 0;
        uint8_t Checksum            = 0;

        data[0x00] = VendorId>>8;                   //400h Vendor ID [15:8]
        data[0x01] = (uint8_t)VendorId;             //401h Vendor ID [7:0]
        data[0x02] = DeviceId>>8;                   //402h Device ID [15:8]
        data[0x03] = (uint8_t)DeviceId;             //403h Device ID [7:0]
        data[0x04] = ClassCode;                     //404h Class code [7:0]
        data[0x05] = RevisionId;                    //405h Revision ID [7:0]
        data[0x06] = ClassCode>>16;                 //406h Class code [23:16]
        data[0x07] = ClassCode>>8;                  //407h Class code [15:8]
        data[0x08] = SubsystemVendorID>>8;          //408h Subsystem vendor ID [15:8]
        data[0x09] = (uint8_t)SubsystemVendorID;    //409h Subsystem vendor ID [7:0]
        data[0x0A] = SubsystemID>>8;                //40Ah Subsystem ID [15:8]
        data[0x0B] = (uint8_t)SubsystemID;          //40Bh Subsystem ID [7:0]
        data[0x0C] = Max_Latency;                   //40Ch Max_Latency
        data[0x0D] = Min_Grant;                     //40Dh Min_Grant

        data[0x0E] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x0F] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x10] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x11] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x12] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x13] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x14] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x15] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x16] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x17] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x18] = 0x00;   //40Eh-419h Reserved (use 00h)
        data[0x19] = 0x00;   //40Eh-419h Reserved (use 00h)

        Checksum = 0xAA;
        for ( i = 0; i <= 0x19; i++ )
        {
            Checksum ^= data[i+0];
        }

        data[0x1A] = Checksum;  //419h Checksum [7::0]
        data[0x1B] = 0xAA;      //41Ah Reservered

        NvdWrite(0x400, data, sizeof(data) );

        memset(data,0,sizeof(data));

        NvdRead(0x400, data, sizeof(data) );

    }

    Cheers

    Chris