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.

TPS929120-Q1: EEPROM Programming Issue

Part Number: TPS929120-Q1

I am having issues programming the EEPROM region on the TPS929120 device.  I am attempting to configure the device to use internal addressing instead of using the external ADDR pins.

I am using the TPS929120-Q1 EEPROM Configuration Tool_Rev.A.xlsx tool to populate my EEPROM and am using the CRC generated when I attempt to program the EEPROM.  It appears the excel tool generated CRC does not match the CRC calculated internally in register FLAG7.  Because of this, I am getting a CRC mismatch error.  I do not understand how the FLAG7 CRC is calculated.  It looked to me like every time I reprogrammed all of EEPROM using all of the same values but with a different CRC in EEPM15, the CRC in FLAG7 was changing.  It was behaving like EEPM15 was being used to calculate the CRC in FLAG7 which wouldn't make any sense.    To get around this error, I simply took what was populated in FLAG7 after an EEPROM burn and then I programmed only that into EEPM15.  This appeared to fix the mismatch issue, but as soon as i did that something broke because now the ERR pin is being held low I am no longer able to communicate to the device over serial. 

I was able to resume communication with the device by driving the REF pin high.  It looked like EEPROM was configured correctly when I read the EEPROM region, but whenever I release the REF pin, I am getting no responses from the device which to me indicates I have an addressing issue.

Thanks in advance.

Karl

  • Hi 

    I will check your set and reply you later.

  • Still stuck on this issue.  I am now in a scenario where I am able to talk to the device only when I pull the ref pin high.  I am able to modify EEPROM however the Flag 7 and Flag 8 registers are reading back 0 and are not changing when EEPROM is modified.  Any help would be great.

    Thanks, 

    Karl

  • I have this issue mostly solved and I am going to jot my findings down here in case anyone every comes across this issue.

    1. In section 7.5.4.4 of the data sheet it says "The REF pin can be released after EEPROM burning if it is pulled high to 5 V for chip selection."  It really should say "The REF pin MUST be released after EEPROM burning if it is pulled high to 5 V for chip selection."  I found that some registers were not getting updated until i released the REF pin.

    2. After burning EEPROM I am also power cycling the device which also seemed to be required for updating some registers.

    3. The TPS929120-Q1 EEPROM Configuration Tool_Rev.A.xlsx tool is useless.  I have 3 different TPS929120 chips all programmed with the same EEPROM values and they all gave me a different CRC value in the FLAG7 register none of which matched what was given me in the excel tool.

    I wrote a EEPROM Programming app and here is the basic flow.

    1. Write the EEPROM values that I want with a dummy CRC value in EEPM15.

    2. Power cycle device and clear fault flags

    3. Read register FLAG7

    4. Write identical EEPROM values except sub in the CRC value I just got from FLAG7.

    5. Power cycle and clear fault flags.

    That seems to work.  I am not sure this is a viable solution for a production environment.

    Can someone please tell me - how is the CRC in register FLAG7 calculated?

    Thanks, 

    Karl

  • HI Karl

    FLAG7 is calculated by the polynomial X8 + X5 + X4 + 1(reference the 7.3.5.12). And the value of input bit is the value of all E2PROM's shadow register .

    So you have to write all the value to the shadow register then burn to E2PROM(not only the value you change).

    You can read the E2PROM value after burn to confirm whether it's the value you want.

  • Thanks for the reply, Frank.

    I have moved past this issue because I have the workaround described above.  But what you describe has not been my experience.  How would it be possible for 3 separate chips with all the same EEPROM values to have a different CRC for each?

    Thanks, 

    Karl

  • I think the answer to your problem is as follows: 

    Do you calculate the CRC from the lowest EEPROM address to the highest EEPROM address? if so, then don't. You need to calculate it the other way around. 

    Here's a code you can run in any online compiler. The reversed print is the correct CRC calculated. You can change the "data" array with the register's values in the corresponding order.

    Let me know if this solves your issue!

    #include <stdio.h>
    typedef unsigned char    uint8;
    
    #define CRC_ARRAY_SIZE                                      (256)
    
    const uint8 crc_array[CRC_ARRAY_SIZE] = 
    {0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,
    127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,
    254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,
    34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,
    102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,
    196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,
    248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,
    48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,
    112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,
    114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,
    240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,
    234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,
    72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,
    42,200,150,21,75,169,247,182,232,10,84,215,137,107,53};
    
    static uint8 CRCH_CalculateCrc(uint8* data_ptr, uint8 length);
    
    int main()
    {
        uint8 temp = 0;
        uint8 counter = 0;
        uint8 data[39] = {0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0x0F,
        0xFF,0x0F,0x00,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00};
        uint8 reverse[39];
        
        for(counter=0; counter<39; counter++)
        {
            reverse[counter] = data[39-counter];
        }
        
        temp = CRCH_CalculateCrc(data, 39);
        
        printf("%d\n", temp);
        
        temp = CRCH_CalculateCrc(reverse, 39);
        printf("%d\n", temp);
    
        return 0;
    }
    
    
    uint8 CRCH_CalculateCrc(uint8* data_ptr, uint8 length)
    {
        uint8 counter = 0;
        uint8 remainder = 0xFF;
        uint8 tempdata = 0;
    
        for(counter=0; counter<length; counter++)
        {
            /*input data byte XOR remainder*/
            tempdata = remainder^data_ptr[counter];
            /*use tempData as the index to retrieve its CRC from crcArray*/
            remainder = crc_array[tempdata];
        }
        /*Reverse the final remainder to get the CRC value*/
        remainder = 
        ((remainder & 0x80)>>7) + ((remainder & 0x40) >>5) + 
        ((remainder & 0x20) >>3) + ((remainder & 0x10)>>1) + 
        ((remainder & 0x08)<<1) + ((remainder & 0x04) <<3) + 
        ((remainder & 0x02) <<5) + ((remainder & 0x01)<<7);
        
        return remainder;
    }

  • Thanks for complement.

  • I am also experiencing this issue.

    Scenario: I want to program a 'standard' configuration into multiple TPS929120 chips.

    For development:

    I have set up my code to program all EEPROM values: EEPI0-EEPI11, EEPP0-EEPP11, EEPM0-EEPM11, EEPM15   (Note I am not writing EEPM12-EEPM14 as they are reserved).

    I run the code, power cycle the chip, read out CALC_EEPCRC and update EEPM15 to be equivalent to CALC_EEPCRC, then re-write the entire EEPROM with the updated value.  This works for that specific chip.


    The Problem:

    If I attempt to use the exact same EEPROM values on a different 929120, the value of CALC_EEPCRC is different and the CRC check fails.

    Question:

     

    1. Why is the CRC different between different chips when all of the EEPROM values are programmed the same?  Am I missing some hidden/reserved registers?
    2. In the manufacturing setting, I would like to validate that the chip has the expected CRC for EEPROM - if each chip requires/generates a different CRC, can you provide a robust way to validate all EEPROM values are correct?

  • Hi Lance,

    As you describe, you are using internal address in multiple devices E2PROM setting and program a 'standard' configuration into multiple, i want to check the process of EEPROM progress

    1)Do you use pull-up ref pin to select the device you want to program? And do you comply with the process of pull-up ref programming sequence ?

    2)Whether all device are on and  also on the UART bus when you program?

    3)As you describe "I run the code, power cycle the chip, read out CALC_EEPCRC and update EEPM15 to be equivalent to CALC_EEPCRC, then re-write the entire EEPROM with the updated value.  " Do you check the value is the value you want to write and whether the crc is same as the calculate tool.

    4) i also recommend you to set EEPM12-EEPM14 to 00 when you program EEPROM, you can try again and tell me the result,