Lab 3
18. Set breakpoints on both GPIO_setAs … functions, then Run and check values in
Registers window.
Since it’s difficult to step over _delay_cycles(), we’ll just run past them. Setting the
breakpoints on both lines where we change the GPIO pin value, we should see the LED
toggle each time you press run.
Set breakpoints as shown below:
Then click Run several times stopping at each breakpoint and keeping your eye on the LED.
Note: Following these debugging steps, we ended up finding the problem in our original
code. A cut and paste error left us with two lines of code in our loop that both turned
off the LED. Oops!
While basic debugging techniques, these steps are powerful tools for finding and
fixing errors in your code.
3 - 28 MSP430 Workshop - Using GPIO with MSP430ware