A&D Memory unrecoverable

Hi All,

I have been spending the last week on the A&D part of my application and now I seem to have got my memory into a state it can not get out of.

If I use the adl_adGetState function the following is returned:
freemem: 0
deletemem: 0
totalmem: 0
numobjects: 0
numdeleted: 0

If I view the memory status from within Target Management, both “Open AT area size” and “A&D area size” has the warning icon which says “Impossible to detect…”

I can download and run my applications, but seem unable to perform a recompact through my application or use A&D memory. I get the error “-20” when I try subscribe to a cell id, and hence why I have tried to recompact.

I have tried to redownload the firmware to the module. The download has been successful, but the problem is still there.

Is there a way to recover form this? And (before I use another SL6087) what causes this?

Thanks in advance!


You probably called:

handle = adl_adSubscribe (, ADL_AD_SIZE_UNDEF);

This will “lock” flash memory. So, I suggest try:

handle = adl_adSubscribe (, ADL_AD_SIZE_UNDEF);
adl_adFinalise (handle);
adl_adUnsubscribe (handle);

Then see if you can access memory properly.


Hi Rudolf,

Thanks for the response.
If this was the case, would I be able to use adl_adGetCellList?
Currently this returns “-20” too.
I have tried to use that in an attempt to find what cell id needs to finalised and deleted.

Otherwise I will have to run some for loop to ry every cell id I may have used before.



I tried to run through all cell ids which I may have subscribed to but the error “-20” was returned with each attempted subscription.

I was hoping to find a way around this without using adl_adformat, so I could hopefully have a more elegant recovery if my device ever got into that state. But at least adformat has worked and the recompacting worked fine after the format.

I admit, I’m still not 100% sure how I got into this state. I have been keeping clear of using ADL_AD_SIZE_UNDEF. Although I see that it is defined as 0xFFFFFFFF, so this may have happened when I passed the length as a variable and the variable value had somehow been corrupted.

If anyone knows if there are any other ways of the a&d memory getting into this state, please let me know.

Thanks again.