# Question about the use of the A&D memory

**URL:** <https://forum.sierrawireless.com/t/question-about-the-use-of-the-a-d-memory/3877>\
**Category:** Open AT\
**Created:** [November 18, 2009, 6:34pm UTC](https://forum.sierrawireless.com/t/question-about-the-use-of-the-a-d-memory/3877 "2009-11-18T18:34:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicool67](https://avatars.discourse-cdn.com/v4/letter/n/b3f665/32.png) [@nicool67](https://forum.sierrawireless.com/u/nicool67)\
**Post date:** [November 18, 2009, 6:34pm UTC](https://forum.sierrawireless.com/t/question-about-the-use-of-the-a-d-memory/3877/1 "2009-11-18T18:34:26Z")

</div>

Hi to all!, im really confused about the reight use of the A&D memory. For wich i understand, i can use this memory to save data and a dwl file. The Oat Memory is only used for the aplicattion?, can i store data in that memory?. Im asking this because if i resize the A&D i loose all the data stored in there, and that would be catastroffic to me!.

Im developing a product who need a lot of Flash memory. So writing in he A&D looks great, but i need to use the DOTA too…

Can anyone help me?, thank u so much for advance.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [November 18, 2009, 8:34pm UTC](https://forum.sierrawireless.com/t/question-about-the-use-of-the-a-d-memory/3877/2 "2009-11-18T20:34:27Z")

</div>

> [@nicool67](#):
>
> Im developing a product who need a lot of Flash memory. So writing in he A&D looks great, but i need to use the DOTA too…

DOTA is for application updates - which, hopefully, you will do (relatively) infrequently.

Can’t you just arrange to clear your “data” out of A&D before doing an update…?

---

<div class="post-metadata">

**Author:** ![nicool67](https://avatars.discourse-cdn.com/v4/letter/n/b3f665/32.png) [@nicool67](https://forum.sierrawireless.com/u/nicool67)\
**Post date:** [November 18, 2009, 8:38pm UTC](https://forum.sierrawireless.com/t/question-about-the-use-of-the-a-d-memory/3877/3 "2009-11-18T20:38:40Z")

</div>

I think i might. But, i can use use the A&D to save dwl files and ordinary data?. I read somewhere that the granularity is 64Kbytes, is this true?, if i need to erase a cell i will erase 64Kbytes of data???.

Thank u so much,

---

<div class="post-metadata">

**Author:** ![yuantuh](https://avatars.discourse-cdn.com/v4/letter/y/e47c2d/32.png) [@yuantuh](https://forum.sierrawireless.com/u/yuantuh)\
**Post date:** [November 19, 2009, 11:49am UTC](https://forum.sierrawireless.com/t/question-about-the-use-of-the-a-d-memory/3877/4 "2009-11-19T11:49:27Z")

</div>

You may ask Wavecom to confirm 64BK minimum erase block or you can read datasheet of flash used in Wavecom modules. Generally you can treat A&D as a simple file system: a cell as a file with random read (adl\_adInfo) and senquential writing only. You do not worry about how to erase (delete in A&D) cell detail, you just call adl\_adDelete in your app when the cell is not needed, similar to delete a file in other OS. However, deleting cell does not mean the cell space is released. You have to call adl\_adRecompact to release the cell space. I guess adl\_adRecompact does erasing processing. All A&D operations will be failed within low level interrupt.

If accessing flash in your app is critical, I suggest you use external flash, such as AT45XX, ranging from 4MB to 16MB with serial (compatiable SPI) interface and byte read/write capability. Therefore, AT45XX can be used as a circular buffer with a great flexibility. However, A&D is not. Frankly A&D implementation might be based on improper design or the designer could have knowledge limitation when proposal of A&D specifications.

---

<div class="post-metadata">

**Author:** ![nicool67](https://avatars.discourse-cdn.com/v4/letter/n/b3f665/32.png) [@nicool67](https://forum.sierrawireless.com/u/nicool67)\
**Post date:** [November 19, 2009, 1:50pm UTC](https://forum.sierrawireless.com/t/question-about-the-use-of-the-a-d-memory/3877/5 "2009-11-19T13:50:02Z")

</div>

Thanks yuantuh!!!, i know that is not as flexible as an external memory but its worth to giving a try!. I think a posible solution is to use the RAM to work with the 64Kbytes and do all the ops there and then write to the A&D memory.

Ill use your guidence to my libraries. I have a another problem with this theme. I posted a minute ago in the same category a new message, in order to not make a mess here i wont paste the link.

Thank u again my friend!!.
