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

No callbacks pstorage from S130, SDK 11

I am playing with nrf51 DK. I used the following sample code,

devzone.nordicsemi.com/.../

ble_app_template_with_pstorage_SDK_8_1_0.zip

I want to pstorage clear/store in button event callback function, "void bsp_event_handler(bsp_event_t event)"

I works fine with S110, SDK 8.1. But there is no callbacks pstorage when I use it with S130, SDK11. Only I can use it in main loop. (not inside callback function).

Plus, there are bunch of variance of SDK version.. which version do I have to use for nrf51822?

Thank you in advance.

Parents
  • You cannot wait for the pstorage callback to set the pstorage_wait_flag in the bsp callback. This is because the bsp callback runs at the same priority as the pstorage callback, which will block the pstorage callback.

    You can use the scheduler to move the execution from interrupt context to mains context, please see this Infocenter page.

    Please refer the nRF51 Compatibility Matrices, found here, in order to identify the correct SDK and SD version for your chip revision.

Reply
  • You cannot wait for the pstorage callback to set the pstorage_wait_flag in the bsp callback. This is because the bsp callback runs at the same priority as the pstorage callback, which will block the pstorage callback.

    You can use the scheduler to move the execution from interrupt context to mains context, please see this Infocenter page.

    Please refer the nRF51 Compatibility Matrices, found here, in order to identify the correct SDK and SD version for your chip revision.

Children
Related