- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#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
Solved! Go to Solution.
- Tags:
- nvram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why does the Read NVRAM fail in this simplest of examples?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GPIO_Init was not being called soon enough. Thanks