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.

TM4C123 works in debug, but not in device mode.



I have written a few small programs for some proof of concept stuff, and I have simply debugged, and then once its working, I switch to 'Device' and power via USB and away it goes...did not have to use LMFlash utility.

I have a new program, and it runs fine in Debug, but not in Device. Is it possible that I've run out of flash? How to check? Any other reason the TM4C123 wouldn't even try to run a program?

Thanks,

Tim

 

  • Hello Tim,

    In the Device Mode, is the LED D4 glowing? Secondly how do you know that the program is not working?

    Regards

    Amit

  • Hi,

    Thanks for the feedback. Yes D4 is lit. When running in Debug, I saw D1 behaving as I programmed, and it sends serial port commands correctly. When in device mode,  D1 doesn't come on, and no serial port commands are issued.

    I can run a different project both in Debug and Device mode, so the HW is OK. Over the weekend I tried to validate that the Build/Link configurations were the same between the two projects (one works, one doesn't). I then did a Clean Build, and now I find that when running in Debug, something has gone wrong with the configuration, such that when in debug, I am getting continuous UART interrupts as shown by some DEBUG UARTprintf statements I have in the Interrupt handler. That would probably be the behavior I saw that I thought was related to Device vs. Debug, as it simply doesn't get to the point of turning on the LED before going into the Interrupt handler loop.

    I then get the 'Timed out while waiting for target powerup/polling a hardware resource.' I have not changed any of the clock frequencies since copying from the project that works.  I probably haven't provided enough info for you to help me with this, but any suggestions would be appreciated.

    Thanks,

    Tim

  • Found my problem, more or less. I used the LMFlash Programmer to Erase the flash. My other projects have all been set to 'Erase Necessary Pages Only', so that must be the problem. I have set my project to now 'Use Erase Options Specified Below', which is to Erase Entire Flash. I'm not sure if that fully explains the original problem of running properly in Debug, but not in Device, so I'm still curious, but in any case both work now.

    Tim