This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Led not blinking EK- TM4C123GXL

Other Parts Discussed in Thread: EK-TM4C123GXL

This is a really basic question, but I just got a EK-TM4C123GXL and tried to write a simple program to blink the LED.

On connecting the board to my PC for the first time, the LED glowed ok. But on running my program it does not glow anymore.

int main()
{
*((unsigned int *)0x400fe608U) = 0x20U;
*((unsigned int *)0x40025400U) = 0x0eU;
*((unsigned int *)0x4002551cU) = 0x20U;
while(1){
*((unsigned int *)0x400253fcU) = 0x02U;
*((unsigned int *)0x400253fcU) = 0x00U;
}
return 0;
}



I'm wondering if I have damaged the LED unknowingly? 

  • Hello Aparna

    What you ate using is called DRM style of coding, something which we strongly discourage. I would suggest using the existing blinky example provided in TivaWare to understand API method for blinking the LED/

    Regards
    Amit
  • Bravo again, Amit.  

    Consistent rejection of such DRM (or ASM) code analysis requests is the BEST and (ONLY) way to halt them.

    Posters must give (some) consideration to the ease & time required of vendor's skilled, yet size reduced, tech staff. 

    As LONG suggested - "Poster Guidelines" would substantially reduce this "ON-GOING" DRM/ASM issue - which has persisted (without correction) - for MANY YEARS!

    Having ALL Vendor staff (not just you) deal w/this DRM/ASM issue CONSISTENTLY - proves very much in order...

  • I understand that you discourage this style of coding, however it would be really nice if you could elaborate on why. I'm new to this and I wasn't aware that this was the incorrect approach. It would really help to know why this style is discouraged!
  • Hello Aparna

    Good question. Now in the code example, if I were to figure out what register does 0x40025400 correspond to, what would be the effort (in time) to figure that out. Then as the code expands and gets complicated with interrupts, and it stops working at some point think of the debug effort...

    Regards
    Amit