Hard faults, but not really == impossible to debug
In a current PCB design, SWD debugging is very erratic. Stepping through the code line-by-line works fine, but executing multiple lines will sometimes result in an apparent crash with a call stack like
0x0806130
0xfffffff9
which doesn't make any sense for a few reasons:
- If this were actually a hard fault, the hard fault handler would execute.
- The location of the hard fault hander is in tact in the vector table, and the handler itself is in memory. There has not been any corruption. I can see it in the disassembler.
- The location that is pointed to by the last stack entry is outside the range of the code footprint in RAM/FLASH.
So I thought maybe SWD comms are sketchy, but I tried slowing them right down to 140 kb/s and they aren't any more reliable.
Has anyone seen this behaviour?
