A basic guide to start with the MSP320 family and the GCC tools on Linux.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
441 B

1 year ago
  1. #include <msp430fr6989.h>
  2. void main(void)
  3. {
  4. WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
  5. PM5CTL0 = 0x0000; // disable high impedance mode
  6. P1DIR = 0x01; //set up bit 0 of P1 as output
  7. P1OUT = 0x00; //initialize bit 0 of P1 to 0
  8. for(;;){ //loop
  9. volatile unsigned int i;
  10. P1OUT ^= 0x01; //toggle bit 0 of P1
  11. //Delay
  12. for(i=40000; i>0;){
  13. i--;
  14. __no_operation();
  15. }
  16. }
  17. }