dev.nlited.com

>>

Pin Assignments

<<<< prev
next >>>>

2014-09-02 04:03:13 chip Page 1109 📢 PUBLIC

Now I hit my second major design decision: Assigning MSP430 pins to functions. The first step is to make a list of the JumpMtr functions I need. The MSP430 column is filled in later.

Existing Jumppad functions:

JumpPadMSP430
S1P2.1
S2P1.1
LED1 REDP1.0
LED2 GRNP4.7

New motor functions:

JumpMtrMSP430Remarks
1MTR_/RESETP4.3Resets all drivers
2MTR_ESTOPP7.4Stops all drivers
3MTR_MS1P8.1Driver step mode1, all axes
4MTR_MS2P8.2Driver step mode2, all axes
5MTR_DIR_XP1.6Driver1 direction
6MTR_STEP_XP1.4Driver1 step
7MTR_DIR_YP3.7Driver2 direction
8MTR_STEP_YP1.5Driver2 step
9MTR_DIR_ZP4.0Driver3 direction
10MTR_STEP_ZP2.4Driver3 step

The second step is to make a list of the available pins and fill in any pre-assigned functions. I only need to worry about pins that are included in the expansion headers. This is the pinout for the expansion header as viewed from the bottom, counter-clockwise from the upper left:

LEFT

LaunchPad PinMSP430JumpMtr
L01GNDGND
L02P2.0
L03P2.2
L04P7.4MTR_ESTOP
L05RST
L06P3.0
L07P3.1
L08P2.6
L09P2.3
L10P8.1MTR_MS1
LaunchPad PinMSP430JumpMtr
L20P2.5
L19P2.4MTR_STEP_Z
L18P1.5MTR_STEP_Y
L17P1.4MTR_STEP_X
L16P1.3
L15P1.2
L14P4.3MTR_/RESET
L13P4.0MTR_DIR_Z
L12P3.7MTR_DIR_Y
L11P8.2MTR_MS2

RIGHT

LaunchPad PinMSP430JumpMtr
R015V5V
R02GNDGND
R03P6.0STALL_X
R04P6.1STALL_Y
R05P6.2STALL_Z
R06P6.3
R07P6.4
R08P7.0
R09P3.6
R10P3.5
LaunchPad PinMSP430JumpMtr
R203V33V3
R19P6.5
R18P3.4
R17P3.3
R16P1.6MTR_DIR_X
R15P6.6
R14P3.2
R13P2.7
R12P4.2
R11P4.1

The pinout for the MSP430 package is useful for looking up the MSP430 pin numbers.

MSP430F5529 LQFP pinout

This figure is useful for determining which functions are available on the expansion headers. It also lists the "standard" usage for BoosterPacks. It is good to adhere to the standard uses when possible, this allows boards to be stacked.

MSP430F5529 BoosterPack pinout

I need to look up all the pins on the MSP430F5529 to fill out the table, which will also be used later to create the MSP430F5529 component. This table includes the pin name (primary function), MSP430 package pin number, function list, standard BoosterPack usage, and a (initially) blank column for the JumpMtr usage.

NamePinMSP430StdJumpMtrRemarks
RST76!RST/NMI/SBWTDIO
P1.223P1.2/TA0.0Timer Capture
P1.324P1.3/TA0.2Timer Capture
P1.425P1.4/TA0.3PWM outMTR_STEP_X
P1.526P1.5/TA0.4PWM outMTR_STEP_Y
P1.627P1.6/TA1CLK/CBOUTGPIOMTR_DIR_X
P2.029P2.0/TA1.1PWM out
P2.231P2.2/TA2CLK/SMCLKSPICS (wireless)
P2.332P2.3/TA2.0SPICS (other)
P2.433P2.4/TA2.1PWM outMTR_STEP_Z
P2.534P2.5/TA2.2PWM out
P2.635P2.6/RTCCLK/DMAE0SPICS (display)
P2.736P2.7/UCB0STE/UCA0CLKGPIO
P3.037P3.0/UCB0SIMO/UCB0SDASPIMOSI
P3.138P3.1/UCB0SOMI/UCB0SCLSPIMISO
P3.239P3.2/UCB0CLK/UCA0STESPICLK
P3.340P3.3/UCA0TXD/UCA0SIMOUART/TX
P3.441P3.4/UCA0RXD/UCA0SOMIUART/RX
P3.542P3.5/TB0.5RESERVED
P3.643P3.6/TB0.6RESERVED
P3.744P3.7/TB0OUTH/SVMOUTGPIOMTR_DIR_Y
P4.045P4.0/PM_UCB1STE/PM_UCA1CLKGPIOMTR_DIR_Z
P4.146P4.1/PM_UCB1SIMO/PM_UCB1SDAI2CSDA
P4.247P4.2/PM_UCB1SOMI/PM_UCB1SCLI2CSCL
P4.348P4.3/PM_UCB1CLK/PM_UCA1STEGPIOMTR_/RESET
P6.077P6.0/CB0/A0Analog InRESERVED: STALL_X
P6.178P6.1/CB1/A1Analog InRESERVED: STALL_Y
P6.279P6.2/CB2/A2Analog InRESERVED: STALL_Z
P6.380P6.3/CB3/A3Analog InRESERVED
P6.401P6.4/CB4/A4Analog InRESERVED
P6.502P6.5/CB5/A5Analog In
P6.603P6.6/CB6/A6Analog In
P7.005P7.0/CB8/A12Analog In
P7.457P7.4/TB0.2GPIOMTR_ESTOP
P8.116P8.1GPIOMTR_MS1
P8.217P8.2GPIOMTR_MS2

I want to use PWM outputs to drive the steps, so I will assign P1.4/TA0.3 to MTR_STEP_X, P1.5/TA0.4 to MTR_STEP_Y, and P2.4/TA2.1 to MTR_STEP_Z.

I want to keep the analog inputs available for future use, so pins P6.0-6 and P7.0 are reserved. The next revision will use the analog inputs to monitor current draw through the motors to detect stalls.

I need 2 GPIO outputs on the same port for MTR_MS1 and MTR_MS2; P8.1-2 are the only GPIO pins that are together.

Now I just fill in the GPIO pins with MTR_DIR_X/Y/Z, MTR_/RESET, and MTR_ESTOP: P1.6, P3.7, P4.0, P4.3, and P7.4

I fill these assignments into both tables, as they are both useful. Double and triple-check, and the pin assignment is done.

Wow! That was a lot of work! Assigning the pins while constantly updating the pages and tables has taken about five hours. I will finish the ExpHdr page of the schematic and stop. I have a lot of work to do for my day job tomorrow.

The schematic was easier than expected, I was able to finish the first draft of the entire board in just another 30 minutes. The schematic is quite simple, just the expansion headers, three indicator leds, and three instances of the A3967SLB circuit.



WebV7 (C)2018 nlited | Rendered by tikope in 94.153ms | 3.135.204.43