iggyboy
Member level 2

dspic30 debug
I have stumbled upon an odd problem. I am trying to "develop" a led blinky on 30F5011 and the mcu keeps resetting itself.
I can program the chip fine, debugging with ICD2 works up to a point, then the device resets itself and the ICD2 loses connection. This usually happens after a "return" in the code, however not always and to me it appears as somewhat random. I rewritten the program and this is the current application:
#includes and config stuff are ok, I have setup the traps and enabled the trap irq, but those never occur unless I manually force (program) them, so they work fine.
Everything is ok, for a few seconds or so, afterwards the mcu stops working and resets itself, ICD2 says it can't enter debug mode. All peripherals are disabled. At the moment I am running it at the internal 7.37 MHz oscillator, all ports are inputs.
Single stepping generally speaking works, but after a random number of cycles the ICD2 loses connection. ICD2 is new and veryfied to be fully operational.
Compiler is C30. Forum on microchip is down, I use debug mode in MPLAB and the MAP file looks OK. Read the tech support on microchip site and still everything looks ok.
Getting rid of ICD2 does not help, in release mode withouth ICD2 the mcu seems dead.
So what is happening?
Help trully appreciated.
I have stumbled upon an odd problem. I am trying to "develop" a led blinky on 30F5011 and the mcu keeps resetting itself.
I can program the chip fine, debugging with ICD2 works up to a point, then the device resets itself and the ICD2 loses connection. This usually happens after a "return" in the code, however not always and to me it appears as somewhat random. I rewritten the program and this is the current application:
Code:
int main(){
while(1){}
}
#includes and config stuff are ok, I have setup the traps and enabled the trap irq, but those never occur unless I manually force (program) them, so they work fine.
Everything is ok, for a few seconds or so, afterwards the mcu stops working and resets itself, ICD2 says it can't enter debug mode. All peripherals are disabled. At the moment I am running it at the internal 7.37 MHz oscillator, all ports are inputs.
Single stepping generally speaking works, but after a random number of cycles the ICD2 loses connection. ICD2 is new and veryfied to be fully operational.
Compiler is C30. Forum on microchip is down, I use debug mode in MPLAB and the MAP file looks OK. Read the tech support on microchip site and still everything looks ok.
Getting rid of ICD2 does not help, in release mode withouth ICD2 the mcu seems dead.
So what is happening?
Help trully appreciated.