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.

Keil debug fail with stellaris launchpad.

Other Parts Discussed in Thread: LM3S1968, LM3S8962, LMFLASHPROGRAMMER, EK-TM4C123GXL, LAUNCHXL-TMS57004

Hi.

I am using a stellaris LM4F120 LaunchPad Evaluation Kit on a windows 8 PC. When I start a debug session with the latest Keil verion(4.72) its automaticly stops and return to the editor.

I have tried with several stellaris kits, and with example projects. I have unistal and reinstal keil and i can´t debug.

Thanks.

  • Hi,

       You might be having a driver problem with windows 8. See, this post below. Some details in there may help.

       Stellaris ICDI + Windows 8 Pro x64 problem

    -kel

  • Hi. Thank you for your answer but drivers are installed. I can flash the device and i can use as a a serial port, but i can not debug. Thanks

  • are u sure that u connected the usb in the in circuit debugger?? check the switch if  its in debug or device state.....

  • Hi and thanks for the answer, but i am sure i am using the correct connection, I can flash the device and debug session starts but automaticly is closed. I have use the same kit in other PC(windows 7) and works ok. I have tried to with another kit and the problem remains, so i think is a trouble with icdi drivers and windows 8. Thanks.

  • I teach a class with 180 students. We use Stellaris/Tiva Launchpad with Keil. We have seen this sequence of failure about 10 times. All errors occurred with Windows 8. We can successfully install the drivers, and the Keil + ICDI debugger are completely functional. This functional period may be a month or two. However, something happens and the ability to start the debugger stops working. This change is not correlated with any change in the board, Keil project settings or microcontroller code. Just like the other posts, the board can be flashed, but when we hit the debug button in Keil. Keil returns to the editor without running the ICDI debugger. When it stops working the symptoms spread to ALL our other TI projects like the LM3S1968, LM3S8962, LM4F120 and TM4C123 boards. ***Things that do not fix the problem*** 1) Uninstalling the Stellaris/Tiva drivers and reinstalling the drivers; 2) Uninstalling and reinstalling Keil; ***Things that do fix the problem*** 1) Wiping the HD and reinstalling Windows 8. ***Observations*** 1) The same projects/boards work fine in Windows 7 and XP; 2) We have followed the driver installation with booting Windows 8 with “Disable Driver signature Enforcement” http://users.ece.utexas.edu/~valvano/Win8drivers.htm; 3) After wiping the HD and reinstalling Windows 8 on two computers, these two computers have been working for 5 months without a repeat incident. ***Question?*** Any thoughts on a fix that doesn't include reinstalling Windows 8?
  • I have encountered the same problem.  I was working with Windows 8 then Windows 8.1 and Stellaris 4F120 LaunchPad, Tiva TM4C123GXL LaunchPad, DK-TM4C123G Development Kit.  The setup worked for about two months then suddenly one day it quit working.  The download seemed to complete but would not establish the debugger.  Worst yet, three of my LaunchPads do not respond to Keil anymore.  I tried to remove the LMFlashProgrammer and ICDI driver and reinstall it, ICDI driver did not install now (I had no problem installing it before).  I just got the precedure from Valvano a minute ago and am following it.  My Windows 8.1 has slightly different menu.  Now I am not sure I want to try it again with the risk of losing more LaunchPad.

    In the interim, I am using my old Windows 7 and it works fine.

  • Sorry for the delay in having someone from development respond. It looks like this post fell through the cracks and none of us noticed it when it was originally started. I'll raise this as an issue and have someone set up a Windows 8 system to look into it. If anyone has any information on possible ways to reproduce the problem quickly, that would be very helpful. In the meantime, though, I think the best course of action would be to send a special build of the Keil debug DLL with logging enabled to a few people who can reproduce it since that will help narrow down the problem area a bit.

    I'm out of town this week but will follow up when I return next Monday.

  • I have three dead (would not respond to Keil nor CCS) LaunchPads and will be happy to send them in for failure mode analysis.  I was planning to flush my PC with Windows 7 but that will only fix the problem of this computer not the problem I have to face when students are coming in with Windows 8 laptops.  So I will hold on to my non-functioning Windows 8 computer and wait to test the debug DLL when it is available.

  • I was just reading through this thread and have a couple of questions and something to try out.

    1) Was any software installed just prior to the failures?

    2) Was there a Windows update that occurred?

    Also, can you try something on the machine where the driver is loaded yet fails?  The following instructions will modify the boot configuration values and should be persistent.

    1) Open a command window with Administrator privileges

    2) At the command prompt enter the command:   bcdedit /set testsigning on

    3) reboot:   (shutdown /r /f)

    4) Optional: after reboot you can check the config settings:   bcdedit  /enum

         There should be an entry in the display that shows that testsigning is on (testsigning  yes)

    Once the test signing is enabled are you able to debug?

    Hope this helps.

     

  • I did launch command prompt as "run as  administrator"; but got this error

    Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved.

    C:\windows\system32>bcdedit /set testsigning on

    An error has occurred setting the element data. The value is protected by Secure Boot policy and cannot be modified or deleted.

    C:\windows\system32>

    When I execute bcdedit /enum I do not see testsigning in the list of options

  • When it happen to me; there was no installations prior to it stopping working; I have emails for 3 students who Windows 8 currently exhibits the failure. For my computer and Dr. Yerraballi's computer we fixed it by wiping the HD and reinstalling Windows 8 and all applications.

  • Hopefully we can quickly find a solution that doesn't require having to go through re-installing Windows.

    Can you tell if bootlog is enabled?  It should be shown in the /enum output.  Maybe you can send the complete /enum output and we can see what settings are enabled/disabled.  If it is enabled there should be a log file called Ntblog.txt in the %WINDIR% location.  That has a text file of the drivers that get loaded on boot.  Can you forward that along?

    Also, would it be possible to send a capture of your System Information?  Msinfo32.exe

     

  • I am running on my Windows 8 machine that currently does work. I wanted to try your procedure before asking the students (about 3 of them) to do it. Do you want the logs these systems too?

     

    Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved.

    C:\windows\system32>bcdedit  /enum

    Windows Boot Manager -------------------- identifier              {bootmgr} device                  partition=\Device\HarddiskVolume2 path                    \EFI\Microsoft\Boot\bootmgfw.efi description             Windows Boot Manager locale                  en-US inherit                 {globalsettings} integrityservices       Enable isolatedcontext         Yes default                 {current} resumeobject            {e3015be4-984f-11e2-be6d-6045bdeadda1} displayorder            {current} toolsdisplayorder       {memdiag} timeout                 30

    Windows Boot Loader ------------------- identifier              {current} device                  partition=C: path                    \windows\system32\winload.efi description             Windows 8 locale                  en-US inherit                 {bootloadersettings} recoverysequence        {e3015be2-984f-11e2-be6d-6045bdeadda1} integrityservices       Enable recoveryenabled         Yes isolatedcontext         Yes allowedinmemorysettings 0x15000075 osdevice                partition=C: systemroot              \windows resumeobject            {e3015be4-984f-11e2-be6d-6045bdeadda1} nx                      OptIn bootmenupolicy          Standard detecthal               Yes

    C:\windows\system32>

  • Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved.

    C:\windows\system32>bcdedit  /enum

    Windows Boot Manager -------------------- identifier              {bootmgr}

    device                  partition=\Device\HarddiskVolume2

    path                    \EFI\Microsoft\Boot\bootmgfw.efi

    description             Windows Boot Manager

    locale                  en-US inherit                 {globalsettings}

    integrityservices       Enable isolatedcontext         Yes

    default                 {current}

    resumeobject            {e3015be4-984f-11e2-be6d-6045bdeadda1}

    displayorder            {current}

    toolsdisplayorder       {memdiag}

    timeout                 30

    Windows Boot Loader -------------------

    identifier              {current}

    device                  partition=C: path                    \windows\system32\winload.efi

    description             Windows 8 l

    ocale                  en-US

    inherit                 {bootloadersettings}

    recoverysequence        {e3015be2-984f-11e2-be6d-6045bdeadda1}

     integrityservices       Enable

    recoveryenabled         Yes

    isolatedcontext         Yes

    allowedinmemorysettings 0x15000075

    osdevice                partition=C:

    systemroot              \windows

    resumeobject            {e3015be4-984f-11e2-be6d-6045bdeadda1}

    nx                      OptIn

    bootmenupolicy          Standard

    detecthal               Yes

    C:\windows\system32>

  • I can't get "bcdedit /set testsigning on" to run as administrator either.

    Here is the output of bcdedit /enum:


    Windows Boot Manager
    --------------------
    identifier {bootmgr}
    device partition=\Device\HarddiskVolume2
    path \EFI\Microsoft\Boot\bootmgfw.efi
    description Windows Boot Manager
    locale en-US
    inherit {globalsettings}
    integrityservices Enable
    default {current}
    resumeobject {a0e3cbf2-16fa-11e3-be77-681729557368}
    displayorder {current}
    toolsdisplayorder {memdiag}
    timeout 0

    Windows Boot Loader
    -------------------
    identifier {current}
    device partition=C:
    path \WINDOWS\system32\winload.efi
    description Windows 8.1
    locale en-US
    inherit {bootloadersettings}
    recoverysequence {a0e3cbf4-16fa-11e3-be77-681729557368}
    integrityservices Enable
    recoveryenabled Yes
    isolatedcontext Yes
    allowedinmemorysettings 0x15000075
    osdevice partition=C:
    systemroot \WINDOWS
    resumeobject {a0e3cbf2-16fa-11e3-be77-681729557368}
    nx OptIn
    bootmenupolicy Standard

  • This is a response from one of my students whose computer will not run Keil-debug

    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.
    C:\WINDOWS\system32>bcdedit /enum
    Windows Boot Manager
    --------------------
    identifier              {bootmgr}
    device                  partition=\Device\HarddiskVolume1
    path                    \EFI\Microsoft\Boot\bootmgfw.efi
    description             Windows Boot Manager
    locale                  en-US
    inherit                 {globalsettings}
    integrityservices       Enable
    default                 {current}
    resumeobject            {8a47cf92-c7e9-11e2-8fbd-f62bee847052}
    displayorder            {current}
    toolsdisplayorder       {memdiag}
    timeout                 30
    Windows Boot Loader
    -------------------
    identifier              {current}
    device                  partition=C:
    path                    \WINDOWS\system32\winload.efi
    description             Windows 8.1
    locale                  en-US
    inherit                 {bootloadersettings}
    recoverysequence        {8a47cf94-c7e9-11e2-8fbd-f62bee847052}
    integrityservices       Enable
    recoveryenabled         Yes
    isolatedcontext         Yes
    allowedinmemorysettings 0x15000075
    osdevice                partition=C:
    systemroot              \WINDOWS
    resumeobject            {8a47cf92-c7e9-11e2-8fbd-f62bee847052}
    nx                      OptIn
    bootmenupolicy          Standard
  • Sorry for the delay.  We have been trying to get a set up that fails, running different permutations of boot options and Win8 settings.  So far we have not been able to duplicate this and debug always seems to work.  Just wanted to provide an update.  We will keep investigating to try and find a root cause.

  • I have 6 students with this issue. Do you want them to try anything?

  • Some more questions and information request:

    1) Are you unable to load code and not debug when this happens?  Or can you load code and just not debug?

    2) What version of Keil are you using?  Can you send screen shots of the properties tab for the Debug and Utilities tabs?

    3) Can you send a screen shot of the driver details for the Stellaris ICDI DFU Device and the Stellaris ICDI JTAG/SWD Interface?

    Thanks.

  • 1) It seemed to finish loading the code, switched to debug view then switched back to edit view immediately by itself.  I lost three LaunchPads (one EK-LM4F120XL, two EK-TM4C123GXL) after that.  They are not responding to Keil anymore, not even in a Windows7 system.  When I plugged in these three boards to my Windows7 system, the drivers came up but when I tried to debug in Keil, I got

    The DK-TM4C123G survived.

    2) I used Keil v4.72.10.0 and v5.0.5.15.  Both exhibit the same problem.

    3) I am not sure what you like to see.  There are so many Properties under Details.

    Let me know if you need anything else.

  • This is similar to what we have. Again the symptoms are it has worked for months and then stops working. Only happens on Windows 8 or 8.1. We can still download but when we click debug, it starts for a second or two, we get no error at all, but it pops out of the debugger back to the editor. The boards do work ok on other computers. Once it happens none of the TI boards can be debugged e.g., LM4F TM4C LM3S.

  • Have followed this saga w/interest - really feel both Shujen's & Jonathan's (& their students') pain.

    Jonathan reports that, "The boards do work ok on other computers."  As written - this sentence may imply that the, "simple connection of these failed boards to another computer" - causes proper operation to restore - w/out requiring any change of any sort!  Is this interpretation correct?  (I don't believe that to be the case.)  Yet another interpretation of that sentence suggests that these same boards, "had worked properly upon other computers" and then ceased to do so - once operated & connected to computers using Win8.  I (perhaps others) cannot really tell...

    Devil very much in such fine detail - surely those impacted, "know precisely" what they mean - but those attempting to analyze, discover and repair - may see their efforts thwarted by even a relatively minor difference of interpretation; even though (and despite) both sides being motivated & well-meaning!  (and that - to no one's benefit)

    Might this same sentence - viewed under the microscope - expand to better read as, "Prior to the failure event under Win8 or Win8.1 - the boards did work on other computers?"  Yet - still unclear - what is really meant by, "other computers" here?  (i.e. non Win8/Win8.1 computers - one may guess...)

    Not attempting to nitpick - our group has too often seen, "imprecision in language" both create & extend problems.  My attempt here is to minimize, even avoid that risk.  And of course - this issue has lingered - frustration & pressure usually conspire to cloud more relaxed thought/analysis.  (tech contracts I've/others have drawn have been thick - caused by the attempt to provide clarity, necessary detail, anticipate & resolve ambiguity.)  Brevity & deadline pressure usually confound (such necessary) clear & detailed explanation... 

    Have one other suggestion - code size seems not to the the issue - and this behavior seems much confined to Keil.  Perhaps installation of "free" IAR (32KB code size Kickstarter) or vendor's CCS may cause similar or overlapped issues - and via "cross-check" some critical discovery may sooner or more easily be, "teased out!"  (one would hope) 

    Good luck guys - do hope further detailing resolves this issue quickly - and to your full satisfaction... 

  • Thinking further about this important issue - might it be that some-way/how the IDE and/or the ICDI drivers (and the ICDI HW) - individually or in some combination - create a, "perfect storm" which (after the passage of some time) upsets some aspect of Win8/8.1?  If so - then strategic diagnosis argues for detailed, individual examination of each of those specific areas.

    Post above suggested temporary movement to another IDE (IAR or CCS) although IAR seems the best match to the Keil IDE which is key to this thread.  Should this issue be solely IDE created/caused - failure to far earlier engage the IDE vendor (none has been reported, here) seems short-sighted.  Suggest this be quickly/thoroughly corrected.

    Remaining then are the ICDI drivers & ICDI HW.  And - it would appear - that various ICDI drivers & ICDI HW (i.e. those under LX4F & LM3S) suffer the same fate - "once the issue has asserted."  Unclear though - do the earlier ICDI driver & ICDI HW based boards (those LM3S & LX4F based) - immediately connect & perform correctly - w/out any change - when attached to non Win8/8.1 based computers - and after having failed under Win8?  (simply cannot tease out that detail from earlier posts)

    At the risk of blasphemy - other low-cost, small/simple ARM Eval boards exist (X brand) - and these enable different ICDI drivers and ICDI HW to be placed under the identical test & use case conditions.  Simply suggesting as a "short-term" test vehicle - so that several presently "unknown variables" may be isolated & better examined.

    For completeness - contact should be raised w/beloved Win8/8.1 creator - just in case.  (again - none reported)

    Issue first landed here October 14 - admittedly, "fell thru the cracks" - this writing offered in the hope that added detail & direction may speed the correction...  (do note that our group has only recently moved to Win7 - and continue to exploit the safety/sureness afforded by StellarisWare & J-Link/IAR...those choices our buffer against apparent, "Perfect Storm")

  • Cb1, thanks for the detailed response.  Here is a little history of how I got here.  I am a professor teaching microprocessor courses.  I am planning to introduce ARM micro to my courses so starting in May this year, I procured a Stellaris LaunchPad EK-LM4F120XL.  When summer came, the ICDI started failing from time to time.  After a while, I figured it was temperature dependent.  The board seemed to work only below 75F.  I contacted TI support and was told that the warrenty expired.  So I replaced it with two Tiva LaunchPads EK-TM4C123GXL in August.  In September I bought a new laptop that came with Windows 8.  I upgraded it to Windows 8.1 later (probably October).  On November 9, suddenly Keil would not stay in debug mode.  I tried it many times and ended up all three LaunchPads stopped working even when I moved them to my old WIndows 7 computer or CCS with either Windows.  The DK-TM4C123G does not work with Windows 8/Keil but still works with Windows 8/CCS and Windows 7.

    My first guess was that some how I have a defective laptop.  I checked the voltage levels of all the USB signals and power without finding anything wrong.  The fact that DK-TM4C123G still works with CCS probably is a pretty good assurance.  I use the same laptop with other non-TI microprocessors (ARM and others) without any problem either.  I contacted a TI employee about the situation and offered to send in the LaunchPads for failure mode analysis.  He told me he would look into it but never got back to me.  I don't know how I missed this thread when the boards failed.  Had I known that I was not the only one with the problem, I might have taken a different approach.

    I simply bought two more Tiva LaunchPads and use my old Windows 7 computer.

    The use of Tiva LaunchPad for my microprocessor courses was started on my own initiative and I have no deadline to meet.  Without resolving this issue, I will not take the risk to introduce a course with Keil and ICDI.  I believe Professor Valvano is in a different situation.  His EdX course using Tiva LaunchPad is scheduled to roll out in January.  Like other MOOC courses, it may have tens of thousands of students enrolled.  If we use the 5.5% failure rate he experienced, there may be hundreds or thousands of failures.  So far I seem to be the only one with the disabled hardware but the sample size is small.

  • It doesn't seem to be hardware fault on the boards. Once symptoms start, the boards work fine on other computers (windows 7 and windows 8), but once it starts none of my boards will debug on the computer. Things that we have tried and did not work. a) uninstalling/reinstalling Keil; b) uninstalling/reinstalling drivers according to Windows 8 help instructions; c) flashing the board. I fixed my two computers by wiping the HD on the computers and reinstalling Windows 8. I do have 3 or 4 students with an active problem if you want to try something. We do have 14000 students registered for the MOOC which starts Jan 22. I can't change boards or compilers at this stage.
  • I have uninstalled and reinstalled LMFlashProgrammer and ICDI drivers.  I have also uninstalled and reinstalled Keil and also change Keil from v4.72.10.0 and v5.0.5.15.  Neither fixed the problem.  I am not ready to wipe out the HD and reinstall Windows.  I don't believe that is an acceptable solution for my students.

  • @ Shujen,

    Thanks for your response - especially the care & thoroughness shown by including that valuable, detailed history.  So often such narrative triggers a vital line of analysis - otherwise missed.  As stated - our group prefers to be, "bit behind the curve" as regards major new PC OS or critical SW issues.  Thus - we have just one Win8 machine (under quarantine) and none of our ARM MCUs (from multi-makers) have thus far engaged.

    Have used ARM MCUs nearing on 10 years now - forced away from our 8051s by key clients - who demanded higher performance.  I past co-founded, served as VP Engineering - and then took that tech firm public.  Overcoming multiple, similar such tech problems proved vital to our growth & financial success. While our firm was smallest, massively under (financed & staffed) - we consistently proved resourceful & astute enough to regularly outperform & win orders against far larger competition.  Present this so that you may better consider adopting the suggestions I made - in your & others regard.  (my care, effort seems to have little moved the other's needle...)

    I've not been able to kill any ARM MCU via proper, "normal/customary" JTAG or SWD input - even disordered (outside time or position spec.)  (assumes signal levels are all constrained to V spec)  I don't believe your misbehaving boards are, "fini" - suggest that you properly store/handle (ESD Safe) & I bet - in time - we can restore/recover...

    Developing methods to "speed" the onset of this issue appears critical - I have further ideas in that regard (did just that to overcome size/finance advantages of past competitors) - and believe my earlier writings offer a sound beginning...

  • Cb1,

    I value your inputs.  For someone to put in so much effort in writing attempting to lead us to a resolution of a problem you don't have, you are more than appreciated.

    I have the same suspicion whether it is possible to disable the ICDI firmware through some sort of operation through JTAG or SWD interface.  That was why I wrote them off as some sort of hardware glitch at first and ordered a couple of replacement boards.  Only when the replacement boards are exhibiting similar problem, I realized the issue is bigger than I thought.

    I am not actively seeking a resolution because my prior contacts with TI did not seem to get much traction and several of my posts at this forum (of other issues) did not receive any response until this week.  To borrow your phrase: at the risk of blasphemy, at this early phase of course development I still have many other options.  My offer to ship the three boards to TI for FMA is still standing. 

  • @ Shujen,

    To borrow (steal, actually) a phrase from the talented Ms. Cozart, "You are too kind."  (and you also are appreciated)  I write a lot of code - try to sniff out new biz opportunities (too often outside my comfort zone) and find it helpful to come here (and similar) to blast out post - > unwind...  Try to enjoy the process - have krazy energy.  (although pile of unwashed dishes too often "blocks" the soothing glow of "banned/naked 40W incandescents" strung overhead)

    Continue in the belief that problem definition remains imprecise - even after I took some pain to describe/report.  Need for a solution can often, "get in the way" (of full, proper, & adequate description.)  I "crafted" several sentences (i.e. very tightly defined) - yet brief/compact response - to my mind - did not meet that standard - I still have no clear idea of each/every result incurred via each tightly bounded condition.  Brevity - imho - is more enemy than friend, here!  Factory gals/guys deserve a thorough, properly detailed & bounded problem description - which myself/others have yet to see...

    Indeed Win8 requires special effort to now avoid.  Yet we've done that - and famed 9-pin (real) RS232 port projects rearward - most all of our engineering section's computers.

    Devil very much in these details - I don't know how better (or further) to say it...

  • Thank you for providing the screen shots of the Keil properties.  As far as the debug selections within the tools it appears the drivers are selected correctly and the fact that you can download code seems to indicate the ICDI might be ok.  In addition, we have been unable to change the behavior of the debug using any of the Windows permissions in an attempt to duplicate the issue.

    Some users have had LaunchPads not work at all after a download.  For those cases:

    1) Have you tried to erase the entire flash of those LaunchPads to see if they recover?

    2) Can you send the code that you were using when the LaunchPads became unusable?

    We have put together a debug version of the dll used for the ICDI.  It will be tested tomorrow and then I will forward it along to hopefully see if it will identify what is happening.  In the meantime, can you provide detailed steps that you are using when you use the LaunchPad, create the project, compile and debug for example? As much detail as you can provide would be helpful. 

     

  • At the time the LaunchPad became unusable, I was testing some code exercising the timer capture functions.  With the code like the following.  If you like to see the whole project, please give me an email address and I will send you the whole project folder.


    // Initialize Timer0A to capture rising edge in edge-time mode.
    // The input pin of Timer0A is PB6.
    void Timer0A_periodCapture_init(void)
    {
    SYSCTL->RCGCTIMER |= 1; // enable clock to Timer Block 0
    SYSCTL->RCGCGPIO |= 2; // enable clock to PORTB

    GPIOB->DIR &= ~0x40; // make PB6 an input pin
    GPIOB->DEN |= 0x40; // make PB6 a digital pin
    GPIOB->AFSEL |= 0x40; // enable alternate function on PB6
    GPIOB->PCTL &= ~0x0F000000; // configure PB6 as T0CCP0 pin
    GPIOB->PCTL |= 0x07000000;

    TIMER0->CTL &= ~1; // disable timer0A during setup
    TIMER0->CFG = 4; // configure as 16-bit timer mode
    TIMER0->TAMR = 0x17; // up-count, edge-time, capture mode
    TIMER0->TAILR = 0xFFFF; // full load
    TIMER0->TAPR = 0xFF;
    TIMER0->CTL &= ~0xC; // capture the rising edge
    TIMER0->CTL |= 1; // enable timer0A
    }

    // Initialize Timer3A to capture rising edge in edge-count mode.
    // The input pin of Timer3A is PB2.
    void Timer3A_countCapture_init(void)
    {
    SYSCTL->RCGCTIMER |= 8; // enable clock to Timer Block 3
    SYSCTL->RCGCGPIO |= 2; // enable clock to PORTB

    GPIOB->DIR &= ~0x04; // make PB2 an input pin
    GPIOB->DEN |= 0x04; // make PB2 a digital pin
    GPIOB->AFSEL |= 0x04; // enable alternate function on PB2
    GPIOB->PCTL &= ~0x00000F00; // configure PB2 as T3CCP0 pin
    GPIOB->PCTL |= 0x00000700;

    TIMER3->CTL &= ~1; // disable TIMER3A during setup
    TIMER3->CFG = 4; // configure as 16-bit timer mode
    TIMER3->TAMR = 0x13; // up-count, edge-count, capture mode
    TIMER3->TAMATCHR = 0xFFFF; // set the count limit
    TIMER3->TAPMR = 0xFF;
    TIMER3->CTL &= ~0xC; // capture the rising edge
    TIMER3->CTL |= 1; // enable timer3A
    }

    // This function captures two consecutive rising edges of
    // a periodic signal from Timer Block 0 Timer A and returns
    // the time difference (the period of the signal).
    int Timer0A_periodCapture(void)
    {
    int lastEdge, thisEdge;

    // capture the first rising edge
    TIMER0->ICR = 4; // clear timer0A capture flag
    while((TIMER0->RIS & 4) == 0) ; // wait till captured
    lastEdge = TIMER0->TAR; // save the timestamp

    // capture the second rising edge
    TIMER0->ICR = 4; // clear timer0A capture flag
    while((TIMER0->RIS & 4) == 0) ; // wait till captured
    thisEdge = TIMER0->TAR; // save the timestamp

    return thisEdge - lastEdge; // return the time difference
    }

    int Timer3A_countCapture(void)
    {
    return (TIMER3->TAPS << 16) + TIMER3->TAR;
    }

    The LaunchPad was connected to the Windows 8.1 laptop through the USB debug port, a function generator and an oscilloscope.  All of them plugged into the same power strip.  After the first LaunchPad became unresponsive, I suspect there was ground loop current.  To eliminate that, I modified the program to generate pulses from PWM using WTimer5A and installed a jumper between the PWM output to the Timer input so the LaunchPad is completely floating with the USB as the only connection.  The other two LaunchPads became unusable with that configuration.

    Since I suspected it was hardware problem, I ordered two more LaunchPads.  When I plugged in one of them to the same laptop that failed the first three, it bounced out of Keil debug view within a second.  I quickly unplugged the board from the laptop.  I have been using my old Windows 7 laptop since then and I do not feel comfortable plug these new LaunchPads back to the Windows 8.1 laptop.

    When I plug in the first three LaunchPads to the Windows 8.1 and Windows 7 laptop and tried to erase the entire flash, this is what I got when I click the Erase button.

    Since I do not want to lose more LaunchPad, I did not use the LaunchPad with the Windows 8 laptop.  But I have done several tests with the DK-TM4C123G and the Windows 8 laptop.  I tested them with the example programs from TivaWare_C_Series-1.1 with small program as blinky and large program as qs-logger.  For these programs, I simply double click on xxx.uvproj to launch Keil uVision, click Build, then click Start/Stop Debug Session.  They seemed to download OK but would not stay in debug view.

    I have installed the whole suite of Hercules development tools when I attended the Hercules workshop on September 25.  The LAUNCHXL-TMS57004 did not work with my Windows 8 laptop.  The symptom was that the driver would not stay up.  The driver kept disconnecting and reconnecting.  I could not complete the exercises of the workshop.  The instructors were well aware of the situation.  I have not heard anything after that and my Hercules is staying in my storage.  I didn't think the Hercules driver have anything to do with Tiva LaunchPad because there was a six week interval before the Tiva LaunchPad failures but I could be wrong.

  • Hi Shujen,

    Relating to your picture: can you repeat the programming and when got the error message, go to configuration tab and snap that window instead of the starting one. My question: did you selected the right clock source for your microcontroller in that tab?

    Petrei

  • Petrei,

    This is how I interpret your request:

    Relating to your picture: can you repeat the Flash Erase with LM Flash Programmer with the unresponsive Tiva LaunchPad and Windows 8.1 and when got the error message, go to configuration tab and snap that window instead of the starting one. My question: did you selected the right clock source for your microcontroller in that tab?

    The clock source is fixed when I select TM4C123G LaunchPad.

  • Hi,

    It is OK; a big number of users neglect these settings and the resulting message is the same. I do not use W8...

    Petrei

  • Out of curiosity...is there a USB.inf file in your Windows/inf directory?

  • Yes, it is a 44K file.  You want me to post it here or email it to you?

  • No.  I was just checking to see if it was there. Sending the debug dll.

  • It seems users are on the MDK4 (v4.72) or MDK5 (v5.0.5) versions of Keil.  Can you try the 4.73 version of the Keil tools? 

    Let me know if this changes the behavior.

    Thanks,

    -c

  • It appears there may be an entry to the registry that is getting set that is preventing debug.  That would explain why only re-installing Windows was fixing the problem.  In the Windows registry search for an entry:

    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

    If there is an entry similar to the following: 

    C:\Keil\UV4\UV4.exe           REG_SZ               $ IgnoreFreeLibrary<lmidk-agdi.dll>

    Remove the entry.  Reboot and retry the debug session.

    Hope that helps.

    -c

  • Craig,

    Your fix works for me.

    Thank you for your hard work to resolve the issue.

    Shujen

  • Kindly record Vote 2 for your focus/effort in this matter - thank you and much appreciated.

    We do note that often this issue was reported, "not to arise" until some passage of time and/or some unwanted, "combination of events."  Does this removal of that specific Register entry - defeat all of those "bad mechanisms" - and avoid the inadvertent creation of any unwanted, new ones?

    And - as poster Shujen reported, "loss of board function" (across multiple launchpads)  - perhaps as a result of this issue - are you able to identify anything w/in this error condition that could explain the board loss?

    And @ Shujen,

    Perhaps this encourages your use of "LM Flash Programmer\Utilities\Restore" - and reconnection of your earlier, failed boards - as & if Craig agrees...

  • This process fixed the Windows 8 problem on one student (only one to try it). Thanks

    It appears there may be an entry to the registry that is getting set that is preventing debug.  That would explain why only re-installing Windows was fixing the problem.  In the Windows registry search for an entry:

    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

    If there is an entry similar to the following: 

    C:\Keil\UV4\UV4.exe           REG_SZ               $ IgnoreFreeLibrary<lmidk-agdi.dll>

    Remove the entry.  Reboot and retry the debug session.

  • Pardon - but our group finds the above post confusing.  It very much is a full duplication of the 3+ hour earlier post, by TI employee, Craig Giglio - yet that fact is markedly absent.  Should not "some" attribution be provided?  This forum provides an "easy-use" quote feature - used by many - especially to prevent such confusion & enable proper attribution.

    Or - is this, just introduced fix, "the work/effort of one student," as possibly suggested.   Brevity - lack of specification & lack of attribution combine - raising rightful concern.  (our group seeks to pass this newly released info onto clients - but now hesitate due to this "muddying" of the real source.)  Proper attribution should be made - fully crediting the responsible party...

  • Sorry to confuse. I have 6 students out of 180 with the windows 8 problem such that Keil stopped debugging after working fully for months. One of six students tried the regedit process suggested in an earlier post  made by Craig Giglio and it worked. Keil can now edit the Tiva board in Keil on Windows 8. I have not been able to connect with the other 5 students because it is finals. The regedit process was copied from Craig Giglio's earlier post, and I was just trying to say Craig's suggestion fixed the error for this one student. I copied the instructions because there are many suggestions in the thread and I wanted to clarify which suggestion worked.

  • Thank you - your detail, this most recent post, clarifies & now provides the "normal/customary" attribution to which Craig Giglio is fully entitled.  Your earlier post - lacking such attribution - almost suggested that you or your group had produced this desirable outcome - which rather clearly - was not the case.

    The correctness of Craig's solution is far better & properly noted/highlighted - by the award of, "Verified Answer" - that coming from the originating poster or by Craig or other vendor staff.  A notable green stripe will then appear (surely you've noted) and that provides vastly superior, "Correct Answer-look here" clarity.

    Again - our thanks to Craig Giglio and we once more request confirmation from Craig - that the past, reported, "failure over time" - when operated under Win8/8.1 - has been found and duly corrected by the method Craig's herein described...

  • The solution Craig provided is a great relieve for those who were stranded with Windows 8 and no Keil but it did not address the root cause.  We still do not understand how that happened and I am sure Craig and his team is looking into it.

    I would like to believe the events that caused my three LaunchPads to become incommunicado at the same time Keil debug stopped working were just pure coincidental. But back in my mind there is a shadow looming. The fact that I offered to ship them to TI for failure mode analysis several times without a taker does not make me feel comfortable.

    When I tried to erase these three LaunchPads with LM Flash Programmer, I am still getting "Unable to initialize target -0!"  When I tried to use Keil to debug the board I got

    When I click on OK, I got this:

    After that, Keil is still working with the new boards.

  • @ Shujen,

    Your writing, issues, concerns much echo ours, (our clients - we have no such boards...).  You may note that earlier - just after Craig had posted - I raised that exact, "cause/effect" (real resolution) question. 

    One key may be that several here report correct operation for some period of time - and then - suddenly - the issue arises & presents.  A few of our clients - I now find - have suffered failure - very much as you describe.  Appears that both you & I are "uncertain" about the "fullness/exactness" of the prescribed "fix" - especially as insufficient time has elapsed to fully enable that past gremlin(s) to, "launch."  (how appropriate, that)

    If you wish - by your enabling "conversations" @ this forum's initial, set-up page(s) - we may exchange privately in more focused detail. 

  • Hey there,

    Just wanted to clarify a few things.  

    First, thanks for the patience as we work through these issues.  

    Second, the path to find the "fix" was a collaborative effort by several people within our group and Keil as well as everyone on this post that have taken the time to work through the discovery process on the forum. That is what makes these forums so great, that there is a wealth of knowledge behind them and the willingness to provide valuable feedback.  

    The "fix" proposed will provide a way for people that are currently experiencing the issue to move forward with their debugging.  We understand that this is not the root cause and are working to find out why Windows will add this registry entry in the first place.  We have some ideas, but nothing conclusive yet.  We will provide feedback once we determine a solution so that registry modification is no longer necessary either.

    Stay tuned.

  • When you used LM Flash Programmer to erase the part what steps did you use?  Did you try using the JTAG Unlock?  If not can you try this to recover the boards that are unable to connect and let us know if that works?