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.
已解决! 转到解答。
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.
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
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.
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
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.
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
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.