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

DWT's watchpoint exception can not be issued when interrupt is disabled

Hi,

    I enabled the DWT's watchpoint functions, and when the watchpoint address is written,

there will be a DebugMonitor exception happens.

   But if the interrupt is disabled(e.g. use __ASM volatile ("cpsid i" : : : "memory");), then

the exception will not happen.

   Can it generate an escalation exception just like other exception, e.g. bus fault?

   My chip is cortex-m33. thanks a lot.

Br,

Yingchun

  • Setting PRIMASK raises priority to 0. So only exceptions with priority < 0 can interrupt. IIRC is the highest priority of the debug exception 0. Thus, cannot happen while PRIMASK is 1.

  • en, the DebugMonitor trap generated by watch point cannot escalated to a hardfault.

    If a synchronous exception with an equal or lower priority value to execution is pending, the PE hardware escalates
    it to become a HardFault. This rule applies to all synchronous exceptions and DebugMonitor exceptions that are
    caused by the BKPT instruction. This rule does not apply to asynchronous exceptions and all other DebugMonitor
    exceptions.