ble_profile_WriteNVRAM all work but bleprofile_ReadNVRAM all fail.

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

cross mob
MaMe_1509466
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

#define NVRAM_SANITY_MAGIC 0x1234

UINT16 nvram_sanity;

int ret;

ret = bleprofile_ReadNVRAM(0x10, sizeof(nvram_sanity),

        (UINT8 *)&nvram_sanity);

    ble_trace2("nvram_sanity %04x ret %d", nvram_sanity, ret);

        nvram_sanity = NVRAM_SANITY_MAGIC;

        ret = bleprofile_WriteNVRAM(0x10,

            sizeof(nvram_sanity), (UINT8 *)&nvram_sanity);

        ble_trace1("sanity written %d", ret);

        nvram_sanity = 0;

        ret = bleprofile_ReadNVRAM(0x10,

            sizeof(nvram_sanity), (UINT8 *)&nvram_sanity);

        ble_trace2("sanity read back in %04x ret %d", nvram_sanity, ret);

14:43:28 - nvram_sanity 0000 ret 0

14:43:28 - sanity written 2

14:43:28 - sanity read back in 0000 ret 0

0 Likes
1 Solution

Are you running this test code after the call to bleprofile_GPIOInit()?

Note that the EEPROM’s WP is setup only after the call to the profile level GPIO init function.

I think there was a similar post by another user on this subject a while back:

http://community.broadcom.com/message/7291#7291

arvinds

View solution in original post

0 Likes
4 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Can you state your specific question?  Internal resources are at a premium to answer these types of detailed SW questions, so any help you can provide being very specific will help response time.

0 Likes

Why does the Read NVRAM fail in this simplest of examples?

0 Likes

Are you running this test code after the call to bleprofile_GPIOInit()?

Note that the EEPROM’s WP is setup only after the call to the profile level GPIO init function.

I think there was a similar post by another user on this subject a while back:

http://community.broadcom.com/message/7291#7291

arvinds

0 Likes

GPIO_Init was not being called soon enough. Thanks

0 Likes