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

SVC Handler missing in flash_storage instance

Hello,

I'm using nrf52840 with gcc compiler and SDK15.3. For our firmware update procedure, we use two flash storage instances. One for the transmitted new application and one for the bootloader settings. When aplplication is transferred, we change the bootloader settings that after a software reset the bootloader erases the old application and puts new application in the correct föash memory region. I ported that program from nrf52832 where it works very well. Now on the nrf52840 when the flah storage instance is initialized it gives back the SVC handler missing failure (return code 0x01). That causes that the flash_storage instance can't erase it's memory region. Does anybody know what's wrong with my code are handling?

Thanks in advance

Kind regards

Sascha Schmidt

Parents
  • Hi Sascha,

    Something is triggering SVC interrupt with a SVC number that doe snot have a handler. If you et SVC handler missing when attempting to write to flash, that indicates that you write to flash using the SoftDevice API to write to flash, but either you do not use the SoftDevice or the application was built using SoftDevice header files from another SoftDevice version than what you actually use.

    Are you in the process of migrating to a newer SDK, and is that when you got this issue?

  • Hi Einar,

    thanks for your reply.. We are migrating from nRF52832 to nRF52840 and I thought I used the same SoftDevice version. Is it possible to check that in the software or how can I check, that I'm using the same version? 

    Kind regards

    Sascha

  • Hi Sascha,

    The primary thing is that you need to know which SoftDevice exact you program to your device and which SoftDevice header files you build your application with. If you use all from the same SDK version then you are good. If you mix and match (like when in the process of migrating) you need to make sure you have corresponding versions. So simply looking at how you build and what you program is the best.

    That said, if you have a device you do not know which SoftDevice it contains and want to check that you can read out the SoftDevice ID using nrfjprog --memrd 0x0000300C --w 16. Then check for instance this list to see if you can find which SoftDevice version the ID matches.

  • Hi again Slight smile

    I checked the SoftDevice version and it should be ok as far as I can see. I then checked the initialization of the FlashStorge instance and there I don't get this error (returns 0 at initialization). Sorry I commented that wrong in my first post!! The error only occurs when I want to erase the memory region which is assigned to the instance.

    If it would be a wrong SoftDevice version, shouldn't it report the error at initialization? Do you have a suggestion what else could be the problem?

    Thanks in advance and kind regards

    Sascha

Reply
  • Hi again Slight smile

    I checked the SoftDevice version and it should be ok as far as I can see. I then checked the initialization of the FlashStorge instance and there I don't get this error (returns 0 at initialization). Sorry I commented that wrong in my first post!! The error only occurs when I want to erase the memory region which is assigned to the instance.

    If it would be a wrong SoftDevice version, shouldn't it report the error at initialization? Do you have a suggestion what else could be the problem?

    Thanks in advance and kind regards

    Sascha

Children
  • Hi Sascha,

    Sascha Schmidt said:
    If it would be a wrong SoftDevice version, shouldn't it report the error at initialization?

    Not necessarily. Some/most SVC numbers will be the same for different versions.

    Sascha Schmidt said:
    Do you have a suggestion what else could be the problem?

    If this is not an issue of the SoftDevice you have programmed not corresponding to the header files you use in your application, then we should double check if you really get a SVC handler missing failure error. Can you clarify with reference to code which function you get which return code from?

Related