0

As the title says its not giving me any errors when i build and run in code composer, but nothing happens on the baord. It even says the normal : "MSP430: Flash/FRAM usage is 84 bytes. RAM usage is 80 bytes." The code is below, should just light up leds in pattern. Straight from textbook, tried other code also.

#include <msp430.h> 

void main (void) 
{ 

   WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
   P2DIR = 0x18; // Set pins with LEDs to output, 0b00011000
   P2OUT = 0x08; // LED2 (P2.4) on, LED1 (P2.3) off (active low!)

   for (;;) { }

}

`

Peter Paul Kiefer
  • 2,114
  • 1
  • 11
  • 16
Destreation
  • 105
  • 1
  • 2
  • 12
  • You did not tell use which chip and board you are using. – CL. May 31 '17 at 20:04
  • I did, sorry added the header to my post. – Destreation May 31 '17 at 20:31
  • There are hundreds of chip with the prefix "MSP430". – CL. May 31 '17 at 21:28
  • I also tried #include which is my chip – Destreation May 31 '17 at 21:31
  • You still did not tell us which board you are using. – CL. May 31 '17 at 21:37
  • the board is the msp430g2, the chip is the G2553 – Destreation May 31 '17 at 21:57
  • It's hard to answer this without knowing how you're programming the board, which version of CCS you're using, if it's a custom board or one of TI's launchpads, etc etc. If this is for a course, talk to a TA. I used to be a TA for a similar course, and they'll know all the quirks and troubles that students have. – mgarey Jun 01 '17 at 02:12
  • I think the leds are on P1.0 and P1.6. you are on the right track but maybe have the wrong pins. What if you use a voltmeter to check the pins you selected to see if they change? stopping the wdt setting the pins to output and then setting their output state is the minimum you need to do and that is what you are doing... – old_timer Jun 01 '17 at 04:16
  • What textbook did you get this code from? – CL. Jun 01 '17 at 07:42

1 Answers1

0

The compiler tells you how many bytes you code needs from the Flash and RAM Memory. But this output does not mean that, those byte have also been transfered to the chip.

So perhaps the easy answer is: After compiling the code you have to start the debugger which automatically transfers the programm to the chip's flash memory and starts it.

If you had done this already then, it could be possible that:

  • you have not chosen the right serial port (virtual USB to Serial?)
  • your driver (flash programmer over usb) is corrupt (Windows ?)
  • your MSP430 is RIP
  • if you use a lauchpad:
    • your lauchpad is damaged (especially the USB programmer part)
    • you removed the jumper that connect the USB Programmer with the chip' UART programming pins.
Peter Paul Kiefer
  • 2,114
  • 1
  • 11
  • 16