2026-01-18 3:01 PM
Hello Community,
I got one Stranger Problem, as i was Debugging one Hang Issue there i Got in user Application we are Storing Application Checksum in Flash Address 0x0801FF0 and Accessing and Reading Back from 0x081FFF00.
So in CBIT Test I get Result Pass every time but after 4 hour's Program Counter goes into Hard Fault State and in Stack we got the Issue is Coming from CBIT Function because to Accessing and Reading Back 0x081FFF00 out Bound Address, as we Correct the Address from 0x081FFF00 to 0x0801FF0 so issue got Resolved but my Doubt is why its's took 4 hour's Continuous run of Software to give hard Fault error to access Wrong Address?
okay as CBIT we are Calling the Function in Every 3 Minutes , so Based on this Around 80 Execution. so Why Micro Controller took 80 Execution to Give Hard Fault Error ? why we Didn't Get Immediate hard Fault error for Accessing Wrong Address why it's took 80 Execution to give hard Fault error and why always it Consistent with 80 Execution not before ?
why CBIT is Always pass with Compute Checksum and Wrong Address store Checksum Value till 80 Execution before going to hard fault error ?
but my Most Important Question is why it's Ran till 80 Execution why it didn't give Hard Fault Error in 1-2 Execution for Accessing Wrong Flash Address 0x081FFF00.
Anyone can Explain this Case so i can know more About Error Understanding and Micro Controller Behavior
2026-01-18 10:19 PM
I would recommend to debug the issue.
Let a board run into a hardfault, attach with the debugger to the running system, and read out the respective SCB registers.
https://www.keil.com/appnotes/files/apnt209.pdf
This will tell you the exact location.
If you know that, you can add instrumentalisation code for further debugging if the issue becomes not immediately obvious.
> I got one Stranger Problem, as i was Debugging one Hang Issue there i Got in user Application we are Storing Application Checksum in Flash Address 0x0801FF0 and Accessing and Reading Back from 0x081FFF00.
I suppose the the code/values in the area covered by the checksum remains constant, and you do not modify any of the covered values, including the checksum itself.
2026-01-21 9:57 PM
Hello,
Actually we find out the Solution Before only and also got the location where it's Stopping and Going into Hardfault , i have one CBIT function which am Calling in Every 3 Min, but in CBIT earlier there was Wrong Address access 0x081FFF00 instead of 0x0801FF0.
Also Checksum is Constant all over Program only Compile time will Update new Checksum in flash Area Rest in CBIT we will just Read the Memory in Chunks and Recompute the Checksum Value and Compare with Stored Checksum Value from 0x0801FF0. if Value is Matched Test is Passed otherwise Fail.
So my Doubt is Instead of Checking Store Checksum Value from 0x0801FF0 earlier we are checking from 0x081FFF00 this Address, but for first 80 Execution it didn't gave Failed Result and Neither it went to hardfault, why it's Went to Hardfault after 80th Execution ?
2026-01-21 10:45 PM
> So my Doubt is Instead of Checking Store Checksum Value from 0x0801FF0 earlier we are checking from 0x081FFF00 this Address, but for first 80 Execution it didn't gave Failed Result and Neither it went to hardfault, why it's Went to Hardfault after 80th Execution ?
Since only you have all the implementation details and hardware access, I would recommend to debug through one of those first 80 hardfault-free cycles, and check all your assumption.
> ...we will just Read the Memory in Chunks and Recompute the Checksum Value and Compare with Stored Checksum Value ...
Is the memory read and checksum calculated in one go (one cycle), or over several cycles ?
Our systems are ECUs and real-time controller systems, and a complete checksum test cycle takes several 10ms base cycles to complete. An invalid access to a wrong reference checksum would only strike in the very last cycle, whan the actual comparison happens.