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.

Error connecting to target

I was debugging a program with the LM4F232H5QD evaluation board. It was running fine for long. One time I started debugging it showed me the message "Error connecting to target". Since then it is not working on any PC. Also CCS crashes after clicking on CANCEL in the error message. What might be the problem? Kindly help.

 

Makarand Deshmukh 

  • Hi,

    1. Ensure that your board is powered up. 
    2. Use the LM Flash Programmer to perform a Debug Port Unlock Sequence. (Select Blizzard Class)
    -kel
  • Hi Kel,

    Thank you for the solution. It worked.

    Makarand.

  • Makarand,

       You are welcome. See post below. You can find this on the top of this forum. I think most people skip this.

       JTAG Communication Failures

    -kel

  • Markel Robregado said:
    I think most people skip this.

    So - so true!  And unfortunate.

    Great that you're "restored" - but may be wise to conduct "post-mortem" - so that episode is less likely to repeat.  Usual suspects in such "JTAG lock-out" (if that is indeed what occurred) are the diverting of pins PC0-PC3 from their default JTAG mode.  However newer devices (LX4) anticipate and have erected a defense mechanism - which makes such "diversion" more difficult. 

    Suggest that you look w/some care @ any/all "writes" to Port C - these are made much safer by (|= or &=) into bit positions - rather than a more brutal, whole Port write.

  • Well, as far as the code is concerned, there are no writes to PORTC at all, but I am using pins 5 and 6 as inputs for QEI. Other than that PORTC is not being used. As for the clock speed, I have not touched the clock initialization code since a long time.

    Thanks all for your help and suggestions.

    Makarand.

     

  • Makarand Deshmukh said:
    NO writes to PORTC at all, but I am using pins 5 and 6 as inputs for QEI

    While I don't know if "pins 5/6" are w/in Port_C - and if we can assume those pins do not "default" into QEI mode - then it may well be that you've "written" to Port_C (either directly or indirectly) - to order those pins into QEI service. 

    And - done incorrectly - this can cause dreaded JTAG lockout...  W/out cause/effect analysis/safeguard - issue may reappear...  (i.e. "you've stopped the bleeding" - yet sharp knife remains, "at large!"