This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debug and old IRQ

Hello, When I restart my application with debugger, i have strange IRQs called (TWI, ...) before init. Possibly IRQ still active and debug don't touch them.

Can I disable all IRQ on restart ? Is there a magic cleaning function ? :-)

Parents
  • Hi,

       __disable_irq();
    

    I think this is ARM CMSIS funtion and it will disable all IRQ. This should be ok as you are doing it before enabling softdevice.

  • Why did you do that???? We were talking about disabling peripheral interrupts and not using __disable_irq because it was disabling SVC exception also. Clearing all bits in ICER register means everything except reset, NMI and hardfault are disabled. This is out of my knowledge of to what debugger needs to halt the CPU here. I will talk to few other guys here tomorrow and see if there is any possibility to unbrick your device.

Reply
  • Why did you do that???? We were talking about disabling peripheral interrupts and not using __disable_irq because it was disabling SVC exception also. Clearing all bits in ICER register means everything except reset, NMI and hardfault are disabled. This is out of my knowledge of to what debugger needs to halt the CPU here. I will talk to few other guys here tomorrow and see if there is any possibility to unbrick your device.

Children
No Data
Related