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

flash write problem

Dear Nordic guy, I'm developing with nrf51822. I have one question regarding flash write. In ble connected state,I have some error to write some data to flash. I want to write some data to flash. I describe detail reproducing step 1)in ble state, write some data with page write function 2) at master control panel app with phone , no problem exits. but when my device communicate with master control panel pc window version with usb ble dongle, pc program take the hci link loss event and my device reset. 3) I guess that pc program is correct and phone app is incorrect. I guess that when page write in connected state(radio active?),ble stack maybe goes to watchdog state, and finally, device reset caused by time ,and pc program take hci link loss event caused by device reset. 4) If my guess is correct, do you have any idea? idea is that correctly flash write in connected state. If it's impossible,please inform me.

  • Hi Hijeon,

    It would be hard to say what cause the issue without knowing your code. Which S110 softdevice you used ? As you may already know the current S110 (v6.x) provides the flash writing and erasing API so that the issue that CPU blocking period when performing flash writing/erasing would not collide the BLE activity.

    The issue you observed that there behaviour are different between the MCP app on the phone and the MCP on PC, maybe resulted from the fact that the connection interval on the phone maybe longer, and it's enough time for the flash writing process without crashing the BLE connection.

    If you are using S110 v5.x you should use the Radio Notification to avoid collision when writing to flash.

  • Thank you for your consideration. I'm using S110 alpha version. How can I take the new stack binary and header which have to be merged? Please show me the way. and which version is correct for me?0.5?0.6? Anyway give me new stack binary and header.^^ Thank you for your kindness.

  • Hi Hijeon, Could you let me know exactly which Softdevice you are using and which SDK version you based on ?

    The S110 softdevice and its header files can be downloaded from here : www.nordicsemi.com/.../nRF51822-Development-Kit

    If you are using SDK v5.x you don't have to modify your code to use with softdevice v6.0.0

    If you are using SDK v4.x you would need to update your header file and modify your code since there are some major change in the way we manage the flash. However, I would suggest you to take the template example in SDK v5.x and integrate your code into the template than to modify your project to match with the new Softdevice.

  • YES,thank you hung bui,I got the softdevice 6.0 hex and header and sdkv5.0. my older version is softdevice alpha.hex and sdk4.0 so, I'm integrating this code now(header copy,and modifiy my code in accordance with sdkv5.0,and replace flash fuction)

Related