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.

CCS/TM4C123GH6PZ: XDS110 Error -1170 @ 0x0 unable to access DAP

Expert 1030 points
Part Number: TM4C123GH6PZ
Other Parts Discussed in Thread: UNIFLASH,

Tool/software: Code Composer Studio

I'm running CCS v8 and I connected to my TM4C123G using an XDS110 with a 14-pin connector. The very first time, the debugger ran to main() and then stopped as normal. When I started running the code it got as far as SysCtlClockSet() and then stopped. When I tried reconnecting, I got the error shown in the title. I now get that error every time I try to start a debug session. Can anyone tell me what has gone wrong and how to fix it? Thanks, Harry.

int main(void)
{
  unsigned long ulLoop;

  for ( ulLoop = 1000; ulLoop > 0; ulLoop-- ) {
    ;
  }
  // Enable main clock
  SysCtlClockSet( SYSCTL_SYSDIV_25 | SYSCTL_USE_PLL |
                  SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ );
  // Enable peripheral clock
  //SysCtlPeripheralClockGating( 0xff );  // Only required for peripherals that need clocking
  //

  • Hello Halo,

    Did you change that API at all?

    I wouldn't expect it to cause an issue and I tested the SysCtlClockSet you used and it works on my LaunchPad.

    Anyways, as far as what is going on, you probably loaded a bad clock configuration.

    You will need to Unlock the device with CCS Uniflash.

    You can see this post for instructions, it talks about XDS200 but XDS110 would be the same: e2e.ti.com/.../3088253

  • Hi Ralph.

    First, in answer to your question, No I didn't change the API.

    Second, I've downloaded and installed UniFlash. I run it and select the TM4C123GH6PZ device and XDS110 debugger. I click the Start button and then go to the DebugPortUnlock section at the bottom of the window, select Tiva Class and press and hold the reset button down while I turn on power. Then release the reset button and click on Unlock. I get a Please Wait ... window and then a red Error! Module closed window pops up. Meanwhile, the window that says Please Wait ... is saying Executing startup scripts: CORTEX_M4_0. Am I doing something wrong?

  • Actually, I've just gone over that Settings and Utilities page more carefully and realise I didn't set the Clock frequency to 16 MHz (my crystal). I've just entered the clock frequency and tried again. After clicking on Unlock nothing seems to happen. What should happen? What is the purpose of the Finish Unlock button? When should I press that?

  • Hello Halo,

    You should get prompts throughout the process:



    Alternatively you can follow the process on page 24 of our JTAG User's Guide: http://www.ti.com/lit/an/spma075/spma075.pdf

  • Hi Ralph. Thanks for the help. Following the instructions in spma075 I have managed to reset the device and can execute the program upto main() again. I am a bit wary of going past this and executing the SysCtlClockSet() function until I can find some reason why it might have gone wrong in the first place. Do you have any suggestions?

    int main(void)
    {
      unsigned long ulLoop;
    
      for ( ulLoop = 1000; ulLoop > 0; ulLoop-- ) {
        ;
      }
      // Enable main clock
      SysCtlClockSet( SYSCTL_SYSDIV_25 | SYSCTL_USE_PLL |
                      SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ );
      // Enable peripheral clock
      //SysCtlPeripheralClockGating( 0xff );  // Only required for peripherals that need clocking
      //
      if ( SysCtlPeripheralPresent( SYSCTL_PERIPH_GPIOA ) ) {
        // Enable the relevant GPIO Module
        SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOA );
        // Loop until ready
        while ( !SysCtlPeripheralReady( SYSCTL_PERIPH_GPIOA ) ) {
        }
        //
        //PortA_Init();
      }
      //
      if ( SysCtlPeripheralPresent( SYSCTL_PERIPH_GPIOB ) ) {
        // Enable the relevant GPIO Module
        SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOB );
        // Loop until ready
        while ( !SysCtlPeripheralReady( SYSCTL_PERIPH_GPIOB ) ) {
        }
        //
        //PortB_Init();
      }
      //
      if ( SysCtlPeripheralPresent( SYSCTL_PERIPH_GPIOC ) ) {
        // Enable the relevant GPIO Module
        SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOC );
        // Loop until ready
        while ( !SysCtlPeripheralReady( SYSCTL_PERIPH_GPIOC ) ) {
        }
        //
        //PortC_Init();
      }
    

  • Hello Halo,

    I am not sure either as I tried the full block you posted on my LaunchPad and it works fine.

    Are you sure the crystal on your BOM has been correctly populated? That could cause an issue. Especially if the code bricks the board again.

    You may want to check your programmer settings too just to be sure on that end.

  • Hi Ralph. I'm pretty sure the Xtal is the right way around. It's a 4-pad xtal and pad 1 is clearly labelled by having an odd trapezoidal shape rather than being rectangular, but I'll check up on that. I'm not sure what you mean by 'check your programmer'; what aspects of it should I check? I have altered the SysCtlClockSet() argument so that the main oscillator runs off the internal 16 MHz PIOSC and that works fine. I think the oscillator source is only going to matter when I try to get the USB to work; I believe USB needs a fairly accurate clock. Harry.

  • I just checked and the crystal is the wrong way round. That explains it. I should have been more careful. Thanks for your help, Ralph.