I bought an MSP432 Launchpad from TI, and I'm surprised you can't search for "MSP432 Launchpad pin map" and get a table of the digital pins, their addresses, and their variable names in the standard library. There's a "blinking led" example that uses a variable P1OUT that apparently represents the onboard LED. I am trying to modify the example to use pin 6.0 instead, but I can't figure out what address or variable to write to. Is this something I should find on Google, or is there some kind of convention that I'm unaware of? Thanks in advance.

EDIT: to be clear, I was expecting to have a resource somewhere like the following:

p1.0   0x0000AEF9 P1_0  
p2.2   0x0000AEFA P2_2  
p2.3   0x0000AEFB P2_3  
... etc

The TI MSP432 Launchpad uses the MSP432P401R and if you want to develop anything using it, you're going to want to reference the device specific data sheet and the device family data sheet. The data are not the easiest thing to read at first, but has all the information you need on this mirco.

What you are looking for is the register that controls P6.0. You can find this register on page 500 of the device family data sheet where it talks about the PxOUT Register and the PxDIR Register where x represents the port which in this case is port 6. You'll end up using the following lines to control that pin:

P6DIR =    0x01;  //sets P6.0 to output
P6OUT |=   0x01; //sets P6.0 to GPIO high
P6OUT &= ~(0x01); //sets P6.0 to GPIO low

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.