I am unable to write and read more than 10 characters in to EEPROM demo program for the MPC5748G

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

I am unable to write and read more than 10 characters in to EEPROM demo program for the MPC5748G

跳至解决方案
1,418 次查看
priya_p
Contributor IV

I am using MPC5748G dev kit and I tried running EEPROM emulator "demo" program in the S32DS for power architecture. I changed the size to 40. But when ever I am trying to write to the EEPROM more than 10 characters it is only writing up to 10 characters. I tried reading it back, but in the buffer I can only see 10 characters. Please help me in this regard.

 

I am attaching demo code along with this mail.

0 项奖励
回复
1 解答
1,407 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I did quick test on my side and it works as expected. I just changed the size like this:

lukaszadrapa_0-1624891489824.png

And that's the only change I did in the project.

Then I confirmed first record is programmed as expected:

lukaszadrapa_1-1624891583081.png

Second one is also OK:

lukaszadrapa_2-1624891630165.png

This is state of cleared buffer after programming of all records and before reading of a record with id 10:

lukaszadrapa_3-1624891699846.png

And finally, I can see that the record is read as expected:

lukaszadrapa_4-1624891741113.png

 

So, I can see no problem here.

Regards,

Lukas

在原帖中查看解决方案

4 回复数
1,319 次查看
priya_p
Contributor IV

I am using MPC5748G dev kit and i am executing it on S32DS. I have a query regarding EEPROM. how to select our desired address space in EEPROM and what is the relation between id and EEPROM?

0 项奖励
回复
1,353 次查看
priya_p
Contributor IV

Thank You so much.. It worked. But I have a query regarding this EEPROM demo code. suppose I need to write data into EEPROM in every 1 minute. I can use PIT Timer for that but, how to write into EEPROM without losing previous data ? I need to take value and put into EEPROM continuously. For the first it write perfectly. But for the 2nd loop it is going to Devassert and stuck in infinite loop. So, how to write in to a EEPROM in a loop?

0 项奖励
回复
1,408 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I did quick test on my side and it works as expected. I just changed the size like this:

lukaszadrapa_0-1624891489824.png

And that's the only change I did in the project.

Then I confirmed first record is programmed as expected:

lukaszadrapa_1-1624891583081.png

Second one is also OK:

lukaszadrapa_2-1624891630165.png

This is state of cleared buffer after programming of all records and before reading of a record with id 10:

lukaszadrapa_3-1624891699846.png

And finally, I can see that the record is read as expected:

lukaszadrapa_4-1624891741113.png

 

So, I can see no problem here.

Regards,

Lukas

1,352 次查看
priya_p
Contributor IV

hank You so much.. It worked. But I have a query regarding this EEPROM demo code. suppose I need to write data into EEPROM in every 1 minute. I can use PIT Timer for that but, how to write into EEPROM without losing previous data ? I need to take value and put into EEPROM continuously. For the first it write perfectly. But for the 2nd loop it is going to Devassert and stuck in infinite loop. So, how to write in to a EEPROM in a loop?

0 项奖励
回复