2011-03-08 11:46 PM
Bus Fault during program execution
2011-05-17 05:27 AM
You could try :
To verify your actual clock speeds. Increasing wait states on flash. Dropping the speed of the processor. Running at 24 MHz, with the flash buffering disabled. Not looking to fix the problem, but rather to identify/isolate a potential timing issue.2011-05-17 05:27 AM
2011-07-04 03:15 AM
Hi,
I am using a stm32f103ZGT (eval board STM2110E-EVAL) I get a bus fault with: NVIC_CFSR = 0x8200 (i.e. PRECISERR = 1 and BFARVALID = 1) NVIC_BFAR = 0x480ab52b the programming manual says, that in this case BFAR contains the faulting address and the stacked pc points to the instruction which caused the fault. sp is 0x2000c3d8, according to to the description of exception handling the stacked pc should be at sp+5*4 = 0x2000c3ec. At 0x2000c3ec I find 08055d37, which indeed is inside my program, but at 0x08055d36 there is a movew r3, #0 instruction. Now I don't know how to interpret this: how can this instruction cause a bus fault? Regards Dirk2011-07-04 06:22 AM
There are TWO stacks, if you pick the wrong one the data on it isn't going to help much.
You should try to use a fault handler along the lines of the one described by Joseph Yiu, which processes this more mechanically. At a guess the address you pulled might be LR, and the preceding instruction is a BL (ie a subroutine call, with the MOVEW at the returning address). That might help identify where to look next. If not you will need to repeat the experiment with more/better instrumentation. The Hard Fault question in this thread is a bit obscured by the forum breaking and destroying the first post, I doubt changing speed will impact many systems unless the flash subsystem is not set up correctly. Generally, you'll want to look at all the registers to see if anything is outside the bounds of the RAM/FLASH/ROM/PERIPHERALS, attempts to run ARM code, or reading/writing unaligned words, especially to FLASH.2011-07-11 06:24 AM