This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
My code is branching to FaultISR(). I've spent a whole day trying to trace it down. The fault register states that it is a Precise Data Bus Error and that the Fault Address Register is Valid. Code is trying to access a non-existent register at 4004E048.
I had hoped that when this happens that the callback stack, which would show which function the error happened in, is not shown, it just shows that the code in "tm4c1290ncpdt_startup_ccs.c".
Is there some way to determine from whence it came?
Thanks, Doug
Hi Doug,
A lot of time, a fault is due to accessing a peripheral before the peripheral is enabled. This is the first thing I will check. It is also possible that you don't have enough stack memory. Increase the stack and see if that makes a difference. Lastly, a simple mistake such as indexing to an array that is beyond the size you allocate. For example, if there are only 10 elements allocated in an array and you try to write to element 11 and beyond. Eventually, the program will crash.
Here is an app note that will guide you to find the source of the offending instruction that results in a fault. https://www.ti.com/lit/pdf/spma043
Hi Charles,
Very frustrating, have been chasing this for 3 days now. My above info is correct, bus error at address 4004E048 which I assume is a peripheral that doesn't exist on my MPU. Using the app note you referenced (thanks), go and look at the stack and the LR and PC values there don't look like valid addresses, in fact, looking back up the stack - from 20009940 to 20009ABF - there aren't Any values that are valid program addresses!
Any more thoughts?
Thanks, Doug
Hi Doug,
4004E048 falls within a reserved space. This is a illegal address that will generate a bus error. Are you using only TivaWare? Are you in any way writing your code in DRM (Direct Register Manipulation) style? Can you condense your code to its simplest form and still generate the fault then I can take a look at your code.
Hi Charles,
Found the culprit: there was one statement in the SysTick interrupt that was calling TimerValueGet(WTIMER4_BASE, TIMER_A) that I had missed when I changed the other calls, per your response to my prior question, from WTIMER to TIMER and TIMER_A to TIMER_B.
I'm surprised that TivaWare doesn't catch the fact that my MPU doesn't have wide timers, maybe that's something you can pass on to the TivaWare group.
Thanks, Doug