This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP-EXP430FR6989: Blinking LED's

Part Number: MSP-EXP430FR6989

I am having a little bit of trouble finishing this code, I need to make the LED's blink, not mattering  the order, I think I am messing up the configuration.

;-------------------------------------------------------------------------------
; MSP430 Assembler Code Template for use with TI Code Composer Studio
;
;
;-------------------------------------------------------------------------------
            .cdecls C,LIST,"msp430.h"       ; Include device header file
            
;-------------------------------------------------------------------------------
            .def    RESET                   ; Export program entry-point to
                                            ; make it known to linker.
;-------------------------------------------------------------------------------
            .text                           ; Assemble into program memory.
            .retain                         ; Override ELF conditional linking
                                            ; and retain current section.
            .retainrefs                     ; And retain any sections that have
                                            ; references to current section.

;-------------------------------------------------------------------------------
RESET       mov.w   #__STACK_END,SP         ; Initialize stackpointer
StopWDT     mov.w   #WDTPW|WDTHOLD,&WDTCTL  ; Stop watchdog timer


;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------

; Configure Timer B0 to throw interrupts
            bis.w    #TBCLR, &TB0CTL                
            bis.w    #TBSSEL__ACLK, &TB0CTL        
            bis.w    #MC__CONTINUOUS, &TB0CTL    
            bis.w    #CNTL__12, &TB0CTL            ; counter length = 12 bits
            bis.w    #ID__4, &TB0CTL                ; divide freq. by 4
            bis.w    #TBIE, &TB0CTL                 ; enable interrupts


            
            bis.b    #BIT1, &P1REN        ; enabling the resistor
            bis.b    #BIT1, &P1OUT        ; selecting pulling up resistor
            bis.b    #BIT1, &P1IES        ; falling edge trigger
            bis.b    #BIT1, &P1IE        ; interrupts enabled


            bis.b    #BIT2, &P1REN        ; enabling the resistor
            bis.b    #BIT2, &P1OUT        ; selecting pulling up
            bis.b    #BIT2, &P1IES        ; pull-up resistor
            bis.b    #BIT2, &P1IE        ; falling edge triggers interrupt
            
            
            
            
            ; Disable power lock to power GPIO
            bic.w    #LOCKLPM5, &PM5CTL0


            nop
            bis.w    #GIE|LPM3, SR
            nop


;-------------------------------------------------------------------------------
; Interrupt Service Routine
;-------------------------------------------------------------------------------
Timer_B0_ISR:

; Add your code here, do not forget to add the interrupt vector
        bic.b    #TBIFG, &TBCTL                    ;test and clear

        xor.b    BIT#0, &P1OUT                    ; toggle Green and red LED's
        xor.b    BIT#6, &P1OUT

        reti

;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
            .global __STACK_END
            .sect   .stack
            
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------

            .sect ".int37"
            .short Timer_B0_ISR

            .sect   ".reset"                ; MSP430 RESET Vector
            .short  RESET

**Attention** This is a public forum