cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

Anonymous
Not applicable

Hi All

In Datasheet (Document Number. 002 - 20502 Rev. E) of Emulated EEPROM (Em_EEPROM) 2.0.

In the description of ComponentntoFunction

1.cy_en_eeprom_return_value_t EmEEPROM_1_Init (uint32 startAddress)
   Please let me know the return value Type (Viod or uint32 or ...) and the result of this function.


2.cy_en_eeprom_return_value_t EmEEPROM_1_Write (uint32 addr, void * eepromData, uint32 size)
  Explanation and return value of parameter of this function Type (Viod or uint32 or ...) and the result.

3.cy_en_eeprom_return_value_t EmEEPROM_1_Read (uint32 addr, void * eepromDdata, uint32 size)
Explanation and return value of parameter of this function Type (Viod or uint32 or ...) and the result.

4.cy_en_eeprom_return_value_t EmEEPROM_1_Erase (void)
Please let me know the return value Type (Viod or uint32 or ...) and the result of this function.


Thank you.

0 Likes
1 Solution
himam_31
Employee

Hello,

1)The return value of EEPROM_Init() is 'cy_en_em_eeprom_status_t'. This is an enumerated datatype with the following definition. Basically it returns the status.The return value must be "CY_EM_EEPROM_SUCCESS" for proper operation.

/** EEPROM return enumeration type */

typedef enum

{

    CY_EM_EEPROM_SUCCESS      = 0x00uL,                             /**< The function executed successfully */

    CY_EM_EEPROM_BAD_PARAM    = (CY_EM_EEPROM_ID_ERROR + 1uL),      /**< The input parameter is invalid */

    CY_EM_EEPROM_BAD_CHECKSUM = (CY_EM_EEPROM_ID_ERROR + 2uL),      /**< The data in EEPROM is corrupted */

    CY_EM_EEPROM_BAD_DATA     = (CY_EM_EEPROM_ID_ERROR + 3uL),      /**< Failed to place the EEPROM in flash */

    CY_EM_EEPROM_WRITE_FAIL   = (CY_EM_EEPROM_ID_ERROR + 4uL)       /**< Write to EEPROM failed */

} cy_en_em_eeprom_status_t;

For all other functions also return value is with enumerated datatype cy_en_em_eeprom_status_t as explained above on section (1).

Please let me know if this helps.

Thanks,

Hima

View solution in original post

2 Replies
himam_31
Employee

Hello,

1)The return value of EEPROM_Init() is 'cy_en_em_eeprom_status_t'. This is an enumerated datatype with the following definition. Basically it returns the status.The return value must be "CY_EM_EEPROM_SUCCESS" for proper operation.

/** EEPROM return enumeration type */

typedef enum

{

    CY_EM_EEPROM_SUCCESS      = 0x00uL,                             /**< The function executed successfully */

    CY_EM_EEPROM_BAD_PARAM    = (CY_EM_EEPROM_ID_ERROR + 1uL),      /**< The input parameter is invalid */

    CY_EM_EEPROM_BAD_CHECKSUM = (CY_EM_EEPROM_ID_ERROR + 2uL),      /**< The data in EEPROM is corrupted */

    CY_EM_EEPROM_BAD_DATA     = (CY_EM_EEPROM_ID_ERROR + 3uL),      /**< Failed to place the EEPROM in flash */

    CY_EM_EEPROM_WRITE_FAIL   = (CY_EM_EEPROM_ID_ERROR + 4uL)       /**< Write to EEPROM failed */

} cy_en_em_eeprom_status_t;

For all other functions also return value is with enumerated datatype cy_en_em_eeprom_status_t as explained above on section (1).

Please let me know if this helps.

Thanks,

Hima

View solution in original post

Anonymous
Not applicable

Hi.Hima san

Thank you for your reply. 
I understand that.
Thank you very much.
Ichiro.

0 Likes
Top labels