Pumpkin, Inc.

Pumpkin User Forums

debug_printf() problem with rowley crossworks

For issues specific to TI's MSP430 line of ultra-low-power microcontrollers, including compilers (e.g. Quadravox AQ430), IDEs (e.g. IAR Embedded Workbench) and development tools (e.g. TI MSP-FET430 Flash Emulation Tool).

debug_printf() problem with rowley crossworks

Postby ankushdesai » Tue Aug 18, 2009 1:24 am

I am facing a problem with a very basic code on MSP430F2618. I am using crossworks v2 for MSp430.
I have attached a very basic code while toggles the Output of P1.3 in a while loop. The problem is whenever i put a debug_printf() statement in my code anywhere it gives a waveform, from which we can see that it performs well for some 7-8 msec and then goes blank for sometime and then again toggles the port bit. This thing happens only when in debug mode and the port toggles properly when i run the code in "build and run" mode/ "build and Debug" mode with the debug_printf() statement removed. So wat i concluded was that there is some problem in the
debug_printf() statement and in debug mode.
My question is why its goes blank after 7-8 milisecs.
The section of the waveform (7-8 ms) if expanded is the proper square waveform in which it performs properly.

Code :
void main(void)
{
int i=0;
P1DIR |= BIT3;
//Stop the Watch dog timer
WDTCTL = WDTPW + WDTHOLD;
while(1)
{
P1OUT ^= BIT3;

}


debug_printf("hello world
");
}


Thanks,
Ankush Desai

ankushdesai
 
Posts: 20
Joined: Mon Mar 09, 2009 11:00 pm
Location: Kanpur,UP,India

Re: debug_printf() problem with rowley crossworks

Postby aek » Tue Aug 18, 2009 7:06 am

This is really a CrossWorks question (has nothing to do with Salvo), but I'll answer it anyway.

The debug functions that are part of CrossWorks are functions that are implemented through the JTAG port "all the way back to the host PC". I.e., if you disconnect the JTAG programmer / debugger, the code stops / crashes.

Therefore it is completely to be expected that you end up with odd runtime behavior when calling any of the debug functions. To get around that, replace debug_printf() with a real printf() that works through one of the MSP430's serial ports.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: debug_printf() problem with rowley crossworks

Postby ankushdesai » Tue Aug 18, 2009 9:23 am

Hey Thanks a lot for your Reply
ankushdesai
 
Posts: 20
Joined: Mon Mar 09, 2009 11:00 pm
Location: Kanpur,UP,India


Return to TI's MSP430

Who is online

Users browsing this forum: No registered users and 3 guests

cron