Sep 29, 2021
07:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 29, 2021
07:05 AM
Hello,
I am trying to change the Margin Control Register PFlash (Specifically the TRAPDIS Field from "No" to "Yes") but am having issues.
I tried several attempts:
But they all cause a Data Access Asynchronous Error (Trap Class 0).
I theorize that this maybe because they have some kind of protection, I've tried to wrap the code line in:
And also tried
I even tried them both together wrapping the one line of code, but nothing works.
Anyone know what I am doing wrong? Would appreciate any help in showing me the correct way of doing things.
I am trying to change the Margin Control Register PFlash (Specifically the TRAPDIS Field from "No" to "Yes") but am having issues.
I tried several attempts:
(&FLASH0_MARP)->U = 0x00008000;
MODULE_FLASH0.MARP.B.TRAPDIS = 1;
MODULE_FLASH0.MARP.I = 0x8000; // This is how it should be if only TRAPDIS is changed in the bit field
But they all cause a Data Access Asynchronous Error (Trap Class 0).
I theorize that this maybe because they have some kind of protection, I've tried to wrap the code line in:
uint16 endInitSafetyPassword = IfxScuWdt_getSafetyWatchdogPasswordInline();
IfxScuWdt_clearSafetyEndinitInline(endInitSafetyPassword);
//CODE HERE
IfxScuWdt_setSafetyEndinitInline(endInitSafetyPassword);
And also tried
unlock_safety_wdtcon();
//CODE HERE
lock_safety_wdtcon();
I even tried them both together wrapping the one line of code, but nothing works.
Anyone know what I am doing wrong? Would appreciate any help in showing me the correct way of doing things.
Solved! Go to Solution.
1 Solution
Sep 30, 2021
03:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 30, 2021
03:34 AM
Hello
I solved the issue 🙂
Turns out there is SafteyEndInit and normal Endinit
I tried to turn of the safety variant and not the normal one
Doing this fixed my issue:
I solved the issue 🙂
Turns out there is SafteyEndInit and normal Endinit
I tried to turn of the safety variant and not the normal one
Doing this fixed my issue:
uint16 endinitPw = IfxScuWdt_getCpuWatchdogPassword();
IfxScuWdt_clearCpuEndinit (endinitPw);
MODULE_FLASH0.MARP.I = 0x8000;
IfxScuWdt_setCpuEndinit (endinitPw);
1 Reply
Sep 30, 2021
03:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 30, 2021
03:34 AM
Hello
I solved the issue 🙂
Turns out there is SafteyEndInit and normal Endinit
I tried to turn of the safety variant and not the normal one
Doing this fixed my issue:
I solved the issue 🙂
Turns out there is SafteyEndInit and normal Endinit
I tried to turn of the safety variant and not the normal one
Doing this fixed my issue:
uint16 endinitPw = IfxScuWdt_getCpuWatchdogPassword();
IfxScuWdt_clearCpuEndinit (endinitPw);
MODULE_FLASH0.MARP.I = 0x8000;
IfxScuWdt_setCpuEndinit (endinitPw);