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);
}
}
}