| 146 | } |
| 147 | |
| 148 | void 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 | |
| 174 | void usagefault_handler( uint32_t *faultStackedAddress ) { |
| 175 | volatile StackFrame_t frame = *(StackFrame_t*) faultStackedAddress; |
nothing calls this directly
no test coverage detected
searching dependent graphs…