Writing to flash in Q24 PLUS

Dear All,

How to write data to flash ,which is stored in array.
I have some data stored in array i.e  ascii arr[256] .
I want to store this array of 256 variables to flash and read.

IF any body tried this and know the answer ,Please do the needful and send me how to do this.

Thanks and Regards,

Have you looked at the Flash API in the ADL User Guide…?

Hi Chandan,
You should read Flash API in the ADL User guide. With your requirement, you can do that:
Create a set of objects identified with adl_flhSubscribe(ascii* Handle, u16 NbObjectsRets),
where, the Handle is the name of arr[], the NbObjectsRets is the number of objects (with you exp is 256). You can use adl_flhWrite and adl_flhRead APIs to write and read value to flash. It is clearly in the ADL User guide.

I understand what you are saying. I have read and used flash memory myself. I am developing an application that needs to run effectively each time the modem is powered up.Do I store the whole application in flash or I store part of it? In the sample application that I have seen for flash memory, basically they are storing data like “1001” in memory, each digit is one byte.hence in this case we would have used up 4+1 bytes in flash memory. This is OK but I need the whole application stored in flash. The size is larger than “1001” and counting the digits and letters would be tedious.

How do I store my API in flash.


You are confusing the storage of your Application (ie, the executable code) with the nonvolatile data storage facility offered by the so-called “Flash” API.

Physically, they are all stored within the flash memory chip(s) in the hardware - but that’s where the similarity ends.

You download your application into the device using AT+WDWL; Once the application has been downloaded into the device, it is stored there permanently until you either erase it (with AT+WOPEN=4), or overwrite it with another application.

You enable a downloaded application with AT+WOPEN=1; Once the application has been enabled, it will automatically start everytime the device starts - until you explicitly disable it with AT+WOPEN=0

The so-called “Flash” API is a facility that your Application can use for non-volatile data storage.

Hi there, thank once again.

DO I have to change my source code to a dwl file then download it to the modem or this is done when I am using the Remote Task Monitor.
I have seen that files like WIPSOFT are dowloaded into the modem as dwl files and they are not erased from the modem at anytime until you erase them yourself.

How do I change my code to a downloadable file

You are, apparently, trying to run before you’ve even learned to crawl. :open_mouth:

You really need to stop now, and go back to basics!

Set this project aside for a while, and start by studying the following documents:

  • Getting Started with Open-ATTells you how to install all the tools;

  • The Tutorial for Open ATwalks you through the Hello_World project;

  • The Tools Manual for Open ATgives more detailed description of the tools - including how to build and download applications;

Then spend some time experimenting with the provided sample projects.

Then, once you are familiar with the basics of the process and with Open-AT, you can go back to your project…

The process is known as Building your project.

It involves the usual steps of building any software project - Compiling, Linking, etc - and includes the conversion of the Linker output into the DWL format.

You are familiar with the usual steps of building any software project, aren’t you…?

  • “Getting Started with Open-AT” Tells you how to install all the tools;
    • The “Tutorial for Open AT” walks you through the Hello_World project;
    • The “Tools Manual for Open AT” gives more detailed description of the tools - including how to build and download applications;


Those documents were applicable to the old-style environment (note that my post is nearly a year old now) - nowadays, you need to refer to the M2M Studio online help.

However, if you install one of the old-style environments, you can easily find those documents by just searching for all PDF files…