BCM20736S NVRAM functions for External I2C EEPROM Device (con't)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi Arvinds and ehoffman

Per this thread: BCM20736S NVRAM functions for External I2C EEPROM Device

          We are trying to have our own OTA update scheme. For the purpose am trying to read/write a SS as well as DS area of the i2c EEPROM using APIs serEepromRead() and serEepromWrite(). In both cases the rAPI call returns fail. Do we need to do any initialization or where am wrong in calling the APIs. The shortage of documentation of the APIs make it hard to debug the issue.

Sample code with which i was trying to access i2c EEPROM:

Write operation:

      wv = 0xad;

      if(serEepromWrite((UINT16)0x001a, (UINT16)1, &wv, (UINT8)0x00))

      ble_trace0("EEPROM Write Fails!!!");

      else

      ble_trace0("EEPROM Write Succes");

Read operation:

if(serEepromRead((UINT16)0x0140, (UINT16)20, buf, (UINT8)0x00))

        ble_trace0("EEPROM Read Fails!!!");

We are working with SDK 2.2.1.7

In both cases it returns "failed".

Any help is highly appreciable.

Thanks and regards

Rajesh Kumar V

1 Solution
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

We spoke to the developers this afternoon and confirmed that the APIs serEepromRead() and serEepromWrite() are internal APIs and not designed to be used by customers.

If you go to the sample OTA app /WICED-Smart-SDK/Apps/ota_secure_firmware_upgrade, focus on using the APIs described within  bleappfwu.h

pastedImage_0.png

NOTE: Reading and writing to hex 140 is very dangerous.

View solution in original post

3 Replies