EEPROM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

EEPROM

1,990件の閲覧回数
ramabh
Contributor I
Hi ...........
 
I am using cosmic compiler and freescale hcs12 controller(MC9s12DT128)
 
I am defining a variable in eeprom at a particular address and i want to initialise it also but i am not able do this......
what i did was..
@eeprom UINT32 u32eepromsum @0x0D00;
the above defnition is working but i want to set the value in eeprom at the time of programming only,so i did like this
@eeprom UINT32 u32eepromsum @0x0D00=0x88;
 
but i am not able to compile with this defnition..i am getting error message "invalid lvalue"
Is this type of of defnition is not supported by Cosmic
 
Even IAR supports this types.....
 
In Hcs12 for writting in eeprom it is taking more time because of its limitation that we have to erase and then write.Erase itself takes 27msec.In my project time is very critical....
 
so i want the value to be loaded in eeprom at the time of programming only
 
 
 
 
ラベル(1)
0 件の賞賛
返信
1 返信

564件の閲覧回数
NLFSJ
Contributor III
Hi,
 
CW does not have same support for EEPROM intialization as Cosmic. You can do following:
 
const UNIT32 u32eepromsumINT @0x0D00=0x88; // This will let CW linker to generate correct S19 file to have EEPROM 0x0D00 with value 0x88 in flash programming. But you must use pointer to access 0x0D00 in your code.
 
NOTE:  const is the key to get what you want, but the drawback is you can't simply modify u32eepromsumINT -- but have to use pointer to access it.
 
Regards,
Nina
0 件の賞賛
返信