- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm working with a TC322.
In my program, I need to read some data in the PFlash. But this location may be erased. When this happens, I get a trap for a Data Integrity Error. That I can understand (because of the ECC).
To solve my problem, I tried to check the validity of the data before reading it. I try to use the function IfxFlash_verifyErasedPage;
Here is my code:
uint16 endInitSafetyPassword = IfxScuWdt_getSafetyWatchdogPasswordInline();
IfxScuWdt_clearSafetyEndinitInline(endInitSafetyPassword); /* Disable EndInit protection */
IfxFlash_clearStatus(IFXFLASH_NUM_MODULES);
IfxFlash_verifyErasedPage(pageAddr);
IfxFlash_waitUnbusy(FLASH_MODULE, PROGRAM_FLASH_0);
res = !DMU_HF_ERRSR.B.EVER;
IfxScuWdt_setSafetyEndinitInline(endInitSafetyPassword); /* Enable EndInit protection
This function doesn't detect any problem with my memory location (the full HF_ERRSR register stays at 0). Despite that, I get the trap right after this when I try to read the memory.
Any idea about how I could make this work?
Regards,
Benoit
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I guess you proceed to read Pflash when res is 1, please confirm. What address is read? is it pageAddr? Also, can you confirm if the same address is logged in MBABRECORD0/ZBABRECORDx after setting FLASHCON2.RECDIS as 10b.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I guess you proceed to read Pflash when res is 1, please confirm. What address is read? is it pageAddr? Also, can you confirm if the same address is logged in MBABRECORD0/ZBABRECORDx after setting FLASHCON2.RECDIS as 10b.
Thanks.