question about data in RAM after reset for MPC5607B

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

question about data in RAM after reset for MPC5607B

1,502件の閲覧回数
yangbo1
Contributor III

Hi,

I program in MPC5607B. I want to save data in RAM, and get it after software reset(System reset assertion from MC_RGM). Is it feasible? If not, is there any memory  that could be used for this except Flash?

Thanks for your attention!

0 件の賞賛
返信
5 返答(返信)

1,475件の閲覧回数
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Well if you rewrite your ram content by SW in startup, then yes, the RAM will be filled by data you desired to be there.

Usually if you want to preserve data in RAM, you will not overwrite it by SW after reset, but exclude this part of ram which shut not be affected.

So, modify your startup code according to your needs.

Also some core registers are not affected by reset, have a look at core reference manual:

petervlna_0-1620884702836.png

Best regards,

Peter

0 件の賞賛
返信

1,460件の閲覧回数
yangbo1
Contributor III

Hi @petervlna 

Thank you for your suggestion!

Now, I reserved some space in RAM without Initialization during startup. But when that space is filled with value(e.g. memset) after startup, ECU throw ivor2(data storage) interrupt. I don't know why. Would you please show me demo?

And how to study c language and assemble language hybird programming for the ECU? 

Thanks for your attention.

0 件の賞賛
返信

1,424件の閲覧回数
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Now, I reserved some space in RAM without Initialization during startup. But when that space is filled with value(e.g. memset) after startup, ECU throw ivor2(data storage) interrupt.

Hmm, on write? or on read modify write?

Because ECC syndrome is written on write. So if you have uninitialized RAM after power on reset and try to read it it will throw you exception on read as you ECC syndrome does not match data.

Usually you create branch in startup testing the reset source. On power on reset you initialize whole RAM, and on other resets you exclude RAM which has to be preserved.

And how to study c language and assemble language hybird programming for the ECU?

Not sure what you are looking for. If you are looking for ASM code injection into C file, you have to check your compiler documentation.

Usually there is #pragma or any macro for that purpose.

Best regards,

Peter

 

 

 

0 件の賞賛
返信

1,494件の閲覧回数
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Which kind of reset are you talking about?

If you use functional reset the device will keep RAM data.

You can also use EEPROM emulation for data store. Have a look at reference manual for more details.

Best regards,

Peter

 

0 件の賞賛
返信

1,492件の閲覧回数
yangbo1
Contributor III

hi, @petervlna 

I use functional reset. But I think the RAM data would be filled with zero during Initialization after reset. Right? EEPROM emulation is based on Flash. Is there any other memory (e.g. register) can't be affected during reset?

0 件の賞賛
返信