MC9S12XHZ512 EEPROM read write operation

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

MC9S12XHZ512 EEPROM read write operation

跳至解决方案
1,993 次查看
kdn
Contributor III

I want to write and read data in/from internal EEPROM of MC9S12XHZ512 micro-controller. Can anyone provide me sample code for it.

I have use processor expert of it but it's showing some error , i have posted below.

标签 (1)
标记 (2)
1 解答
1,682 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi KDN,

I don't think you use GetWord()  in a right way.

you need use GetWord() as below:

  byte If_ok;

  word mydata;

  If_ok = IEE1_SetWord((IEE1_TAddress)0x100000,0x1234);

  If_ok = IEE1_GetWord((IEE1_TAddress)0x100000,&mydata);

I attached my demo code and video, it's for 9S12XHY256 but the method is the same for all HCS12X device


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

1 回复
1,683 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi KDN,

I don't think you use GetWord()  in a right way.

you need use GetWord() as below:

  byte If_ok;

  word mydata;

  If_ok = IEE1_SetWord((IEE1_TAddress)0x100000,0x1234);

  If_ok = IEE1_GetWord((IEE1_TAddress)0x100000,&mydata);

I attached my demo code and video, it's for 9S12XHY256 but the method is the same for all HCS12X device


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------