title: Disable Interrupt in C program
body: <p>How do i disable the interrupt in this ARM M0 univesity design start program? 
  The design is made for the M0 and echos an inputted char as an integer, it is part of a larger piece of code (which is ommitted for simplicity)
  Can i do it in the main program(attached) or will i have to edit the assembler code(also attached)?</p>
  
  <pre><code>  //------------------------------------------------------------------------------
  // Cortex-M0 DesignStart C program example
  //------------------------------------------------------------------------------
  
  #include &lt;stdio.h&gt;
  #include &lt;time.h&gt;
  #include &lt;rt_misc.h&gt;
  #include &lt;stdlib.h&gt;
  
  #define AHB_LED_BASE                0x50000000
  #define AHB_UART_BASE               0x51000000
  
  
  void UART_ISR(void)
  {
              int sample;
              char ch [16];
              sample = atoi (ch);
              printf("the value entered is %d\n", sample);
  }
  
  //////////////////////////////////////////////////////////////////
  // Main Function
  //////////////////////////////////////////////////////////////////
  
  int main() 
      {
  
          char ch [16];
          while(1==1)
          {
          fgets (ch, 16, stdin);
      //printf("String: %s\n\n",ch);
          }
  }
  </code></pre>
  
  <p>Assembly code</p>
  
  <pre><code>UART_Handler    PROC
                  EXPORT UART_Handler
                  IMPORT UART_ISR
                  PUSH    {R0,R1,R2,LR}
                  LDR     R1, =0x51000000               ;UART
                  LDR     R0, [R1]                      ;Get Data from UART
                  STR     R0, [R1]                      ;Write to UART
  
                  BL UART_ISR
  
                  POP     {R0,R1,R2,PC}
                  ENDP
  
  
                  ALIGN 4
  </code></pre>