title: Unable to blink LED on TM4C123G?
body: <p>My TI Tiva ARM program is not working on TM4C123G. Using board EK TM4C123GXL. Program doesn't blink on board RGB LEDs.  I am able to run other example program to check the LEDs, this program is from textbook TI TIVA ARM PROGRAMMING FOR EMBEDDED SYSTEMS. Need help to debug this program. Thanks</p>
  <p>Code:</p>
  <pre><code>/*  p2.4.c: Toggling a single LED
  
  /*  This program turns on the red LED and toggles the blue LED 0.5 sec on and 0.5 sec off. */
  
  #include &quot;TM4C123GH6PM.h&quot;
  
  void delayMs(int n);
  
  int main(void)
  {
  
      /* enable clock to GPIOF at clock gating control register */
      SYSCTL-&gt;RCGCGPIO |= 0x20;
      /* enable the GPIO pins for the LED (PF3, 2 1) as output */
      GPIOF-&gt;DIR = 0x0E;
      /* enable the GPIO pins for digital function */
      GPIOF-&gt;DEN = 0x0E;
      /* turn on red LED only and leave it on */
      GPIOF-&gt;DATA = 0x02;
      
      while(1)
      {      
          GPIOF-&gt;DATA |= 4;    /* turn on blue LED */
          delayMs(500);
  
          GPIOF-&gt;DATA &amp;= ~4;   /* turn off blue LED */
          delayMs(500); 
      }
  }
  
  /* delay n milliseconds (16 MHz CPU clock) */
  void delayMs(int n)
  {
      int i, j;
      for(i = 0 ; i &lt; n; i++)
          for(j = 0; j &lt; 3180; j++)
          {}  /* do nothing for 1 ms */
  }
  </code></pre>
  <p>I am using KEIL IDE-Version: µVision V5.36.0.0</p>
  <pre><code>Tool Version Numbers:
  Toolchain:        MDK-Lite  Version: 5.36.0.0
  Toolchain Path:    G:\Keil_v5\ARM\ARMCLANG\Bin
  C Compiler:         ArmClang.exe        V6.16
  Assembler:          Armasm.exe        V6.16
  Linker/Locator:     ArmLink.exe        V6.16
  Library Manager:    ArmAr.exe        V6.16
  Hex Converter:      FromElf.exe        V6.16
  CPU DLL:               SARMCM3.DLL          V5.36.0.0
  Dialog DLL:         TCM.DLL              V1.53.0.0
  Target DLL:             lmidk-agdi.dll       V???
  Dialog DLL:         TCM.DLL              V1.53.0.0
  </code></pre>