EmbeddedRelated.com
Forums

DIY flash programmer

Started by couldabin2706 September 7, 2008
I'm trying out a crude DIY flash programming tool, without much
success, and I'm wondering if anyone else has tried this.

I have the USB stick development tool (ez430-F2013), which of course
comes with a target board. The target board connects to the USB stick
via four pins, which are connected to pins 1,10,11 and 14 on the MCU.

What I thought I could do is make a cable that plugs into the USB
stick on one end and connects on the other to the appropriate pins on
an unprogrammed MCU (14PDIP_N package). Then I'd load the program onto
the MCU from inside the development environment (IAR's Kickstart).
That actually seems to work -- I get no error messages. But when I
then try to use the MCU, it seems dead.

Has anyone tried this? Can it work? Would I be better off just
spending the $150 for the real deal from TI?

TIA.

duane

Beginning Microcontrollers with the MSP430

The part of eZ430 with the USB connector is a flash programming tool.
The reason that the MCU you programmed "did not work" is caused by
some other reason. I bet that if you use other programming tool to do
the programming, it would not work either.

As far as I know, there are only two limitations of using eZ430 as a
programming tool. One is, it cannot blow the programming fuse. The
other is, it uses SBW instead of the so called 4-wire JTAG. Thus it
can only be used on the new F5xx and some of the F2xx. It cannot be
used for the older F1xx, F3xx. F4xx and some other the F2xx.
--- In m..., "couldabin2706" wrote:
>
> I'm trying out a crude DIY flash programming tool, without much
> success, and I'm wondering if anyone else has tried this.
>
> I have the USB stick development tool (ez430-F2013), which of course
> comes with a target board. The target board connects to the USB stick
> via four pins, which are connected to pins 1,10,11 and 14 on the MCU.
>
> What I thought I could do is make a cable that plugs into the USB
> stick on one end and connects on the other to the appropriate pins on
> an unprogrammed MCU (14PDIP_N package). Then I'd load the program onto
> the MCU from inside the development environment (IAR's Kickstart).
> That actually seems to work -- I get no error messages. But when I
> then try to use the MCU, it seems dead.
>
> Has anyone tried this? Can it work? Would I be better off just
> spending the $150 for the real deal from TI?
>
> TIA.
>
> duane
>

I assumed the target board contains only the MSP430F2012 chip (plus an
LED), and perhaps a couple capacitors or resistors. At any rate, how
would the USB stick (the flash programming portion) "know" whether a
bona fide target board was attached, or a native MCU? It doesn't
appear to, since the development software erases the memory and loads
the program without complaint when the native MCU is attached.

Am I missing something here?

--- In m..., "old_cow_yellow"
wrote:
>
> The part of eZ430 with the USB connector is a flash programming
tool.
> The reason that the MCU you programmed "did not work" is caused by
> some other reason. I bet that if you use other programming tool to
do
> the programming, it would not work either.
>
> As far as I know, there are only two limitations of using eZ430 as a
> programming tool. One is, it cannot blow the programming fuse. The
> other is, it uses SBW instead of the so called 4-wire JTAG. Thus it
> can only be used on the new F5xx and some of the F2xx. It cannot be
> used for the older F1xx, F3xx. F4xx and some other the F2xx.
> --- In m..., "couldabin2706"
wrote:
> >
> > I'm trying out a crude DIY flash programming tool, without much
> > success, and I'm wondering if anyone else has tried this.
> >
> > I have the USB stick development tool (ez430-F2013), which of
course
> > comes with a target board. The target board connects to the USB
stick
> > via four pins, which are connected to pins 1,10,11 and 14 on the
MCU.
> >
> > What I thought I could do is make a cable that plugs into the USB
> > stick on one end and connects on the other to the appropriate pins
on
> > an unprogrammed MCU (14PDIP_N package). Then I'd load the program
onto
> > the MCU from inside the development environment (IAR's Kickstart).
> > That actually seems to work -- I get no error messages. But when I
> > then try to use the MCU, it seems dead.
> >
> > Has anyone tried this? Can it work? Would I be better off just
> > spending the $150 for the real deal from TI?
> >
> > TIA.
> >
> > duane
>

Hello,
I have been thinking of doing something similar with my ez430
RF2500 tool. However, I could not get an exhaustive list of all the muCs
that support SBW even after hunting inside the ti site. Can anyone provide
links or tell which all MSPs are SBW capable. Theoretically, all such muCs
should be programmable by the RF tool right?

On Mon, Sep 8, 2008 at 6:26 AM, couldabin2706 wrote:

> I assumed the target board contains only the MSP430F2012 chip (plus an
> LED), and perhaps a couple capacitors or resistors. At any rate, how
> would the USB stick (the flash programming portion) "know" whether a
> bona fide target board was attached, or a native MCU? It doesn't
> appear to, since the development software erases the memory and loads
> the program without complaint when the native MCU is attached.
>
> Am I missing something here?
>
> --- In m... , "old_cow_yellow"
>
> wrote:
>
> >
> > The part of eZ430 with the USB connector is a flash programming
> tool.
> > The reason that the MCU you programmed "did not work" is caused by
> > some other reason. I bet that if you use other programming tool to
> do
> > the programming, it would not work either.
> >
> > As far as I know, there are only two limitations of using eZ430 as a
> > programming tool. One is, it cannot blow the programming fuse. The
> > other is, it uses SBW instead of the so called 4-wire JTAG. Thus it
> > can only be used on the new F5xx and some of the F2xx. It cannot be
> > used for the older F1xx, F3xx. F4xx and some other the F2xx.
> >
> >
> > --- In m... ,
> "couldabin2706"
> wrote:
> > >
> > > I'm trying out a crude DIY flash programming tool, without much
> > > success, and I'm wondering if anyone else has tried this.
> > >
> > > I have the USB stick development tool (ez430-F2013), which of
> course
> > > comes with a target board. The target board connects to the USB
> stick
> > > via four pins, which are connected to pins 1,10,11 and 14 on the
> MCU.
> > >
> > > What I thought I could do is make a cable that plugs into the USB
> > > stick on one end and connects on the other to the appropriate pins
> on
> > > an unprogrammed MCU (14PDIP_N package). Then I'd load the program
> onto
> > > the MCU from inside the development environment (IAR's Kickstart).
> > > That actually seems to work -- I get no error messages. But when I
> > > then try to use the MCU, it seems dead.
> > >
> > > Has anyone tried this? Can it work? Would I be better off just
> > > spending the $150 for the real deal from TI?
> > >
> > > TIA.
> > >
> > > duane
> > >
> >
>

--
Pratik Chaudhari

Sounds like you connected a 14-pin F20xx chip to the 4-pin connector
of the eZ430U Tool correctly and use IAR KickStart to erase and write
something into that F20xx chip.

KickStart did not complain because it did find a chip (F20xx) that it
is capable of handling. It did erase and write the Flash without any
problem.

However, this does not mean that F20xx can run the code (in its
Flash). For example, the code may be buggy. Even if the code is good,
the F20xx need a pull-up resister at pin #10 and a good power source
and a bypass capacitor across pin #1 and pin #14 to work. Did you meet
those requirements?

The eZ430 target board is like what you described. There is nothing
special about the F2013 chip used there. Any other F20xx chip will
work just the same.

You need a 10K to 47K pull-up for pin #10. You should not pull-down
pin #11. Your power supply should be about 3V. It must not have
excessive noise. Its rise-time must be not excessively slow.

--- In m..., "couldabin2706" wrote:
>
> I assumed the target board contains only the MSP430F2012 chip (plus an
> LED), and perhaps a couple capacitors or resistors. At any rate, how
> would the USB stick (the flash programming portion) "know" whether a
> bona fide target board was attached, or a native MCU? It doesn't
> appear to, since the development software erases the memory and loads
> the program without complaint when the native MCU is attached.
>
> Am I missing something here?
> --- In m..., "old_cow_yellow"
> wrote:
> >
> > The part of eZ430 with the USB connector is a flash programming
> tool.
> > The reason that the MCU you programmed "did not work" is caused by
> > some other reason. I bet that if you use other programming tool to
> do
> > the programming, it would not work either.
> >
> > As far as I know, there are only two limitations of using eZ430 as a
> > programming tool. One is, it cannot blow the programming fuse. The
> > other is, it uses SBW instead of the so called 4-wire JTAG. Thus it
> > can only be used on the new F5xx and some of the F2xx. It cannot be
> > used for the older F1xx, F3xx. F4xx and some other the F2xx.
> >
> >
> > --- In m..., "couldabin2706"
> wrote:
> > >
> > > I'm trying out a crude DIY flash programming tool, without much
> > > success, and I'm wondering if anyone else has tried this.
> > >
> > > I have the USB stick development tool (ez430-F2013), which of
> course
> > > comes with a target board. The target board connects to the USB
> stick
> > > via four pins, which are connected to pins 1,10,11 and 14 on the
> MCU.
> > >
> > > What I thought I could do is make a cable that plugs into the USB
> > > stick on one end and connects on the other to the appropriate pins
> on
> > > an unprogrammed MCU (14PDIP_N package). Then I'd load the program
> onto
> > > the MCU from inside the development environment (IAR's Kickstart).
> > > That actually seems to work -- I get no error messages. But when I
> > > then try to use the MCU, it seems dead.
> > >
> > > Has anyone tried this? Can it work? Would I be better off just
> > > spending the $150 for the real deal from TI?
> > >
> > > TIA.
> > >
> > > duane
> > >
>
Thanks for this. No, I have no resistor or capacitors in the cable.
It's direct. I'm curious, though -- I haven't tried debugging the
native MCU when it's connected (the only thing I did while it was
connected was erase it and load the code). Does the debugger use the
code actually on the chip?
--- In m..., "old_cow_yellow"
wrote:
>
> Sounds like you connected a 14-pin F20xx chip to the 4-pin connector
> of the eZ430U Tool correctly and use IAR KickStart to erase and
write
> something into that F20xx chip.
>
> KickStart did not complain because it did find a chip (F20xx) that
it
> is capable of handling. It did erase and write the Flash without any
> problem.
>
> However, this does not mean that F20xx can run the code (in its
> Flash). For example, the code may be buggy. Even if the code is
good,
> the F20xx need a pull-up resister at pin #10 and a good power source
> and a bypass capacitor across pin #1 and pin #14 to work. Did you
meet
> those requirements?
>
> The eZ430 target board is like what you described. There is nothing
> special about the F2013 chip used there. Any other F20xx chip will
> work just the same.
>
> You need a 10K to 47K pull-up for pin #10. You should not pull-down
> pin #11. Your power supply should be about 3V. It must not have
> excessive noise. Its rise-time must be not excessively slow.
>
> --- In m..., "couldabin2706"
wrote:
> >
> > I assumed the target board contains only the MSP430F2012 chip
(plus an
> > LED), and perhaps a couple capacitors or resistors. At any rate,
how
> > would the USB stick (the flash programming portion) "know" whether
a
> > bona fide target board was attached, or a native MCU? It doesn't
> > appear to, since the development software erases the memory and
loads
> > the program without complaint when the native MCU is attached.
> >
> > Am I missing something here?
> >
> >
> >
> >
> > --- In m..., "old_cow_yellow"
> > wrote:
> > >
> > > The part of eZ430 with the USB connector is a flash programming
> > tool.
> > > The reason that the MCU you programmed "did not work" is caused
by
> > > some other reason. I bet that if you use other programming tool
to
> > do
> > > the programming, it would not work either.
> > >
> > > As far as I know, there are only two limitations of using eZ430
as a
> > > programming tool. One is, it cannot blow the programming fuse.
The
> > > other is, it uses SBW instead of the so called 4-wire JTAG. Thus
it
> > > can only be used on the new F5xx and some of the F2xx. It cannot
be
> > > used for the older F1xx, F3xx. F4xx and some other the F2xx.
> > >
> > >
> > > --- In m..., "couldabin2706"
> > wrote:
> > > >
> > > > I'm trying out a crude DIY flash programming tool, without
much
> > > > success, and I'm wondering if anyone else has tried this.
> > > >
> > > > I have the USB stick development tool (ez430-F2013), which of
> > course
> > > > comes with a target board. The target board connects to the
USB
> > stick
> > > > via four pins, which are connected to pins 1,10,11 and 14 on
the
> > MCU.
> > > >
> > > > What I thought I could do is make a cable that plugs into the
USB
> > > > stick on one end and connects on the other to the appropriate
pins
> > on
> > > > an unprogrammed MCU (14PDIP_N package). Then I'd load the
program
> > onto
> > > > the MCU from inside the development environment (IAR's
Kickstart).
> > > > That actually seems to work -- I get no error messages. But
when I
> > > > then try to use the MCU, it seems dead.
> > > >
> > > > Has anyone tried this? Can it work? Would I be better off just
> > > > spending the $150 for the real deal from TI?
> > > >
> > > > TIA.
> > > >
> > > > duane
> > > >
> > >
>

I've been thinking about doing the exact same thing. I've got a
breadboard with resistors and capacitors set up as diagrammed in the
data sheets, but I lack a programmer to work with.

In anycase, the point is that you need to meet the hardware
requirements (pull down resistors, capacitors, etc) on the target side
for the programmer to use the Spy Bi-Wire Interface.

To answer your question, the debugger does use the code that's on the
chip to, well, debug. Unless, of course, you have it set to run the
simulator (which has given me false hopes before).

In summation, it's not the chip, nor IAR, but the circuit for the
target MCU.
I'm crossing my fingers for you.
It is possible to use a ez430-2013 usb stick to program other SBW
MSP430 devices. I did this about a year ago and have been using it
to download and debug code on MSP430F2232 devices.

Step 1: Remove the original 2013 target board. This must be removed
or your will end up trying to program it and your new device at the
same time (not going to work).

Step 2: get approprate fine-pitch header or solder wires to back of 4
pin SBW header that was previously connected to the 2013 target
board. If you solder to back side of the header, you can still plug
your 2013 target board back in for troubleshooting the ez430.

Step 3: Attach other end of 4-wire cable to respective SBW pins and
power/ground on "new" target board.

I recommend you keep the cable short (6-8 inches) and you may have to
experiment with the capacitors that are connected to the SBW pins to
get reliable communication, depending on your board/breadboard layout.

Be sure to select the correct MSP430 device in IAR. If IAR doesn't
complain about not detecting the device when you download, then the
ez430 programmer is working fine.

As for the MSP430 not working after downloaded, be sure you disabled
the Watchdog in the code you are downloading. Otherwise, that will
make the MSP430 appear to be dead when it is really rebooting over
and over...

Ah ha! This is very interesting ... so if I can single-step through
the program while I have the production chip cobbled onto the USB
stick, would that be an indication that the code did in fact load
properly? I've not tried debugging the code while it's connected to
the "raw" MCU; I HAVE debugged it while I had the target development
board in place, and so I know the code runs fine (I've been using a
programmed target board for weeks now, so think it's time I put the
code onto a production chip).

Playing with the debugger would appear to be the next troubleshooting
step ...
--- In m..., "theseraphofjudgement"
wrote:
>
> I've been thinking about doing the exact same thing. I've got a
> breadboard with resistors and capacitors set up as diagrammed in the
> data sheets, but I lack a programmer to work with.
>
> In anycase, the point is that you need to meet the hardware
> requirements (pull down resistors, capacitors, etc) on the target side
> for the programmer to use the Spy Bi-Wire Interface.
>
> To answer your question, the debugger does use the code that's on the
> chip to, well, debug. Unless, of course, you have it set to run the
> simulator (which has given me false hopes before).
>
> In summation, it's not the chip, nor IAR, but the circuit for the
> target MCU.
> I'm crossing my fingers for you.
>

Most encouraging. This persuades me that investing the time to make a
safer, saner cable shouldn't be a waste of time. Do you have any
suggestions on which 0.05 pitch header to use? The ones I bought
aren't very sturdy; I would hoping for something with nice, big,
easy-to-solder tails ...

--- In m..., "abernax" wrote:
>
> It is possible to use a ez430-2013 usb stick to program other SBW
> MSP430 devices. I did this about a year ago and have been using it
> to download and debug code on MSP430F2232 devices.
>
> Step 1: Remove the original 2013 target board. This must be removed
> or your will end up trying to program it and your new device at the
> same time (not going to work).
>
> Step 2: get approprate fine-pitch header or solder wires to back of 4
> pin SBW header that was previously connected to the 2013 target
> board. If you solder to back side of the header, you can still plug
> your 2013 target board back in for troubleshooting the ez430.
>
> Step 3: Attach other end of 4-wire cable to respective SBW pins and
> power/ground on "new" target board.
>
> I recommend you keep the cable short (6-8 inches) and you may have to
> experiment with the capacitors that are connected to the SBW pins to
> get reliable communication, depending on your board/breadboard layout.
>
> Be sure to select the correct MSP430 device in IAR. If IAR doesn't
> complain about not detecting the device when you download, then the
> ez430 programmer is working fine.
>
> As for the MSP430 not working after downloaded, be sure you disabled
> the Watchdog in the code you are downloading. Otherwise, that will
> make the MSP430 appear to be dead when it is really rebooting over
> and over...
>