Future Designs Inc. Forum


Future Designs, Inc. “Your Development Partner”

The forum is now open for registration to all! Email support@teamfdi.com to gain access.

You are not logged in.

#1 2012-07-12 22:04:20

fjrg76
Member
Registered: 2011-10-19
Posts: 16

EEPROM in UEZGUI-1788-43WQS

Hi

Does anyone has an little example that shows how to use the EEPROM module? I can't figure out how to use it, even reading the source code for this module. Look at this snippet (from EEPROM_NXP_LPC1788.c)

T_uezError EEPROM_NXP_LPC1788_SetConfiguration(void *aWorkspace,  T_EEPROMConfig *aConfig)
{
    T_EEPROM_NXP_LPC1788_Workspace *p = (T_EEPROM_NXP_LPC1788_Workspace *)aWorkspace;
    p->iConfig = *aConfig;
    return UEZ_ERROR_NONE;
}

The function is expecting a (void *) parameter, which should correspond (I guess) in the caller side a variable of type T_EEPROM_NXP_LPC1788_Workspace, however I cannot instantiate a variable of type T_EEPROM_NXP_LPC1788_Workspace because this structure is local to EEPROM_NXP_LPC1788.c (kind of encapsulation). If that is the case, then the API must provide a function that creates the instance, but there is not such a function.

One workaround is to move such a structure to the header file EEPROM_NXP_LPC1788.h, but I'm affraid to break the code. LPC1788 includes internal EEPROM, but the board design is also used for the LPC2478, that doesn't include internal EEPROM, so I'm thinking that the guys at FDITEAM wrote the code, but never test it, Why? I have three clues:

1.- There aren't examples
2.- There is a configuration table that does not include the internal EEPROM for the LPC1788:

// The following table is a growing list of eeprom types for easy config:
                                                          // kHz   bytes     ms
#define EEPROM_CONFIG_PCA24S08      400,    16,     10
#define EEPROM_CONFIG_M24C08        400,    8,      10
#define EEPROM_CONFIG_M24C32        400,    32,     10
#define EEPROM_CONFIG_M24LC256      400,    64,     5
#define EEPROM_CONFIG_M24LC64       400,    1,      5
#define EEPROM_CONFIG_PCF85102C     100,    8,      85
#define EEPROM_CONFIG_PCF8582C_2    100,    8,      85
#define EEPROM_CONFIG_M24M01        400,    128,    10

3.- I forgot the number 3 smile (but there were three clues)


Aside those problems, documentation is poor ... well, the documentation can't be poor because there isn't documentation at all!!:

a) Should I call EEPROM_NXP_LPC1788_InitializeWorkspace() before EEPROM_NXP_LPC1788_SetConfiguration()?
b) Does EEPROM_NXP_LPC1788_SetConfiguration() calls EEPROM_NXP_LPC1788_InitializeWorkspace()?
c) What is the type of variable that I must instantiate in order to use EEPROM_NXP_LPC1788_SetConfiguration()?


Hope somebody has used this module and can led me toward a solution. Thank you in advanced!!

Offline

 

#2 2012-07-16 12:13:14

fdilysle
Software Engineer
From: Huntsville, AL
Registered: 2007-06-07
Posts: 230

Re: EEPROM in UEZGUI-1788-43WQS

Are you trying to implement a new EEPROM or just use the one on an existing uEZ-GUI board?

The NVSettings.c file in the demos show how to make top level calls to the EEPROM driver.

Offline

 

#3 2012-07-16 17:26:33

fjrg76
Member
Registered: 2011-10-19
Posts: 16

Re: EEPROM in UEZGUI-1788-43WQS

fdilysle wrote:

Are you trying to implement a new EEPROM or just use the one on an existing uEZ-GUI board?

The NVSettings.c file in the demos show how to make top level calls to the EEPROM driver.

That's what I was looking for! Now I need to (try to) implement it in my design.

Thank you!!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB