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.
Tool/software: Code Composer Studio
Hello, i have two led connected on PORT U pin of Msp430f5359, to turn them on I wrote the attached code.
#include <msp430.h> int main(void) { WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer LDOKEYPID = 0x9628; //LDOKEYPID is unlocked. PUCTL |= PUOPE; //PU output enable PUCTL |= PUOUT1 | PUOUT0; //Turn on the LED at PIN PU.0 and PU.1. }
what should have I done wrong?
Hey Kary,
Unfortunantly, I was unable to find a code example showing PU used as GPIOs. I think your very first peice of code is the closest.
As Mike pointed out, the PUSEL bit is in the same USBPHYCTL register as the rest of the bits you are working with:
PUSEL should start cleared, as long as you don't set it through USB initialization.
As Mike pointed out above in the E2E thread he linked, The issue is probably how you are supplying power to Port U.
Are you wanting to use the LDO or supply power externally?
Thanks,
JD
**Attention** This is a public forum