I found that newer versions of the usb protocol have 4 extra bytes embedded
in the receive (reply) packets. Basically if the type is set to 0xFF then
there are an extra short (status of some sort) followed by a reiteration of
the command followed by the actual type. Here is some code that I use to
parse that piece:

        type = buf[n++];
        if(type == 0xFF) {
                u->replyStatus = extractShort(&buf[n]);
                n += 2;
                if(buf[n++] != command) {
                        return u->errNo;
                }
                if(crc16(0xFFFF, buf+6, nBuf-4) != 0xf0b8) {
                        return u->errNo;
                }
                type = buf[n++];
        } else {
                if(crc16(0xFFFF, buf+2, nBuf) != 0xf0b8) {
                        return u->errNo;
                }
        }


Also, some chips (the msp430f5437A for example) require a different
configuration either JTAG or spy-bi-wire. You have so select configuration
8, 2. It seems to be a version of JTAG that requires the TEST pin of the
JTAG to be connected to the TEST pin of the chip.

Robert


daniel-407 wrote:
> 
> Michiel Konstapel writes:
>> Any chance you could make it work with FET firmware version 20401004?
>> That's the one I've found to work with a variety of tools enabling me to
>> program the bigger 2xx series and I'm reluctant to risk breaking my FET,
>> but it would be very convenient to be able to use mspdebug for flashing
>> on Linux. Currently, I'm getting the following output:
>> 
>> $ ./mspdebug -j -u /dev/ttyUSB0
>> MSPDebug version 0.7 - 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...
>> FET protocol version is 20401004
>> Configured for JTAG
>> Set Vcc: 3000 mV
>> fet: FET returned error code 4
>>     (Could not find device (or device not supported))
>> fet: command 0x28 failed
>> fet: identify failed
> 
> Hi Michiel,
> 
> There's one thing you could try, but it's a wild guess really. In fet.c,
> find line 858, which looks like this:
> 
>                 .min_version = 20404000,
> 
> Change it to:
> 
>                 .min_version = 20401004,
> 
> You should get some line in the output about sending magic messages.
> Some of the new versions of the firmware require a pair of large init
> messages to be sent before they'll work properly.
> 
> I have a collection of these init messages for some firmware versions,
> but not all. The modification above will try the init messages for a
> (hopefully) similar version.
> 
> Failing this, you could help capture the init messages for this
> firmware version if you have Windows XP, appropriate programming
> software, sniffusb and some spare time.
> 
> Let me know if the change above has any effect. Also, if anyone is
> willing to spend a little time using sniffusb to find these messages,
> we should be able to get this version of the firmware going quite
> easily.
> 
> - Daniel
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/MSPDebug-version-0.7-tp28518882p28527453.html
Sent from the MSP430 gcc - Users mailing list archive at Nabble.com.


Reply via email to