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.

Trouble Halting Target CPU: (Error -1266 @ 0x0) Device is held in reset.

Other Parts Discussed in Thread: PGA970, USB2ANY

At the moment im writing Code for the usage of PGA970. I was able to use Waveform and now tried writing into the registers. Seemingly while doing so I entered some kind of Loop in which my board now is trapped in. Im getting the following Message when trying to connect to the target:

Cortex_M0_0: Trouble Halting Target CPU: (Error -1266 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 9.3.0.00042)

Building still works fine didnt change anything but some code in the main.c file. When i pushed over the changes this started hapening and it seems like I can't return to a previous point without this error since shutting the board down and restarting it makes it run the programm immediatly. The programm still works tho, im still getting the wave output...

Seems like i have to reset/flash the board somehow but I didnt find anything regarding this in the forum or the guides.
In addition is there anyway to figure out how this could happen?

Here is my main.c which caused the problem:

#include "pga970_platf.h"

void main(void)
{
   CFG_Peripheral_Config();


     ADC_Config(0x05,0x05,0x01,0x04,0x00);

     CONFIG_ALPWR(0x04);


     MICRO_INTERFACE_CONFIG(0x03);

     DIGITAL_Interface_Config(0x05);

     AMUX_CTRL_CONFIG(0xFF);

     DEMOD1_BPF_config(1492000,1721522550,2142142550);

   while(1)
   {
       /* Every 2ms do main loop calculation */
       if((ADC_Count1 & Coefficients_Calc_Sampling_Rate) == 0x0000){
           APP_Calculate_Coeff();
           WAVEFORM_Read_Table();

           while((ADC_Count1 & Coefficients_Calc_Sampling_Rate) == 0x0000);
       }
   }
}

  • Hello,

    In your initialization functions above the main loop it looks like you are coding the MICRO_INTERFACE_CONTROL to be in the reset state. That register should be set to 0 (default powerup state) if you want the M0 to run properly.

    Also, unless the watchdog timers were disabled, they will need to be serviced periodically in your loop to prevent the M0 from going into reset. I recommend consulting the ARM-M0 documentation for further information on this. 

    Regards,

  • Thank you for your explanation on what caused the problem. I managed it to get the PGA970EVM Board out of that state by connecting the USB2ANY and disconnecting the XDS200. Now you can set the value of MICRO_INTERFACE_CONTROL to 0x00 using the Low Level Configuration in the PGA970 GUI.