MCPcopy Create free account
hub / github.com/kiibohd/controller / busfault_handler

Function busfault_handler

Lib/arm_cortex.c:148–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void busfault_handler( uint32_t *faultStackedAddress ) {
149 volatile StackFrame_t frame = *(StackFrame_t*) faultStackedAddress;
150 volatile BFSR_t BFSR = CFSR->BFSR;
151 uint32_t BFAR = SCB->BFAR;
152 print("BusFault!" NL);
153
154 if (BFSR.BFARVALID) {
155 print(" Attempt to access address ");
156 printHex32(BFAR);
157 print(NL);
158 }
159 if (BFSR.PRECISERR) {
160 print(" PC = ");
161 printHex32(frame.pc);
162 print(NL);
163 }
164 if (BFSR.IBUSERR) {
165 print(" Error fetching instruction" NL);
166 }
167 if (BFSR.STKERR) {
168 print(" Stacking error" NL);
169 }
170
171 fault_isr();
172}
173
174void usagefault_handler( uint32_t *faultStackedAddress ) {
175 volatile StackFrame_t frame = *(StackFrame_t*) faultStackedAddress;

Callers

nothing calls this directly

Calls 1

fault_isrFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…