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

pstorage Store Crashing with FreeRTOS

I am trying to get the pstorage module to work with our application and FreeRTOS. At the moment I keep crashing on port_cmsis::prvTaskExitError().

The pstorage documentation here SDK Doc lists several limitations a couple of which I feel maybe the cause of my problem.

  • SoftDevice and the scheduler must be initialized before the Persistent Storage Module
  • Power off is not handled by the module

In my implementation the SoftDevice is initialized buy the scheduler isn't since I am using FreeRTOS. What does the start "Power Off" mean exactly? I am sleeping the processor using tickless idle.

Thanks, Darren

Parents
  • I doubt either of those two things are your problem. Guessing you meant "but the scheduler isn't" not "buy the scheduler", pstorage isn't tied to the scheduler so it doesn't matter whether you use it or not, as long as something is servicing the pstorage events. And I don't know what you meant to type about Power Off but all that's telling you is the pstorage module doesn't handle putting the device into system off mode, ie it contains no code for waiting until flash operations are finished before allowing the chip to power down, if you wanted system off mode, you'd have to deal with that yourself.

    If you are getting prvTaskExitError() it's because one of your tasks is trying to exit, you can't do that in FreeRTOS, they must effectively be forever while loops.

Reply
  • I doubt either of those two things are your problem. Guessing you meant "but the scheduler isn't" not "buy the scheduler", pstorage isn't tied to the scheduler so it doesn't matter whether you use it or not, as long as something is servicing the pstorage events. And I don't know what you meant to type about Power Off but all that's telling you is the pstorage module doesn't handle putting the device into system off mode, ie it contains no code for waiting until flash operations are finished before allowing the chip to power down, if you wanted system off mode, you'd have to deal with that yourself.

    If you are getting prvTaskExitError() it's because one of your tasks is trying to exit, you can't do that in FreeRTOS, they must effectively be forever while loops.

Children
No Data
Related