Information stored in permanent memory


#1

Hello everyone
Q24 How much memory do I do to permanently store
I need your help
Please please help me
Thanks


#2

Do you want to know how much memory available on your Q24 module?

Open M2M studio -> target management -> status, from there you will get detail info about your memory (type, size, address, etc).


#3

sorry I mean M2M Studio -> target management -> memory mapping (not status).


#4

I want to save data in the flash memory module Q24PLUS


#5

It’s mentioned in ADL_USER_GUIDE.pdf spahlavan.
Especially in section API - > FLASH.

Please RTFM (Read The Friendly Manual) carefully :exclamation:
:mrgreen: :mrgreen: :mrgreen:

This is my code for your example.
Subscribe to FLASH service.

.
.
	/* Subscribe to Flash Service */
	retVal = adl_flhSubscribe(FLASH_OBJECT_HANDLER, MAX_FLASH_OBJECT_NUMBER);
	if (retVal == OK) {
		TRACE((2, "MAIN TASK : Flash Object Subscribe : %d = SUCCESS", retVal));
	} else if (retVal == ADL_RET_ERR_ALREADY_SUBSCRIBED) {
		TRACE((2, "MAIN TASK : Flash Object Subscribe : %d = FLASH OBJECT ALREADY SUBSCRIBED", retVal));
	} else {
		TRACE((2, "MAIN TASK : Flash Object Subscribe : %d = FAILED", retVal));
	}
.
.

Write to FLASH.

.
.
	if ((retVal = adl_flhWrite(FLASH_OBJECT_HANDLER, id, length, buffer_data)) == OK) {
		wm_sprintf(buff, "WRITE TO FLASH : ID[%d] data[%s] length[%d] : %d = SUCCESS", id, data, length, retVal);
		TRACE((2, buff));
	} else {
		wm_sprintf(buff, "WRITE TO FLASH : ID[%d] data[%s] length[%d] : %d = FAILED", id, data, length, retVal);
		TRACE((2, buff));
		wm_sprintf(buff, "\r\nError writing data[%s] length[%d] to flash ID[%d]\r\n", data, length, id);
		adl_atSendResponse(ADL_AT_RSP, buff);
		return (FALSE);
	}
.
.

Read from FLASH.

.
.
			/* read specified object id */
			retVal = adl_flhRead(FLASH_OBJECT_HANDLER, id, length, buffer_data);
.
.

#6

Thanks
But it
Give me full code


#7

Sorry I can’t give you my full code because it is my company’s proprietary.
But we can have technical discussion here. :slight_smile: :slight_smile:


#8

I mean this is the complete code
Id variable and FLASH_OBJECT_HANDLER and MAX_FLASH_OBJECT_NUMBER and length and buffer_data
What if some sort and should be defined


#9

As lqmanhkeem says, this is a discussion forum - it is not a free consultancy service to do your work for you!


#10

It is my own variables.

#define FLASH_OBJECT_HANDLER "data_array"
#define MAX_FLASH_OBJECT_NUMBER 19
u16 length;
u8 *buffer_data;

ID variable = array component from 1-19.
8) 8) 8)