This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

My fstorage code stop work after advertising start

Firstly sorry for my bad english.

I wanna make a data logger and i am using fstorage module. Before advertising start everything works correctly. However, when advertising start, my code stops working. I am using nrf51822 and sdk 12.2.

//Working Code

-fs_callback_flag = 1;

-ret = fs_store(&fs_config, fs_config.p_start_addr, &data, 1, NULL);

-while(fs_callback_flag == 1) { power_manage(); }

-advertising_start();

//Does not working code

-advertising_start();

-fs_callback_flag = 1;

-ret = fs_store(&fs_config, fs_config.p_start_addr, &data, 1, NULL);

-while(fs_callback_flag == 1) { power_manage(); }

Thanks.

EDIT 1:

After debug with RTT and Jlink Viewer probably I found the problem. After advertising start; "fs_evt_handler" function does not call by processor. My code stop at "while(fs_callback_flag == 1);"

Parents
  • FormerMember
    0 FormerMember

    Which error code do you get you want to start advertising? Do you set up your advertising somehere (advertising_init() )?

    The example ble_app_hrs-fds-test-github.zip in this answer shows how to use FDS in combination with BLE. Perhaps it can be useful to take a look at it?

Reply
  • FormerMember
    0 FormerMember

    Which error code do you get you want to start advertising? Do you set up your advertising somehere (advertising_init() )?

    The example ble_app_hrs-fds-test-github.zip in this answer shows how to use FDS in combination with BLE. Perhaps it can be useful to take a look at it?

Children
Related