title: General Exception Handler in PIC32 in MPLAB -X , How does software know when to throw this?
body: <pre><code>void _general_exception_handler (unsigned caused, unsigned status)
      {
         RCON = RCON_EXCEPTION;
  
         // Point of No return.
         Kernel_Reset();
      }
  </code></pre>
  
  <p>My code seems to be getting in this trap and I have few questions to figure out why it get here from calling valid functions in my code or the better question that keeps bothering me is how does the processor know there has been a violation. </p>
  
  <p>1) When I look in the watch window in the debugger, the <code>cause</code> shows me <code>Address 0xA0007EC0</code> and the <code>value 0x10800C1C</code> and the <code>status</code> shows me <code>address 0xA0007EC4</code> and <code>value is 0x00100003</code>. How can I, From these Address and value information figure out the cause and status of the exception? 
  2) How does the processor know that there has been an exception fault?</p>
  
  <p><a href="https://i.stack.imgur.com/QGTZl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QGTZl.png" alt="Snapshots of Memory"></a>  </p>