- MSP432 Launchpad + Energia + TI-84 Plus Adventures
- 15 Aug 2015 11:14:25 am
- Last edited by KermMartian on 22 Aug 2015 01:46:02 pm; edited 2 times in total
I recently was fortunate enough to receive two MSP432 Launchpad development boards, and I've been hoping to use them for a few calculator-related projects. The most obvious task is to try using Energia, TI's Arduino IDE fork for their Launchpads, to port ArTICL programs to the MSP432. A slightly more complex goal that I've set myself is to try to control DCC-enabled model trains with the MSP432 and a graphing calculator. I'll be documenting my adventure in this topic.
First, here's what I've found so far in futile efforts to get a simple PWM interrupt working within an Energia sketch:
Timer_A "Documentation":
https://github.com/machinaut/msp432-driverlib/blob/master/driverlib/MSP432P4xx/timer_a.h
https://github.com/machinaut/msp432-driverlib/blob/master/driverlib/MSP432P4xx/timer_a.c
Information about AVR timers to compare:
http://maxembedded.com/2011/07/avr-timers-ctc-mode/
TI Forum help about MSP432 interrupts (doesn't work with Energia?):
https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/428511/1531341
Because it seems to be documented in shockingly few places, here's how you translate bank+pin-style pin names (ie, P1.0 or P2.4) to Energia numeric pin numbers (for example, the LED pin is not 2, as some documentation claims; it's 7
:
http://energia.nu/wordpress/wp-content/uploads/2015/03/MSP432-LaunchPad-%E2%80%94-Pins-Maps.jpg
Edit: I'm currently working on getting a simple ArTICL sketch working first, and not having much luck:
- Timeouts have been temporarily lengthened; because they're based on numbers of loop iterations, rather than the correct solution (using timers), they need to be longer on faster uCs.
- Sends appear to work properly.
- Gets do not work. Using the existing code largely yields no bits received at all. Switching to a scheme where pin reads involve a unanimous voting scheme over 16 samples helps a little, in that a single byte is received successfully, except that the byte received is a nonsensical (but consistent) value.
The current plan is to load a known-working ArTICL build onto an Arduino and try to get it to talk to ArTICL on the MSP432 to debug what the non-MSP432 endpoint is receiving (and sending).
First, here's what I've found so far in futile efforts to get a simple PWM interrupt working within an Energia sketch:
Timer_A "Documentation":
https://github.com/machinaut/msp432-driverlib/blob/master/driverlib/MSP432P4xx/timer_a.h
https://github.com/machinaut/msp432-driverlib/blob/master/driverlib/MSP432P4xx/timer_a.c
Information about AVR timers to compare:
http://maxembedded.com/2011/07/avr-timers-ctc-mode/
TI Forum help about MSP432 interrupts (doesn't work with Energia?):
https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/428511/1531341
Because it seems to be documented in shockingly few places, here's how you translate bank+pin-style pin names (ie, P1.0 or P2.4) to Energia numeric pin numbers (for example, the LED pin is not 2, as some documentation claims; it's 7

http://energia.nu/wordpress/wp-content/uploads/2015/03/MSP432-LaunchPad-%E2%80%94-Pins-Maps.jpg
Edit: I'm currently working on getting a simple ArTICL sketch working first, and not having much luck:
- Timeouts have been temporarily lengthened; because they're based on numbers of loop iterations, rather than the correct solution (using timers), they need to be longer on faster uCs.
- Sends appear to work properly.
- Gets do not work. Using the existing code largely yields no bits received at all. Switching to a scheme where pin reads involve a unanimous voting scheme over 16 samples helps a little, in that a single byte is received successfully, except that the byte received is a nonsensical (but consistent) value.
The current plan is to load a known-working ArTICL build onto an Arduino and try to get it to talk to ArTICL on the MSP432 to debug what the non-MSP432 endpoint is receiving (and sending).