ti's MSP430 - Unable to run code

Status
Not open for further replies.

reddvoid

Junior Member level 3
Joined
Apr 8, 2013
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,587
Hi,
I just bought ti's MSP430 Launch pad and was trying to run a simple blinkLed program
I am able to upload program to MSP430 but after uploading Its not running
The chip is : MSP430G2231
IDE is : IAR
These are the precise steps I am using
Open IAR Embedded workbench
file -->nwe--> workspace
project-->create newproject
Tool chain=MSP430 ; Prject Templates c :main
SaveProject as : BlinkLed.ewp
[ type C program ]
file -->save workspace --> save as : BlinkLed.eww

Project -->options -->General options -->target =MSP430G2231
Debugger -->FET Debugger

Project---> Compile (showing 0 errors 0 warnings )
Project-->make
project --> Download and debug



debug --->go
after this the board is showing no response no matter what program i use it still not responding. . . .
Need some help here
 

Hello!

As you don't show the whole code (i.e. I don't know how the delay is written), it's very difficult
to conclude. Can you run step by step?
I think there is a jumper for the launchpad led. Is it set properly?

Dora.
 

Hello,
1. Have you tried resetting the launchpad after burning the program by Removing the Data cable and switching on your launchpad again.
2. Do post your code here!!!
3. Try code composer studio (TI CCS), it worked for me.
4. Connect led Jumpers and keep the default jumper settings.

Good Luck
 

Hello!

As you don't show the whole code (i.e. I don't know how the delay is written), it's very difficult
to conclude. Can you run step by step?
I think there is a jumper for the launchpad led. Is it set properly?

Dora.

this is the code I am using

#include <msp430.h>
#define P0 BIT0 // Red LED

void Delay_ms(unsigned int ms);
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Set WDT to stop
P1DIR |= 0x01; // Set direction of the LED

while(1){
P1OUT ^= P0; // Toggle P1
Delay_ms(500); // Delay for 500 milliseconds
}
}


void Delay_ms(unsigned int ms)
{
while(ms--)
{
__delay_cycles(1000);
}
}



*I see 7 jumpers on board
like here ----> http://www.ericmacneil.com/wp-content/uploads/2010/09/2010-09-28-22.56.00.jpg
I have not removed any jumper
* It showing no activity when I run step by step

- - - Updated - - -

Hello,

4. Connect led Jumpers and keep the default jumper settings.

Good Luck

*I tried resetting after burning by removing and reconnecting , still not working
*I will try using ccs (yet to download) if not able to solve this problem

*Should I remove any jumpers, I've kept all jumpers on like in here ----> http://www.ericmacneil.com/wp-content/uploads/2010/09/2010-09-28-22.56.00.jpg

- - - Updated - - -

- - - Updated - - -

In the picture I've uploaded in the first post
4th and 5th lines in the log says

Insufficient resource
Warning:failed to use emulated breakpoints

Is this a problem ?
 

Hello!

Just for your info:
I made a project and ran your code without any modification. It does
what it's supposed to do, so the problem is somewhere else.
Your jumpers seem to be fine.
Although you said you configured it, can you verify that the config of your
debugger is FET Debugger and not simulator?
Can you verify that the driver of the FET debugger is properly installed
(go to control panels and verify in hardware management. It should appear
in the devices as "MSP430 application UART" under "ports and LPT".

Dora.
 


*Yes, I've set config. of debugger to FET Debugger from simulator
*Yes, the port is properly installed, I checked in device manager "MSP430 application UART (COM63)"

After uploading if i try to debug its showing this error

I am using MSP430G2231 and I set the same in Project--> options-->GeneralOptions--->Target--->Device--->=MSP430G2231
 

Hello!

One problem that may arise is that the com port number is high.
Some drivers cannot handle high port numbers. Note that I'm not saying TI drivers
don't but that's a possibility.
Try to install to a lower port (COM3, COM4 ... under 10 so that its a single number).
Well, I am aware that if this was the case, you shouldn't be able to load the program,
but that's worth trying.

Dora.
 

Greetings,
I tried your program on ccs and it ran Fine. So there is no problem in your code.
As Doraemon said Dont use serial port number above 10 or 20.
Try re-installing your IAR or Launcpad drivers.

Good Luck
 

I tried lower COM port
then I ran a code to blink LED P1.0 but the LED on board was not blinking, I tried Directly connecting +ve end of spare LED to pin P1.0 and it is blinking as programmed
but on board LED is not working; same thing happening for on board LED P1.6
Is there any extra setting to Enable/disable these on board LEDs? or these LEDs damaged ?
(the board is brand New)
 

Are the jumpers which is above the on board led connected?
Jumpers have to be in place to connect p1.0 to led. Incase jumper is connected check whether led is working.

To check whether led is working take a multimeter keep it continuity mode and place it across the led. Check whether it is blinking?
 

Greetings,
If Your spare led is glowing on direct connection this means only two things
1. Your program is working.
2. your Led is faulty or you are connecting jumpers wrong way.

Check jumpers they must be connected as in image :-
**broken link removed**

Try Green Led too:
Code:
#include <msp430.h>
#define P0 BIT0 // Red LED

[COLOR=#00ff00]#define P6 BIT6[/COLOR]

void Delay_ms(unsigned int ms);
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Set WDT to stop
[COLOR=#4B0082]P1DIR |= 0x41; [/COLOR]// Set direction of the LED

while(1){
[COLOR=#FF0000]P1OUT ^= P0|P6; [/COLOR]// Toggle P1
Delay_ms(500); // Delay for 500 milliseconds
}
}


void Delay_ms(unsigned int ms)
{
while(ms--)
{
__delay_cycles(1000);
}
}

On the second thought, after reading your last comment again I seriously doubt that you have connected your jumpers wrong way.
1. Remove both the led jumpers
2. Take a spare wire, tie its one end to the P1.0(LED1) pin and the other in between the two resistors and touch it to one of the resistor soldered side.
3. If it still does not glows then touch wire directly to the led1 / led2(in this case touch wire to the left of the led i.e. not in between leds) (Do not make contact for long time as it may get burn).
Bad Luck Case Scenario- If this works Your resistor are faulty(Bad Luck :arrow and if it doesn't (Bad Luck again :evil Time to change Led's.
P.S. - Try connecting wire to the bottom pin of your LED jumper. If this works your jumper is faulty.

Good Luck ;-)
 

1) Go to Porject-> options, (or Right click your Porject name which would be displayed on left corner of your screen). A menu box will apper. In General option, Make sure you have selected your microcontroller as MSP430G2553.
2) Like wise, click Debugger option and make sure u have selected "FET DEBUGGER"(By default, a new project will set this option as SIMULATOR. So, even if you make and run your program, it will just simulate rather than working)
3) Now, select FET Debugger and make sure you have selected "USBIF".

Try running your program after doing all these three steps.
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…