QD4 EEPROM location read

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

QD4 EEPROM location read

1,151 次查看
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?

标签 (1)
标记 (3)
0 项奖励
回复
2 回复数

1,051 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

please try this:

telltale = *(unsigned char*)0xE100;

1,051 次查看
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 项奖励
回复