On Fri, Aug 13, 2010 at 11:37:50PM -0700, Eric Decker wrote:
> Part of the problem I've been having seems to involve initilization.
> 
> Consider the following sequence...
> 
> Starting with no /dev/ttyUSB0 (pod not plugged in, no usb devices).
> 
> . I plug in the pod to the usb port.
> . I run mspdebug uif -d /dev/ttyUSB0 -j
>    (device erroneously identified as a 2616, not sure why)
> . I get the command prompt and exit using ^D.
> 
> . I run mspdebug again using mspdebug uif -d /dev/ttyUSB0 -j
> . mspdebug fails to come up.  Could not find device and C_IDENT1 failed.
> 
> Note: if I unplug and replug the pod, then I can run mspdebug and it will
> work as described above.
> 
> Here is the transcript...
> 
> zot (10): mspdebug uif -d /dev/ttyUSB0 -j
> MSPDebug version 0.10 - debugging tool for MSP430 MCUs
> Copyright (C) 2009, 2010 Daniel Beer <[email protected]>
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Trying to open UIF on /dev/ttyUSB0...
> Initializing FET...
> FET protocol version is 20405003
> Configured for JTAG (2)
> Set Vcc: 3000 mV
> Device ID: 0xf26f
> Device: MSP430F2616
> Code memory starts at 0x2100
> Number of breakpoints: 8
> 
> Available commands:
>     =         dis       hexout    opt       reset     step
>     break     erase     isearch   prog      run       sym
>     cgraph    gdb       md        read      set
>     delbreak  help      mw        regs      setbreak
> 
> Available options:
>     color     gdb_loop
> 
> Type "help <topic>" for more information.
> Press Ctrl+D to quit.
> 
> (mspdebug) ^D
> zot (11): mspdebug uif -d /dev/ttyUSB0 -j
> MSPDebug version 0.10 - debugging tool for MSP430 MCUs
> Copyright (C) 2009, 2010 Daniel Beer <[email protected]>
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Trying to open UIF on /dev/ttyUSB0...
> Initializing FET...
> FET protocol version is 20405003
> Configured for JTAG (2)
> Set Vcc: 3000 mV
> fet: FET returned error code 4 (Could not find device (or device not
> supported))
> fet: command C_IDENT1 failed
> fet: identify failed
> zot (12):
> 
> 
> The 2618 returns the following msg28 data.  I unpluged the pod and then
> plugged it back in to make sure I didn't run into the initilization problem.
> 
> zot (21): mspdebug uif -d /dev/ttyUSB0 -j --fet-force-id nonsense
> MSPDebug version 0.10 - debugging tool for MSP430 MCUs
> Copyright (C) 2009, 2010 Daniel Beer <[email protected]>
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Trying to open UIF on /dev/ttyUSB0...
> Initializing FET...
> FET protocol version is 20405003
> Configured for JTAG (2)
> Set Vcc: 3000 mV
> Device ID: 0xf26f
> fet: unknown device
> msg28_data: [0x1a bytes]
>     f2 6f 05 60 00 00 00 00 00 00 02 13 01 00 f4 1c
>     89 00 89 00 00 00 00 00 00 00
> fet: identify failed
> zot (22):
> 
> 
> Note: running "mspdebug uif -d /dev/ttyUSB0 -j --fet-force-id nonsense" can
> be run as many times as one wants.  It does not put the pod into what ever
> state it is that wedges the pod so later commands don't work.
> 
> reset on the command line seems to work multiple times.  However, once the
> pod gets wedged, doing reset doesn't help.
> 
> I know there is a msg28 block embedded into fet_db.c but could you send me
> the output of mspdebug uif -d /dev/ttyUSB0 -j --fet-force-id nonsense.
> Assuming you have a 2616 and a usb jtag pod.

Well, whatever is in the msg28 block is what I'm expecting, although
I've noticed that there can be minor variations. The strategy is to
look for the block with the first two bytes correct, and as many bytes
following as possible correct.

I'm thinking that the problem you're experiencing could be due to the
fact that the FET is being told incorrect memory ranges for the chip
you're using. Please try this patch and see if it helps anything (it's
just the 2616 record with your msg28 data and altered memory ranges):

diff --git a/fet_db.c b/fet_db.c
index 7a93df1..cbe9eb9 100644
--- a/fet_db.c
+++ b/fet_db.c
@@ -258,6 +258,41 @@ static const struct fet_db_record fet_db[] = {
                        0x00, 0x00
                }
        },
+       { /* copied from MSP430F2616, with modifications */
+               .name = "MSP430F2618",
+               .msg28_data = {
+                       0xf2, 0x6f, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x02, 0x13, 0x01, 0x00, 0xf4, 0x1c,
+                       0x89, 0x00
+                       /* extra: 89 00 00 00 00 00 00 00 */
+               },
+               .msg29_params = {0x00, 0x41, 0x39},
+               .msg29_data = {
+                       0x00, 0x31, 0xff, 0xff, 0x01, 0x00, 0x00, 0x10,
+                       0xff, 0x10, 0x40, 0x00, 0x00, 0x11, 0xff, 0x30,
+                       0x00, 0x11, 0xff, 0x20, 0x08, 0x00, 0x03, 0x00,
+                       0x02, 0x00, 0xd7, 0x60, 0x00, 0x00, 0x00, 0x00,
+                       0x08, 0x07, 0x10, 0x0e, 0xc4, 0x09, 0x70, 0x17,
+                       0x58, 0x1b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
+                       0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x33, 0x0f, 0x1f, 0x0f,
+                       0xff, 0xff
+               },
+               .msg2b_len = 0x4a,
+               .msg2b_data = {
+                       0x00, 0x0c, 0xff, 0x0f, 0x00, 0x02, 0x02, 0x00,
+                       0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                       0x00, 0x00
+               }
+       },
        {
                .name = "MSP430F5437A",
                .msg28_data = {

Reply via email to