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.

MSP430 GPIO using Grace doesn't seem to work

This is probably a very simple problem but I am a new user of the MSP430 architecture and don't understand it very well yet.  

I am using the MSP430 launchpad and CCS to develop code.  I wrote this very simple while loop in main() that monitors the P1.3 switch.  It turns on the P1.6 (green) LED if the switch is not pressed and turns on the P1.0 (red) LED if it is pressed.  That works fine.  

I need a timer so I used Grace to configure an interval timer and set up an interrupt so I can do things via the ISR every 10 mS.  After I set that up and compile my simple while loop in main() doesn't work anymore.  

Is Grace setting up the GPIO in such a way that my code doesn't work?  

Thanks in advance for any help.  

  • Harold Nolte said:
    Is Grace setting up the GPIO in such a way that my code doesn't work?  

    Possible. If may be that you need to configure the port pins in GRACE so the GRACE init won't undo your port configuration.

    In general, you should either use GRACE to initialize and configure everything, or nothing.

  • Actually, if you do the initialization after the GraceInit() function, you should be fine. Anything you do after this function call will overwrite any Grace configuration.

    It's therefore perfectly fine to do parts of the intialization manually. As a visual indication, the Grace overview screen has green checkmarks that indicate which peripherals have been "touched" by Grace. The IOs e.g. are always configured. Per default, the reset values are being written into the registers. I suspect the problem lies somewhere else, though.

    Kind regards,
    Michael 

**Attention** This is a public forum