How to read or write uninitialized RAM without IVOR1 error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to read or write uninitialized RAM without IVOR1 error

Jump to solution
2,815 Views
jiewei
Contributor II

I use S32DS for MPC5744P, and when the ECU enter bootloader from application, I want to write a data in application, and then reset ECU to bootloader and read the written data.

But if I initialize the specific RAM memory which is shared by application and bootloader in the startup, and in application  I write data to a shared RAM then invoke bootloader by software reset,  bootloader can not  read the exact data out. 

 If I don't initialize the specific RAM memory in the startup, and then I read or write the uninitialize RAM, Every time ECU power on and  the MCU will generate a IVOR1 error.

Above all, I feel that if I want  to read or write RAM memory in S32DS for MPC57xx, I must initialize the RAM memory in startup, or it will generate an IVOR1 error when ECU power on.  

1 Solution
2,311 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

the behavior you describe about IVOR1 exception is correct. If you do Power On reset, ECC errors are created in RAM and if you read part of memory where the ECC error is created, you will get IVOR1 exception.

In general, all resets which are destructive, does not retain content of the RAM memory. Functional resets retain RAM content.

pastedImage_1.png

So, after Power On reset, you must initialize the RAM you will use.

If you have any other questions, please feel free to write me back.

Regards,

Martin

View solution in original post

6 Replies
2,312 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

the behavior you describe about IVOR1 exception is correct. If you do Power On reset, ECC errors are created in RAM and if you read part of memory where the ECC error is created, you will get IVOR1 exception.

In general, all resets which are destructive, does not retain content of the RAM memory. Functional resets retain RAM content.

pastedImage_1.png

So, after Power On reset, you must initialize the RAM you will use.

If you have any other questions, please feel free to write me back.

Regards,

Martin

2,311 Views
jiewei
Contributor II

Hello,

Thanks for your reply.

If I want to implememt the following function, would you give me some suggestions?

When ECU in application, ECU writes some data in RAM the reset the ECU to bootloader(the specified written RAM couldn't be cleared during the startup process of bootloader), and then ECU can read the exact data out. 

Thank you and best regards.

0 Kudos
2,311 Views
stanish
NXP Employee
NXP Employee

Hi,

I'm just wondering why you need to go to the bootloader via reset. What kind of reset are you using?

Perhaps you could branch to the bootloader from your app instead. You can e.g. find a reset vector (rchw) = bootloader entry point in the memory and then perform absolute branch to that address - this should not generate any ECC error in RAM.

Now in the bootloader startup you can test if a reset has occurred (you can e.g. clear all reset module flags before jumping into the bootloader address). If there is no reset flag set you can skip RAM initialization routine and the content of RAM keeps unchanged for further processing by the bootloader.

Hope it helps.

Stan

0 Kudos
2,311 Views
jiewei
Contributor II

hello sir, 

If I skip RAM initialization in bootloader if a reset occurred,once I read or write any uninitialized RAM, and it will also generate an IOVR1 error.

If I want to use the RAM, and it shoud be initialized firstly in startup routine.

Thank you all the same and best regards.

0 Kudos
2,311 Views
huilongpeng
Contributor II

Hello,

Has your problem been solved?

I have encountered the same problem, can you tell me your solution?

Thank you and best regards.

0 Kudos
2,311 Views
jiewei
Contributor II

I am sorry.  The problem hasn't been solved, and I use the IEE instead. 

I used the function above in MPC56xx, but it does not work in MPC57xx.

0 Kudos