AnsweredAssumed Answered

Storing variable in flash

Question asked by Robert Maier on Nov 1, 2016
Latest reply on Nov 2, 2016 by Robert Maier

Hello,

 

I'm using an MC9S12P128 MCU, and I'd like to store some constants in D-flash. I have the D-flash segment defined as

 

DFLASH        = READ_ONLY   0x010400 TO 0x0113FF;

 

So, when I go to write the constant, I use the following:

 

#pragma CONST_SEG CAL_VAL
volatile const unsigned char __near constant1=0x7F;

 

When I look at where this is in the memory, it shows up as 0xC015. To me, that's nowhere in the range define above. What am I missing here?

Outcomes