QD4 EEPROM location read

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QD4 EEPROM location read

530 Views
alexit
Contributor I

I must be overlooking something simple, but I can't see it.

 

Using the Flash.zip routines Bigmac posted years ago, with a QD4 and CW10.X my PRM file is modified like:

SSTACK_SEG = NO_INIT 0x00C0 TO 0x00FF;

EEPROM_SEG = READ_ONLY 0xF800 TO 0xF9FF;

ROM1 = READ_ONLY 0xFFC0 TO 0xFFCF RELOCATE_TO 0x00C0;

 

with

SSTACK INTO SSTACK_SEG;

EEPROM INTO EEPROM_SEG;

FLASH_ROUTINE INTO ROM1;

 

In the main.c I am locating my variable in the EEPROM space:

#pragma CONST_SEG EEPROM

const byte telltale;

#pragma CONST_SEG DEFAULT

 

During use, I flash this location when:

if (maxrpm > telltale)

Flash_Program(0xF800, maxrpm)

 

and wanted read this back after a power cycle:

 

telltale = (char*)0xF800;

 

But it won't compile after I added the read back, how should I access this location?

Labels (1)
Tags (3)
0 Kudos
2 Replies

430 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

please try this:

telltale = *(unsigned char*)0xE100;

430 Views
alexit
Contributor I

Thank you, this also did not compile. I am waiting for the PT hardware because I believe this will have better flash support. Then I will be working this project further.

0 Kudos