Sign in to follow this  
Followers 0
Peabody

Use tiny, cheap USB-to-serial board vs Launchpad for flashing?

5 posts in this topic

I'm new here, so hello everyone.  I'm participating with a number of other people in a project that uses the G2231, and it's necessary to flash new firmware periodically.  So, everybody had to buy a Launchpad.  But last week I built a cheap oscilloscope kit that uses an STM microcontroller, and was reminded that for such controllers the only hardware you need to flash firmware is one of those little USB-to-UART boards that use the CP2102 chip or something similar.  The one I ordered for my scope kit is 3/4 inch by 5/8 inch, comes with the right-angle male header, and the whole thing, micro-USB connector and all, cost $1.62 delivered from China.

 

For future versions of the current project, and for just in general, I'd like to find a way to incorporate one of those interface boards into the project itself instead of every participant having to buy a Launchpad.  So the user would just connect the device directly to his computer via USB, and flash new firmware.  This would be used only for flashing, not debugging or anything else.

 

I've read through all the relevant threads in this section, and while there was one early thread talking about doing exactly what I want to do, I didn't find any reports of anyone actually doing it successfully.  So I'd like to find out whether it's even possible, and if so, what it would take to implement.

 

So first off, while the G2553 datasheet discusses the BSL, the G2231 datasheet does not.  So I'm assuming it doesn't have BSL.  That would mean only 2-wire JTAG could be used to flash the G2231, which I just assume is completely incompatible with regular serial.  I had hoped it would be possible to use the TI command line flasher, but with the CP2102 USB driver, to flash, but that doesn't look feasible.  (Although - the interface board I ordered does also have a DTR output that perhaps could be manipulated to provide a clock.)  Anyway, while I would much prefer to find something that works with the 2231, it would certainly be feasible to switch to the 2553 if BSL is the only way to make this work.

 

I should also say that if new Windows software is required in place of the command line flasher, that would not be an insurmountable obstacle.

 

I'm not a trained EE, really just a hobbyist.  I program the MSP430s in assembler using Mike Kohn's Naken Assembler, and flash with the command line flasher.  So all pretty much basic entry-level stuff.  But I assume there are lots of real experts here, and would appreciate hearing any thoughts anyone has about how this idea might be implemented.  I think it would be a very neat thing to have available for everyone.

 

Thanks very much.

 

Share this post


Link to post
Share on other sites

I already answered you on e2e topic... https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/577077

 

Lowest cost solution is BSL. Just take care that BSL password is equal to vector table. With wrong password device will lost calibration constants stored inside info A segment. If I remember right, new devices (for example G2553) are with some options regarding this, that are explained in device datasheet.

Share this post


Link to post
Share on other sites

What is your application for your msp430g2231 that is so well suited to writing in msp430 assembler and using a 2k flash chip with 128 bytes of ram?

Share this post


Link to post
Share on other sites

I already answered you on e2e topic... https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/577077

 

Lowest cost solution is BSL. Just take care that BSL password is equal to vector table. With wrong password device will lost calibration constants stored inside info A segment. If I remember right, new devices (for example G2553) are with some options regarding this, that are explained in device datasheet.

 

Yes, thanks very much.  As I replied to you there, it appears from one of the links you provided that there already exists software that can be used to flash firmware using a USB-to-UART board like the one I have.  It appears to be called MSPFET.EXE, but so far I haven't found a good link to it.  Still working on that.

 

It appears it would be necessary to change to a 2553 though since the 2231 has no BSL.  But that's ok.

Share this post


Link to post
Share on other sites

What is your application for your msp430g2231 that is so well suited to writing in msp430 assembler and using a 2k flash chip with 128 bytes of ram?

 

Hmmm.  Your reply seemed much longer when I first read it.

 

I'm just a participant in the project.  It was designed and built by someone else.   But despite its shortcomings, the 2231 is more than adequate for what needs to be done.  It is also extremely low power.  I can't really go into the details of the project because it's not mine.

 

As for writing in assembler, the project builder made that choice, but that was fine with me because I never really got comfortable with C, and was already very familiar with assembler for 6502, x86, and even a little ARM.  So instead of hundred of megabytes of CCS or IAR, I just use the Naken assembler, which is very small, and compiles instantaneously.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0