Jump to content
43oh

Detecting msp430g2553 package (28/20 pins)


Recommended Posts

Not really, you can distinguish different types, but not different packages. Some documents even say that the very same die is used in the different packages.

If you really need to, you could upload a firmware that sets high (or low) a certain pin, which is only available on the larger of the packages. If you then probe that pin (from your programmer) you could determine whether that pin does or does not exist in the chip currently programmed. Then conditionally upload on or the other firmware.

Link to post
Share on other sites

You'll need to wire the pin to detect it. But you could wire it to (for example) the Rx pin on the debugger's UART, then you would be able to detect it when using a script. If the UART pin is space (1) the line will report it to be idle, when the line is mark (0) for at least 10 bit times the line will report frame error. So you could upload one firmware for a frame error, and the other for an idle line.

For such a script, use anything like, bash, power shell or python. This script will first upload the "set a pin" firmware, then read the Rx UART line and then flash a conditional firmware using the command line tools provided by TI.

Link to post
Share on other sites

Use bootstrapping. By that, I mean a single high value resistor tied to a spare pin, high or low. Any project where the 28 pin device is used, the resistor should tie the line high, your code reads it on boot, then ignores it the rest of the time it is running code. The 20 pin would have a resistor tied to ground. Or you could skip the resistor and tie the pins directly to vcc/gnd as long as you are sure you never set that pin as an output. (The resistors provide some level of idiot-proofing).

 

This works on spare gpio pins, and can even be used later as an output (with the resistor!), an led output (again with the resistor), or a button input (again, with the resistor). Of course, this is a hardware level runtime method of defining boot options, not a compile-time or programming level.

Link to post
Share on other sites

Find your Energia install and look for the "variants" directory. There is a pins_arduino.h or pins_energia.h file for each chip type I think.

 

edit: Hmm, there is just a "launchpad" variant and I don't think it specifically has 28-pin G2553 support.  On my Mac it's in /Applications/Energia.app/Contents/Resources/Java/hardware/msp430/variants/launchpad/pins_energia.h

Sent from my Galaxy Note II with Tapatalk 4
 

Link to post
Share on other sites

Pin assignment really is anything you want it to be. For my 28pin G2553 board, I kept the LaunchPad assignments and just added another set of pins for P3. I added some energia support here if you want to take a look:

 

https://github.com/analog10/Energia/blob/master/hardware/msp430/variants/dosocho/pins_energia.h

 

The board itself is here:

 

https://analog10.com/store/BOB-G2553-28.html

Link to post
Share on other sites
  • 2 years later...

But it does not solve completely the problem. I had this one porting F5510 which exist in different packages : some peripheral like USCI_B0 and A0 are simply not available in tiny package, but well define in the descriptor, so I had to trick Energia to get a compilation without error. More, I had to change SPI library to set up SPI on B1 and not B0.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...