Hello!
I suppose you are using what they call MSP430Ware or something like that. I think if you really want
to understand MSP430, the best thing is to download the hardware files from the following page:
https://www.ti.com/tool/msp-exp430f5529lp
And then write your own code based on TI examples.
- Don't use the launchpad examples (MSP-EXP430F5529LP Software Examples, slac623e.zip). These
examples are based on a hardware abstraction layer. Before that, you should first understand what happens
under the abstraction layer.
- My advice: use the F55xx specific examples (without abstraction layer) that can be downloaded from TI.
The file name is SLAC300n.zip, n being the version code. Today, it's slac300h.zip.
I had a look at the hardware file. The user leds (look at sheet 2 of the schematics) are on port 4.7
and on port P1.0
If you want to blink the LEDs, you may try this one using code composer studio:
NB: I don't know which LED is green or red, so I will name them LED1 (for port 1) and LED4 (for port 4).
Code C - [expand] |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| #include "MSP430F5529.h"
#define LED1 0x01
#define LED4 0x80
void main(void) {
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog
P4DIR |= LED4; // LED4 bit in output
P4OUT = &= ~LED4; // LED4 bit at 0 -> LED4 off
P1DIR |= LED1; // LED1 bit in output
P1OUT $= ~LED1; // LED1 bit at 0 -> LED1 off
// Set the debugger breakpoint at next line
P1OUT |= LED1; // LED1 on
P1OUT &= ~LED1; // LED1 off
P4OUT |= LED4; // LED4 on
P4OUT &= ~LED4; // LED4 off
} |
That's about it!
Dora.
PS: the above code has been written in EDABoard editor. I wouldn't trust my memory that much,
so there might be a few errors, but the principle is here.