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

close ble and restart ble function when using52840,system fatal error

Hi:

    i have some problem about using ble. 

    in my application has a loop:

    1.use ble adv,and Wait for a while,

    2.close ble adv ,and using base radio funciton.(do stop adv ,stop ble conn parameters,and close stack before using  base radio)

    3.base radio funciton,restart ble adv,then do step 1...

my problem is:when i do this about some times(three times or more), the project will get a fatal error,i using debug  get info :

<error> app: ERROR 4 [NRF_ERROR_NO_MEM] at :0
PC at: 0x00000000
<error> app: End of error report

and  i am using bond operation ,so every time when i  restart ble ,i will exec pm_init(),may it is neccessary  init every time? and what is mean PC at 0x00000000? i get nothing effect info from this error .

please advice ,thank you! 

  • Hi,

    What do you mean by close stack? You're getting NRF_ERROR_NO_MEM because you call peer_manager_init() repeatedly which again calls pm_register() and adds a new event handler. There is a limit of how many event handlers you can register, this is set in the sdk_config file by the PM_MAX_REGISTRANTS definition, and is in most projects set to 3. 

    regards

    Jared

Related