Skip to content

Conversation

@niaow
Copy link
Member

@niaow niaow commented Jun 21, 2020

It appears that we were incorrectly leaving faults masked permanently. On Cortex-M4 systems, this led to the microcontroller becoming non-responsive and passing garbage to the debugger. As far as I can tell, we aren't actually faulting anywhere, so this is probably a hardware bug. We should figure out what is going wrong, but until we do we should probably stop bricking microcontrollers.

@deadprogram
Copy link
Member

We are not using FIQ requests anyhow, so as you said this seems like it was incorrect. Since it also corrects the issue and passes all the tests, I am merging. Great job finding this @jaddr2line

@aykevl
Copy link
Member

aykevl commented Jun 21, 2020

I checked this and it is indeed a bug. I am not sure why disabling faults would lock the MCU but fault handling (HardFault etc) should certainly not be disabled.

I probably copied this code from somewhere, my bad for not checking what those instructions do exactly.

@aykevl
Copy link
Member

aykevl commented Jun 21, 2020

We are not using FIQ requests anyhow

Do you mean fast interrupts, like on ARM cores? Those do not exist on the Cortex-M4. We do handle faults, by printing a hard fault message.

@niaow
Copy link
Member Author

niaow commented Jun 21, 2020

oh wait that is fiq not fault i think

@niaow
Copy link
Member Author

niaow commented Jun 21, 2020

Huh. There are actually 2 instructions with the same name, and this lines up with some stuff i saw. . .

@deadprogram deadprogram deleted the arm-dont-mask-faults branch June 22, 2020 07:01
@niaow niaow added this to the v0.14 milestone Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants