title: Atmel Studio Dummy_Handler
body: <p>Occasionally I will get an unexpected interrupt, and my code will hang inside <strong><code>Dummy_Handler()</code></strong> in <code>exceptions.c</code> of the Atmel Studio Framework (ASF).  I am using the ATSAM3X8E microcontroller of the Arduino Due.</p>
  
  <pre><code>void Dummy_Handler(void)
  {
      while(1) {
      }
  }
  </code></pre>
  
  <p>Any ideas how to determine <strong>which interrupt</strong> it was?  </p>
  
  <p>Of course I could replace this single handler with unique dummy handlers, one for each exception. (There are about fifty of them.)  For example change each line in the same exceptions.c file:</p>
  
  <pre><code>void HardFault_Handler  ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
  </code></pre>
  
  <p>to this</p>
  
  <pre><code>void HardFault_Handler  ( void ) __attribute__ ((weak, alias("Dummy_HardFault_Handler")));
  </code></pre>
  
  <p>Etc...  Or try to reason how my code could have generated which interrupt.  But who has that kind of time?</p>