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.

LP-AM243: Where is the function that write ESI data to eeprom after boot?

Part Number: LP-AM243

Tool/software:

Hi team,

I develop application with "ethercat_slave_demo".

Which is the function that write ESI data to eeprom offset 0x200 after boot?

and where is this function executed?

Best regard,

oyama

  • Hello Oyama,

    The API EC_API_SLV_init() takes care of EEPROM initialization and loading data into the EEPROM. This API is called from the API EC_SLV_APP_SS_applicationInit() in EtherCAT Slave Simple demo.

    Kind Regards,

  • Hi Harsha,

    The function EC_SLV_APP_EEP_write() is the writing section? 
    I understand that the struct ESL_EEP_EC_info refers EtherCAT Slave Controller register, and this struct is wrought to EEPROM, is it right?

    Best regard,

    oyama

  • Hello Oyama,

    The API EC_SLV_APP_EEP_write() is responsible for writing the data it receives to EEPROM using NVM write API and is registered using the API
    EC_API_SLV_EEPROM_cbRegisterWrite() in the application. The stack internal APIs call this API EC_SLV_APP_EEP_write() to write the data to EEPROM.

    The struct ESL_EEP_EC_info defines only the first 30 bytes of the EEPROM content, and it is used to verify the integrity between EEPROM data and application data when writing data to EEPROM. Please refer the API EC_SLV_APP_EEP_verifyIntegrity(). 

    The API EC_SLV_APP_EEP_write() always writes the data into EEPROM at the offset 0x200. The size of the data to be written to the EEPROM must be greater than the size of the structure ESL_EEP_EC_info. Yes. the struct ESL_EEP_EC_info data is written to EEPROM.

    Kind Regards,