This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Advertisement Data stored in Flash Memory

I have nrf52840 dongle and sdk nRF5_SDK_17.0.0_9d13099.

I would like to know, is there is an example in which, Advertisement Data is stored in flash memory and reading and writing can be done on it.

In order to protect data from getting erase after dongle turns off and on.

I saw the example of storing data in flash memory, but would like to know, how do I point the advertisement data to flash memory.

regards

Shailesh

Parents
  • Hi Jared,

    I am using Nordic SDK nRF5_SDK_17.0.0_9d13099 and while defining characteristic, i come to a structure, from ble_gatt.h file, structure is as

    /**@brief GATT Attribute. */
    typedef struct
    {
    ble_uuid_t const *p_uuid; 
    ble_gatts_attr_md_t const *p_attr_md; 
    uint16_t init_len; 
    uint16_t init_offs; uint16_t max_len; 
    uint8_t *p_value; /**< Pointer to the attribute data. 
    The stack may access that memory directly without the application's knowledge. For writable characteristics, this value must not be a location in flash memory.*/
    } ble_gatts_attr_t;

    In this structure, p_value is pointing to attribute data and as per SDK, its value location must not be in flash memory.

    If this is so then how can I put advertisement data into flash memory?

    regards

    Shailesh

Reply
  • Hi Jared,

    I am using Nordic SDK nRF5_SDK_17.0.0_9d13099 and while defining characteristic, i come to a structure, from ble_gatt.h file, structure is as

    /**@brief GATT Attribute. */
    typedef struct
    {
    ble_uuid_t const *p_uuid; 
    ble_gatts_attr_md_t const *p_attr_md; 
    uint16_t init_len; 
    uint16_t init_offs; uint16_t max_len; 
    uint8_t *p_value; /**< Pointer to the attribute data. 
    The stack may access that memory directly without the application's knowledge. For writable characteristics, this value must not be a location in flash memory.*/
    } ble_gatts_attr_t;

    In this structure, p_value is pointing to attribute data and as per SDK, its value location must not be in flash memory.

    If this is so then how can I put advertisement data into flash memory?

    regards

    Shailesh

Children
Related