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.

A problem with eeprom (nor) writer on 6678 custom board without DDR3

Hi

I have a 6678 custom board without DDR3 and I want to write a simple program on eeprom or nor flash. I set the dip switches on no boot and load "eepromwriter.out" on core 0. After that I load my bin file on MSMCSRAM memory on address"0x0c000000". When I run the program I face with error on line 188.

if(platform_device_write(p_device->handle, eepromWriterInfo.startAddr, scrach_block, eepromWriterInfo.writeBytes) != Platform_EOK)

I can not understand. Do you know what is my problem?

  • Hi Armin,
    Have you modified the writer program for this purpose? Please list the changes. I recommend you to understand the platform eeprom driver and its functions. Thank you.
  • Hi,

    Have you checked the bin file is properly loaded on MSMCSRAM memory address"0x0c000000"?

    Please refer the eeprom writer readme file and follow the steps to flash the bin file to eeprom memory.
    MCSDK Path: \ti\mcsdk_2_01_02_06\tools\writer\eeprom\docs\Readme.txt

    Copy the binary file to writer\eeprom\evmc66xxl\bin directory.
    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).

    Thanks,
  • Hi Raja

    I don't change any line of eeprom witer program because it doesn't use DDR3 and it is fit for my purpose. I sent you my eeprom schematic and it is compatible with evaluation board.

    eeprom schematic1.pdf

  • Hi Ganapathi
    I test my work on evaluation and it is worked but in my custom board I have problem with the following error:

    [C66xx_0] EEPROM Writer Utility Version 01.00.00.05

    Writing 4432 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

    As I understand, this problem is for "platform_device_write" which is not ok but I don't know why?
  • Hi Armin,

    Thank you for confirming. Are you running pre-built binaries of MCSDK2.x on custom board?

    If yes, there may be issue. You need to re-build the platform library for custom board with incorporated changes of custom board.

    Please update platform_init of PDK for custom board. Please refer below e2e post for changes,

    e2e.ti.com/.../1684363

    Thank you.
  • Hi Raja
    Thanks for your response. Yes, I am running pre-built binaries of MCSDK2.x on custom board and I don't change any thing in platform library. Let me see the link which you sent. I will confirm if my problem is resolved.
  • Hi Raja
    I read the refer e2e post which you sent and now I know that I must change platform_init in platform.c for ignoring DDR3 but I don't know what change I must do?
  • Hi,

    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).

    Are you using the same EEPROM chip(EVM) and slave address on your custom board?

    #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 Ganapathi

    I don't think so. I sent my schematic before in previous messages. I used the same EEPROM in my custom board. I think my problem is in Platform_Init because I don't use DDR3 in my board and I think it is effective on Platform_Init fenction.

    Also I have another question in this issue. I had a test on evaluation board for testing Platform_Init function. I commented this function in "eepromwriter.c" and used gel file for initializing the evaluation but didn't work. Is my work right or not? 

  • Hi,

    I don't think so. I sent my schematic before in previous messages. I used the same EEPROM in my custom board. I think my problem is in Platform_Init because I don't use DDR3 in my board and I think it is effective on Platform_Init fenction.

    Thanks for your information. It is not a platform_init code issue for your custom board, If platform_init function failed means you get "Platform init failed!" error log on your debug console. EEPROM driver not able to access eeprom chip on your custom board, please try to run the OOB demo on your custom board and validate the eeprom access or run i2c test application to validate the eeprom on your custom board.

    Thanks,
  • Hi Ganapathi

    In my test I get "Platform init failed!" error log on my console window. Unfortunately I don't know  what is OOB demo and how I can run I2C test application. I'm sure about my EEPROM's type. Also my schematic is the same evaluation board.

  • Hi,

    As per your previous post debug log message, i did not see platform init failed error.

    [C66xx_0] EEPROM Writer Utility Version 01.00.00.05

    Writing 4432 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

    Refer below wiki link to run the OOB demo on your custom board to validate the EEPROM.

    MCSDK Path: \mcsdk_2_00_05_17\demos\hua\

    Thanks,

  • Hi
    Thanks for your responsibility. In my custom board which don't use DDR3, I face with Platform_Init failed but when I comment Platform_Init function in "eepromwriter.c" and use "evmc6678l.gel" for initializing, I face with error that you sent:

    [C66xx_0] EEPROM Writer Utility Version 01.00.00.05

    Writing 4432 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

    why this error happen? I test initializing with gel file on my board and evaluation and none worked.