4 Replies Latest reply on Oct 8, 2014 6:54 PM by MaMe_1509466

    ble_profile_WriteNVRAM all work but bleprofile_ReadNVRAM all fail.

    MaMe_1509466

      #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