Other Parts Discussed in Thread: SYSBIOS
Hi all,
I'm looking for some troubleshooting help.
I'm debugging part of our existing code base, so I am not the person who wrote this code, so I need some insight into an error.
We have an SD Card connected via SPI.
Running through the code I am able to read and write from multiple files. I can read and write from a persistent log file.
But In my code I write a 1024 byte array to a measurement file, 0:/LOG/V0000000.TXT, everything works fine.
I then loop through my code again (there are other subroutines and separate tasks that I've commented out.) and rerun my measurement. Everything seems to happen just fine,
Then I go to remount the SD card, and I get a HWI Exception as seen below.
I assume I have some sort of reference error though I am not sure how to parse the information below. Using the debugger I've tracked the error to the first time I touch the SD Card after the program loops. I've verified that I'm not touching the SPI lines, or other GPIO elements, I do make a call to the UART as part of the measurement, (it all works fine) I've tried not unmounting the SD card, and just opening a file, and I get the same error. Prior to this file write I write to other existing files, and they seem fine (though their file names are constant.) I'm at my wits end with this. It was working fine, until I updated a different part of the program... (which doesn't touch on the SPI Bus.)
I've run out of ideas for what might be causing it. Can anyone shed light on what this error suggests the issue is?
ti.sysbios.family.arm.m3.Hwi: line 1148: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1225: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: 06050611
Exception occurred in background thread at PC = 0x00011016.
Core 0: Exception occurred in ThreadType_Task.
Task name: {unknown-instance-name}, handle: 0x20009850.
Task stack base: 0x200098a0.
Task stack size: 0x1000.
R0 = 0x06050605 R8 = 0xffffffff
R1 = 0x00000000 R9 = 0x00000000
R2 = 0x00000000 R10 = 0xffffffff
R3 = 0x2000a5d0 R11 = 0xffffffff
R4 = 0x00000000 R12 = 0x20009710
R5 = 0x2000a598 SP(R13) = 0x2000a568
R6 = 0x00000000 LR(R14) = 0x0000258b
R7 = 0x06050605 PC(R15) = 0x00011016
PSR = 0x01000000
ICSR = 0x00418803
MMFSR = 0x00
BFSR = 0x82
UFSR = 0x0000
HFSR = 0x40000000
DFSR = 0x00000001
MMAR = 0x06050611
BFAR = 0x06050611
AFSR = 0x00000000
I've tried looking through documentation, but it hasn't been much help, Anyone who can point me in the right direction for troubleshooting, it would be of great help.