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.

Can c6678 be booted from directly i2c eeprom ????

Hi All,

I just want to know Can c6678 be booted from directly i2c eeprom ????

any help with this regard would be highly appreciated !!

rgds'

Gourav

  • Hello Gourav,

    The C6678 device supports I2C boot from EEPROM.

    Please refer section 2.5.2.5 I2C Boot Device Configuration in device datasheet (SPRS691E).

    Regards,

    Senthil

  • HI Gourav,

    Have you using EVM or custom board? EVM have two EEPROM (0x50 and 0x51) 0x51 EEPROM bus address reserved for IBL programming. User can use 0x50 EEPROM bus address for I2C booting.

    Please refer to C:\Program Files\Texas Instruments\mcsdk_2_00_00_xx\tools\post\docs\README.txt on how to build POST and program POST to EEPROM bus address 0x50.

    Refer EEPROM writer document to flash the binary to EEPROM (C:\ti\mcsdk_2_01_02_06\tools\writer\eeprom\docs\Readme.txt)
    Refer section "4.2. Verifying POST" on C:\ti\mcsdk_2_01_02_06\tools\program_evm\program_evm_userguide.pdf to validate the i2c boot.

    Thanks,

  • Hi Ganapathi,
    Thanks for you reply... We are working on our custom board....
    case1: when i compiled post_evmc6678 with some changes the following observation i have taken,

    post_evmc6678.out file size is 501KB
    with this .out file we have generated .bin file which is being fused in EEPROM. By using utilities hex6x.exe,b2i2c.exe,b2ccs.exe, romparse, ccs2bin.exe. and finally got post.bin file with size 69KB.(which is supposed to be loaded in eeprom because its size is 128KB)(i2crom.ccs=206KB).
    After that when i dump this file via eeprom writer i got this error:
    [C66xx_16] EEPROM Writer Utility Version 01.00.00.05

    The data file is too big to fit into the device.
    data length 8807692: data_lenError in parsing CCS file post.bin

    Case2: when i used evm eeprom50.bin file so i met with this error:
    EEPROM Writer Utility Version 01.00.00.05

    Writing 48280 bytes from DSP memory address 0x0c000000 to EEPROM bus address 0x0050 starting from device address 0x0000 ...
    Returned platform error number is 4
    EEPROM write failed



    pls look into it ...and give your feedback !!
    rgds'
    Gourav
  • Hi Gourav,

    Have you using post_romparse.bat file for converting .out file to .bin format?

    Have you using the same EEPROM chip on your custom board?

    Please try to flash the default binary(C:\ti\mcsdk_2_01_02_06\tools\program_evm\binaries\evm6678l\eeprom50.bin) to EEPROM and validate the I2C boot.
    Thanks,
  • hi Ganapathi,

    can you pls tell me the out file which is located at C:\ti\mcsdk_2_01_02_05\tools\program_evm\binaries\evm6678l\eepromwriter_evm6678l.out
    in which mode big endian or little endian ????

    rgds,
    Gourav
  • Hi Ganapathi,
    I changed my setting from big endian to little and it works(.out). but after that it gives us this following error,

    Writing 48280 bytes from DSP memory address 0x0c000000 to EEPROM bus address 0x0050 starting from device address 0x0000 ...
    Returned platform error number is 4
    EEPROM write failed.

    pls look into it.

    rgds,
    gourav
  • Hi,

    eepromwriter_evm6678l.out - is a EEPROM writer file.
    Have you using the same EEPROM chip on your custom board?

    Refer EEPROM writer document to flash the binary to EEPROM (C:\ti\mcsdk_2_01_02_06\tools\writer\eeprom\docs\Readme.txt)

    Please try to flash the default binary(C:\ti\mcsdk_2_01_02_06\tools\program_evm\binaries\evm6678l\eeprom50.bin) to EEPROM and validate the I2C boot.

    Thanks,
  • Steps to program the EEPROM with a binary file (.bin):

    1. Be sure to set the boot mode dip switch to no boot/EMIF16 boot mode on the EVM.

    2. Copy the binary file(C:\ti\mcsdk_2_01_02_06\tools\program_evm\binaries\evm6678l\eeprom50.bin) to writer\eeprom\evmc66xxl\bin directory and remame the file to app.bin

    3. Change the file_name, bus_addr, start_addr and swap_data in writer\eeprom\evmc66xxl\bin\eepromwriter_input.txt if necessary. Make sure that file_name is set to the name of your binary file.

    *By default the EEPROM writer will load app.dat to DSP memory and write the data to I2C slave bus address 81 (0x51) at EEPROM device start byte address 0 with data swap disabled (0).

    4. Open CCSv5 and launch the evmc66xx emulator target configuration and connect to core 0.

    5. Load the program writer\eeprom\evmc66xxl\bin\eepromwriter_evm66xxl.out to CCS, be sure evmc66xxl.gel is used in CCS
    and DDR is intialized.

    6. Open the Memory view (in CCSv5, view->Memory Browser), and view the memory address 0x0C000000.

    7. Load your .bin file from step 3 to 0x0C000000:
    * In CCSv5, right click mouse in memory window, select "load memory".
    * Browse and select your binary file.
    - By default, the browse menu only displays .dat files. You will have to change the option
    TI Data Format (*.dat) to Raw Data Format (*.bin) to find your binary file.
    * Click "Next".
    * Change the Start Address to "0x0C000000" if it is not 0x0C000000.
    * Change the Type-size to 32 bits if it is not 32 bits.
    * Make sure the swap checkbox is unchecked.
    * click "Finish".

    8.After the data file is loaded into the memory, run the program (in CCSv5, press F8), it will start to program the
    EEPROM.

    9.When programming is completed, the console will print "EEPROM programming completed successfully", if there
    is any error, the console will show the error message.
  • hi,
    eepromwriter_evm6678l.out - is a EEPROM writer file. --> i understood
    Have you using the same EEPROM chip on your custom board? --> yes

    Refer EEPROM writer document to flash the binary to EEPROM (C:\ti\mcsdk_2_01_02_06\tools\writer\eeprom\docs\Readme.txt) --> followed the sequence

    Please try to flash the default binary(C:\ti\mcsdk_2_01_02_06\tools\program_evm\binaries\evm6678l\eeprom50.bin) to EEPROM and validate the I2C boot. --> using this file only


    and got this error,

    Writing 48280 bytes from DSP memory address 0x0c000000 to EEPROM bus address 0x0050 starting from device address 0x0000 ...
    Returned platform error number is 4
    EEPROM write failed.


    rgds,
    gourav
  • Hello Gourav,

    The same setup is working fine on our EVM board.

    So i suggest you to check your hardware connections.

    Regards,

    Senthil

  • hi,
    one more thing after putting eeprom50.bin file to writer\eeprom\evmc66xxl\bin folder should i need to build the project again ??? as of now im not building it since i used eepromwriter_evm6678l.out file located at C:\ti\mcsdk_2_01_02_05\tools\program_evm\binaries\evm6678l\eepromwriter_evm6678l.out .


    another doubt is what does it means "Returned platform error number is 4"??
    rgds,
    gourav
  • Hi Ganapathi/ Senthil,
    I understood that it is working in your EVM thats why i want to figure out whats going wrong here.... Could you pls answer my above question ????


    rgds,
    Gourav
  • Hello Gourav,

    What is the I2C slave address of EEPROM ?

    Please share the schematic snapshot of EEPROM portion for connection review ?


    Regards,
    Senthil

  • I think EEPROM writer code receive Platform_EUNSUPPORTED return message form platform_device_write function. That means your EEPROM slave address is not active. Please check the i2c connection on your custom board.

    For more information refer platform.c file(C:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\src\platform.c).

    #if (PLATFORM_EEPROM_IN) && (PLATFORM_EEPROM_WRITE_IN)
    
    	if (deviceid == PLATFORM_DEVID_EEPROM50) {
    	   if (i2cEepromWriteByteAddr(offset, 0x50, buf, len, I2C_RELEASE_BUS) != I2C_RET_OK) {
    	       IFPRINT(platform_write("platform_device_write: EEPROM write for address 0x%x failed\n", 0x50));
    	       platform_errno = PLATFORM_ERRNO_EEPROM;
    	       return ( (Platform_STATUS) Platform_EFAIL);
    	    }
        	return Platform_EOK;
    	}
    
    	if (deviceid == PLATFORM_DEVID_EEPROM51) {
    	   if (i2cEepromWriteByteAddr(offset, 0x51, buf, len, I2C_RELEASE_BUS) != I2C_RET_OK) {
    	       IFPRINT(platform_write("platform_device_write: EEPROM write for address 0x%x failed\n", 0x51));
    	       platform_errno = PLATFORM_ERRNO_EEPROM;
    	       return ( (Platform_STATUS) Platform_EFAIL);
    	    }
        	return Platform_EOK;
    	}
    
    #endif
    
    	return Platform_EUNSUPPORTED;

    Thanks,

  • Hi Senthil,

    I2C address of EEPROM: 0x50

    PFA for EEPROM schematic part.

    rgds,

    GouravEEPROM_U88.pdf

  • Hi Ganapathi,
    1) I am setting 0x50 as slave address for EEPROM. As you already mentioned in earlier post.
    2) I think EEPROM writer code receive Platform_EUNSUPPORTED return message form platform_device_write function. That means your EEPROM slave address is not active. Please check the i2c connection on your custom board.

    how to check it ???

    3) Its regarding NAND boot: Can we boot DSP directly from NAND flash or I2C EEPROM is required as a second stage boot loader ???

    rgds,
    Gourav
  • Hi,

    If the EEPROM slave address is correct means you got "platform_device_write: EEPROM write for address 0x%x failed\n" error message at write failed condition. In your case you did not recevie the error, that means both deviceid's(PLATFORM_DEVID_EEPROM50 and PLATFORM_DEVID_EEPROM51) are not matching.

    #if (PLATFORM_EEPROM_IN) && (PLATFORM_EEPROM_WRITE_IN)
    
        if (deviceid == PLATFORM_DEVID_EEPROM50) {
           if (i2cEepromWriteByteAddr(offset, 0x50, buf, len, I2C_RELEASE_BUS) != I2C_RET_OK) {
               IFPRINT(platform_write("platform_device_write: EEPROM write for address 0x%x failed\n", 0x50));
               platform_errno = PLATFORM_ERRNO_EEPROM;
               return ( (Platform_STATUS) Platform_EFAIL);
            }
            return Platform_EOK;
        }
    
        if (deviceid == PLATFORM_DEVID_EEPROM51) {
           if (i2cEepromWriteByteAddr(offset, 0x51, buf, len, I2C_RELEASE_BUS) != I2C_RET_OK) {
               IFPRINT(platform_write("platform_device_write: EEPROM write for address 0x%x failed\n", 0x51));
               platform_errno = PLATFORM_ERRNO_EEPROM;
               return ( (Platform_STATUS) Platform_EFAIL);
            }
            return Platform_EOK;
        }
    
    #endif
    
        return Platform_EUNSUPPORTED;

    Probe the SCL and SDA pins to valitate the I2C communication between DSP to EEPROM.

    Second stage bootloader is required for NAND boot. Refer below wiki link for more information

    http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide#Intermediate_Boot_Loader_.28IBL.29_and_Examples

    Thanks,

  • hi Ganapathi,
    As far as i understood, this second stage bootloader is required to do workaround for PLL at 1250 MHz but suppose my DSP freq. is 1000Mhz or less so what ??? i mean in that case also I2C second stage boot loader will be required ???

    rgds,
    Gourav
  • Hi Ganapathi,
    Let me refresh our scenario once again,
    In our custom board, now we are able to write eeprom50.bin
    which is located at C:\ti\mcsdk_2_01_02_05\tools\program_evm\binaries\evm6678l

    we get successfully eeprom written message.
    But, im not getting any print through UART when i change the boot mode from no boot(000) to I2C mode(101). I observed that when i do power off/on, signals are moving out on SCL and SDA line.

    So now question is how to verify the eeprom is flashed properly or not???
    what information does eeprom50.bin contains ??? any register can be read to verify or something else is required???

    rgds,
    Gourav
  • Hi,

    EEPROM writer code verify the eeprom is flashed properly or not. If eeprom is not flashed properly means you did not get "EEPROM programming completed successfully" message in debug window.

        /* Write the EEPROM */
        if (flash_eeprom (p_device) == FALSE)
        {
            printf ("EEPROM write failed\n");
            platform_device_close(p_device->handle);
            return;
        }
    
        /* verify the flash */
        if(flash_verify (p_device) == FALSE)
        {
            printf ("EEPROM read verify failed\n");
            platform_device_close(p_device->handle);
            return;
        }
    
    
        printf ("EEPROM programming completed successfully\n");

    Refer section 4.2. Verifying POST on program evm userguide (ti\mcsdk_2_01_02_06\tools\program_evm\program_evm_userguide.pdf) to verify the I2C boot.

    eeprom50.bin is a binary file Power On Self Test (POST).

    Thanks,

  • Hi Ganapathi,
    After flashing eeprom50.bin, I got this message,

    "EEPROM Writer Utility Version 01.00.00.05

    Writing "xx" bytes from DSP memory address 0x0c000000 to EEPROM bus address 0x0050 starting from device address 0x0000 ...
    Reading "xx" bytes from EEPROM bus address 0x0050 to DSP memory address 0x0c010000 starting from device address 0x0000 ...
    Verifying data read ...
    EEPROM programming completed successfully"
    where "XX" number of bytes.

    but still im not getting any print on screen.

    Another doubt is regarding EEPROM size, As far as i understood this is divided into two parts with address 0x50 and 0x51.
    so my questions are:
    1) what is the size of each block ?? 64KB ???
    2) if yes, that means i can't able to dump data> 64 KB in one block.
    3) can 0x51 block store the remaining data?? if yes so what should be the boot parameter table values? Shell we use "next_dev_addr_ext = 0x51" or something else??


    i attached .map file here which is being used by me,


    section {
    boot_mode = 40
    param_index = 0
    options = 1
    multi_i2c_id = 0
    my_i2c_id = 10
    core_freq_mhz = 1000
    i2c_clk_freq_khz = 100
    exe_file = "G:\GOURAV\TI6678_BOOT_I2C\post.btbl.i2c.ccs"
    dev_addr_ext = 0x50
    next_dev_addr_ext = 0x51
    address_delay = 0
    sw_pll_prediv = 0
    sw_pll_mult = 0
    sw_pll_postdiv = 0
    sw_pll_flags = 0
    }

    waiting for your reply ....

    thanks
    Gourav
  • Yes, the block size is 64KB.

    what is size of your binary file?

    Thanks,
  • Hi,

    I think EEPROM WCF should be low during Writting..

    Ashok.M
  • Binary is 74 KB. So how can i use EEPEOM ???