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

Get data from BLE and write to flash memory using pstorage

Hi,

I am having trouble to use flash to store data.

First, I write function and scan beacon, get information from this beacon and save to flash

I use a timer for saving data to flash but it is not work, I always get the error code = 0x00000010. It means "invalid flag". How can I solve this problem?

Thanks and regard

Parents
  • 0x00000010 is not 'Invalid Flag', invalid flag is error 10 decimal, that's error 0x10 hex which is 16 decimal which is Bad Memory Address.

    That tells you that source_data_1 isn't aligned.

    All the other advice about checking error codes is sound, you should check them all every single time. And I doubt there was ever a 'conflict' between pstorage and the beacon_event_handler, you can most likely fix the actual error now you know the difference between decimal and hex and put the code back the way it was.

  • from the SDS i found this

    The signal handler runs at LowerStack priority The signal handler runs at LowerStack priority, which is the highest priority. Therefore, it cannot be interrupted by any other activity. Also, as for the App(H) interrupt, SVC calls are not available in the signal handler. It is a requirement that processing in the signal handler does not exceed the granted time of the timeslot. If it does, the behavior of the SoftDevice is undefined and the SoftDevice may malfunction. The signal handler may be called several times during a timeslot. It is recommended to use the signal handler only for the real time signal handling. When a signal has been handled, exit the signal handler to wait for the next signal. Processing other than signal handling should be run at lower priorities, outside of the signal handler.

Reply
  • from the SDS i found this

    The signal handler runs at LowerStack priority The signal handler runs at LowerStack priority, which is the highest priority. Therefore, it cannot be interrupted by any other activity. Also, as for the App(H) interrupt, SVC calls are not available in the signal handler. It is a requirement that processing in the signal handler does not exceed the granted time of the timeslot. If it does, the behavior of the SoftDevice is undefined and the SoftDevice may malfunction. The signal handler may be called several times during a timeslot. It is recommended to use the signal handler only for the real time signal handling. When a signal has been handled, exit the signal handler to wait for the next signal. Processing other than signal handling should be run at lower priorities, outside of the signal handler.

Children
No Data
Related