Clean A&D storage after a failed dota

Hi everyone,

I use DOTA in my application. How can I clean the A&D after a ARM exception (worst case) just after the subscription to an undefined cell size.
I think I can use adl_Format or adl_adRecompact. If I use one of these function just after a subscription, I receive a -8 error… I need to reset (in debug, I didn’t try in embedded.) the modem to recompact/format the flash.

I want to have a method to recover my application in every case even the worse (ARM exception I think).

Thank you in advance

Best regards,

gdt