Jump to content
jazz

SBW MSP430F550x based programmer

Recommended Posts

I am working on SBW programmer based on MSP430F550x USB family member.

 

Few years ago I made it (based on MSP430F2xx) for programming MSP430F2xx family. Programmer was packed inside DB9 connector body and connected to PC by uart. Like on the picture, but with 4-wire cable.

 

post-26480-0-44398600-1354550884_thumb.jpg

 

This time it will be connected to PC by USB, and will support MSP430F2xx and MSP430F5xx chips. Don't have launchpad on hand, so if somebody can post here screens of attached USB devices (on Win) when launchpad is connected to PC. For attached devices details can be used usbview.rar.

Share this post


Link to post
Share on other sites

I can't see the picture. Could you please upload to 43oh. That is one of the rules here as imageshack images expire. If not, I can do it for you.

 

I don't have a Launchpad at work.. someone else can chime in here... else I'll do it after work.

Share this post


Link to post
Share on other sites

I assume this is what you want.

Device Descriptor:
bcdUSB:             0x0110
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x08 (8)
idVendor:           0x0451 (Texas Instruments)
idProduct:          0xF432
bcdDevice:          0x0100
iManufacturer:        0x01
0x0409: "Texas Instruments"
iProduct:             0x02
0x0409: "Texas Instruments MSP-FET430UIF"
iSerialNumber:        0x03
0x0409: "24FF426C50144438"
bNumConfigurations:   0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     Full
Device Address:       0x03
Open Pipes:              5

Endpoint Descriptor:
bEndpointAddress:     0x82  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0xFF

Endpoint Descriptor:
bEndpointAddress:     0x03  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0040 (64)
bInterval:            0xFF

Endpoint Descriptor:
bEndpointAddress:     0x83  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0040 (64)
bInterval:            0xFF

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x01  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Configuration Descriptor:
wTotalLength:       0x0055
bNumInterfaces:       0x02
bConfigurationValue:  0x01
iConfiguration:       0x00
bmAttributes:         0x80 (Bus Powered )
MaxPower:             0x32 (100 Ma)

Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x03
bInterfaceClass:      0x02
bInterfaceSubClass:   0x02
bInterfaceProtocol:   0x01
iInterface:           0x05
0x0409: "MSP430 Application UART"

Unknown Descriptor:
bDescriptorType:      0x24
bLength:              0x05
05 24 00 10 01 

Unknown Descriptor:
bDescriptorType:      0x24
bLength:              0x05
05 24 01 00 00 

Unknown Descriptor:
bDescriptorType:      0x24
bLength:              0x04
04 24 02 02 

Endpoint Descriptor:
bEndpointAddress:     0x82  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0xFF

Endpoint Descriptor:
bEndpointAddress:     0x03  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0040 (64)
bInterval:            0xFF

Endpoint Descriptor:
bEndpointAddress:     0x83  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0040 (64)
bInterval:            0xFF

Interface Descriptor:
bInterfaceNumber:     0x01
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x00
bInterfaceProtocol:   0x00
iInterface:           0x04
0x0409: "MSP430 Debug-Interface"

HID Descriptor:
bcdHID:             0x0101
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x02B6

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x01  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Share this post


Link to post
Share on other sites

I assume you know about GoodFET... Why is it that we are always working on the same things?  :)  OK with me though, I planned on open sourcing my GoodFET implementation for MSP430X2.

Share this post


Link to post
Share on other sites

I assume you know about GoodFET... Why is it that we are always working on the same things?   :smile:  OK with me though, I planned on open sourcing my GoodFET implementation for MSP430X2.

 

I am working on fast SBW flashing (not debugging) tool. It will be able to program multiple chips (from the same family) at once. It is based on MSP430F550x and connected to PC by USB (bus powered). No other parts.

Share this post


Link to post
Share on other sites

I am assuming this will work with G series too, right? I could use a multiple chip programmer.

 

It will work with MSP430F2xx and MSP430F5xx family. Plan is to be able for programming 8 chips at once (SBW with common, only one TEST pin and multiple RESET pins, for each chip separate RESET pin).

Share this post


Link to post
Share on other sites

I am working on simplified version of...

 

http://www.ti.com/tool/msp-gang

http://www.elprotronic.com/gangpro430.html

 

MSP430F550x will be connected by USB to PC, and there will be composite device (IAD) with 2 CDC ports. First port will be used for flashing, and second will be used as user uart/USB bridge (like on launchpad) with any baud rate (123456 bps, 654321 bps...).

 

At the moment I am running system on debugging setup.

 

post-26480-0-92615500-1355325797_thumb.gif

 

Third CDC port is used for direct microcontroller logging. This way of debugging is explained here...

 

http://forum.43oh.com/topic/2646-software-debugging-without-hardware-tools/

Share this post


Link to post
Share on other sites

Hmmm.... Incorporating one of these at the top of a custom LP would be rad, no need to backpack it on an MSP430 LaunchPad for the programming/debugging.

 

My F5172 LP I designed does that (downward-facing female headers for mounting overtop the v1.5 LP) but also includes the 14-pin FET430UIF header, however I do intend to build more LaunchPads in the future (F5437A at some point) so I may be interested in trying this out then.

Share this post


Link to post
Share on other sites

I am using for testing two MSP430F2012, and one MSP430F2272, connected on SBW bus. Don't have any other MSP430F2xx family member or board right now, and will not have it (because I don't need it for any future project). If it will work with 3 uC on bus, it will also work with completed bus. At the end somebody else will try it with completed bus and confirm if it is working or not. Plan is to have possibility for programming 12 chips at once.

 

Here is uC log for SBW entry sequence with 3 chips connected to programmer (Device4: MSP430F2012, Device6: MSP430F2272, Device11: MSP430F2012):

[16.12.2012 10:05:26] *** Get Device ***
[16.12.2012 10:05:26] * ResetTAP *
[16.12.2012 10:05:26] Shifted 0000 0000 0000 0089 0000 0089 0000 0000 0000 0000 0089 0000
[16.12.2012 10:05:26] * ResetTAP *
[16.12.2012 10:05:26] Checking fuses...
[16.12.2012 10:05:26] Shifted 0000 0000 0000 2481 0000 2481 0000 0000 0000 0000 2481 0000
[16.12.2012 10:05:26] Shifted 0000 0000 0000 2481 0000 2481 0000 0000 0000 0000 2401 0000
[16.12.2012 10:05:26] Shifted 0000 0000 0000 2481 0000 2481 0000 0000 0000 0000 2481 0000
[16.12.2012 10:05:26] Shifted 0000 0000 0000 2401 0000 2481 0000 0000 0000 0000 2481 0000
[16.12.2012 10:05:26] Shifted 0000 0000 0000 2401 0000 2481 0000 0000 0000 0000 2481 0000
[16.12.2012 10:05:26] Device in JTAG read mode...
[16.12.2012 10:05:26] Shifted 0000 0000 0000 0089 0000 0089 0000 0000 0000 0000 0089 0000
[16.12.2012 10:05:26] Instruction fetch mode...
[16.12.2012 10:05:26] * ReadMem 0FF0 *
[16.12.2012 10:05:26] * HaltCPU *
[16.12.2012 10:05:26] * SetInsFetch *
[16.12.2012 10:05:26] 0000010000101000
[16.12.2012 10:05:26] Shifted 0000 0000 0000 01F2 0000 27F2 0000 0000 0000 0000 01F2 0000
[16.12.2012 10:05:26] * ReleaseCPU *
[16.12.2012 10:05:26] * ExecutePOR *
[16.12.2012 10:05:26] Shifted 0000 0000 0000 0089 0000 0089 0000 0000 0000 0000 0089 0000
[16.12.2012 10:05:26] * WriteMem 0120: 5A80 *
[16.12.2012 10:05:26] * HaltCPU *
[16.12.2012 10:05:26] * SetInsFetch *
[16.12.2012 10:05:26] 0000010000101000
[16.12.2012 10:05:26] * ReleaseCPU *
[16.12.2012 10:05:26] Send report
[16.12.2012 10:05:26] Done

Share this post


Link to post
Share on other sites

P1.0 blinking example:

00FFE0                              org 0FFE0h
00FFE0                              
00FFE0 B240805A2001 Main            mov.w #WDTPW + WDTHOLD, &WDTCTL
00FFE6              
00FFE6 D2D32200                     bis.b #001h, &P1DIR
00FFEA              
00FFEA 3E400500     Main1           mov.w #00005h, R14
00FFEE 0F43         Main2           mov.w #00000h, R15
00FFF0 1F83         Main3           dec.w R15
00FFF2 FE23                         jnz Main3
00FFF4 1E83                         dec.w R14
00FFF6 FB23                         jnz Main2
00FFF8              
00FFF8 D2E32100                     xor.b #001h, &P1OUT
00FFFC              
00FFFC F63F                         jmp Main1
00FFFE              
00FFFE E0FF                         dw Main
010000                              

 

Flashing log (ReadMem is used to verified flashed data):

[17.12.2012 11:56:21] *** Begin ***
[17.12.2012 11:56:24] *** Get Device ***
[17.12.2012 11:56:24] * ResetTAP *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 0089 0000 0089 0000 0000 0000 0000 0089 0000
[17.12.2012 11:56:24] * ResetTAP *
[17.12.2012 11:56:24] Checking fuses...
[17.12.2012 11:56:24] Shifted 0000 0000 0000 2481 0000 2481 0000 0000 0000 0000 2481 0000
[17.12.2012 11:56:24] Shifted 0000 0000 0000 2481 0000 2401 0000 0000 0000 0000 2481 0000
[17.12.2012 11:56:24] Shifted 0000 0000 0000 2481 0000 2481 0000 0000 0000 0000 2481 0000
[17.12.2012 11:56:24] Shifted 0000 0000 0000 2481 0000 2401 0000 0000 0000 0000 2481 0000
[17.12.2012 11:56:24] Shifted 0000 0000 0000 2401 0000 2481 0000 0000 0000 0000 2481 0000
[17.12.2012 11:56:24] Device in JTAG read mode...
[17.12.2012 11:56:24] Shifted 0000 0000 0000 0089 0000 0089 0000 0000 0000 0000 0089 0000
[17.12.2012 11:56:24] * ReadMem 0FF0 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 01F2 0000 27F2 0000 0000 0000 0000 01F2 0000
[17.12.2012 11:56:24] * WriteMem 0120: 5A80 *
[17.12.2012 11:56:24] *** Mass Erase ***
[17.12.2012 11:56:24] *** Write ***
[17.12.2012 11:56:24] Addr FFE0 Len 00032
[17.12.2012 11:56:24] * ReadMem FFE0 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 40B2 0000 40B2 0000 0000 0000 0000 40B2 0000
[17.12.2012 11:56:24] * ReadMem FFE2 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 5A80 0000 5A80 0000 0000 0000 0000 5A80 0000
[17.12.2012 11:56:24] * ReadMem FFE4 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 0120 0000 0120 0000 0000 0000 0000 0120 0000
[17.12.2012 11:56:24] * ReadMem FFE6 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 D3D2 0000 D3D2 0000 0000 0000 0000 D3D2 0000
[17.12.2012 11:56:24] * ReadMem FFE8 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 0022 0000 0022 0000 0000 0000 0000 0022 0000
[17.12.2012 11:56:24] * ReadMem FFEA *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 403E 0000 403E 0000 0000 0000 0000 403E 0000
[17.12.2012 11:56:24] * ReadMem FFEC *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 0005 0000 0005 0000 0000 0000 0000 0005 0000
[17.12.2012 11:56:24] * ReadMem FFEE *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 430F 0000 430F 0000 0000 0000 0000 430F 0000
[17.12.2012 11:56:24] * ReadMem FFF0 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 831F 0000 831F 0000 0000 0000 0000 831F 0000
[17.12.2012 11:56:24] * ReadMem FFF2 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 23FE 0000 23FE 0000 0000 0000 0000 23FE 0000
[17.12.2012 11:56:24] * ReadMem FFF4 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 831E 0000 831E 0000 0000 0000 0000 831E 0000
[17.12.2012 11:56:24] * ReadMem FFF6 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 23FB 0000 23FB 0000 0000 0000 0000 23FB 0000
[17.12.2012 11:56:24] * ReadMem FFF8 *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 E3D2 0000 E3D2 0000 0000 0000 0000 E3D2 0000
[17.12.2012 11:56:24] * ReadMem FFFA *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 0021 0000 0021 0000 0000 0000 0000 0021 0000
[17.12.2012 11:56:24] * ReadMem FFFC *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 3FF6 0000 3FF6 0000 0000 0000 0000 3FF6 0000
[17.12.2012 11:56:24] * ReadMem FFFE *
[17.12.2012 11:56:24] Shifted 0000 0000 0000 FFE0 0000 FFE0 0000 0000 0000 0000 FFE0 0000
[17.12.2012 11:56:24] *** Release Device ***

Share this post


Link to post
Share on other sites

Here are the results for flashing 2K test hex file with my SBW+ programmer. Two MSP430F2012 are present on bus.

D:\msp430>flashFile "sbw_test.hex"2048 bytesDevice: 1  JTID: 89  Fuse: OK  0FF0: F2 01  0FFD: 01 02Device: 3  JTID: 89  Fuse: OK  0FF0: F2 01  0FFD: 01 02Mass EraseDevice 1, Address F800, Len 2048F800: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ;...FFF0: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ;Device 3, Address F800, Len 2048F800: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ;...FFF0: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ;Flash WriteAdr: F800 Len: 2048 bytes USBBufSz: 2112 bytesSize: 2048 bytes Time: 125 ms Speed: 16,0 KB/sDevice 1, Address F800, Len 2048F800: 0123 4567 89AB CDEF FEDC BA98 7654 3210 ; .#Eg

Share this post


Link to post
Share on other sites

Using fast uC as base, JTAG/SBW programming can be very fast, especially JTAG. Code optimization can be done (slau320), with adjusting Shift/ClrTCLK/SetTCLK functions to completely remove TCLK_saved value from code, together with all "if statements" (if TCLK_saved & SBWDATO...).

 

I like SBW because it is implemented with only two, not used MSP430 pins (TEST/RESET). Minus is that is slow. Don't like JTAG because it using too much pins (for my taste), so I moved in different direction, to still have only few connection lines with hi speed transfer.

 

I call it SBW+, and connection with target is done by 5-wire connector, one more than standard SBW.

 

1 VCC

2 VSS

3 P1.0

4 TEST

5 RESET

 

P1.0 is used for hi speed communication with target device. When programming is done P1.0 connection line is switched to input without pooling, so there is no any influence on target device after programming, and it can running without need to disconnect it from programmer.

 

Here is example of reading 64 KB from target device with my programer, using standard SBW, and SBW+. Reading is done from all 4 target devices, so 4 * 64 KB are transferred to programmer at once.

Device: 0  JTID: 89  Fuse: OK  0FF0: F2 27  0FFD: 01 04
Device: 1  JTID: 89  Fuse: OK  0FF0: F2 01  0FFD: 01 02
Device: 2  JTID: 89  Fuse: OK  0FF0: F2 27  0FFD: 01 04
Device: 3  JTID: 89  Fuse: OK  0FF0: F2 01  0FFD: 01 02

Flash Standard Read (SBW)
1 uC   Size: 65536 bytes Time: 4187 ms Speed: 15,3 KB/s
Total  Size: 262144 bytes Time: 4187 ms Speed: 61,1 KB/s

Flash Fast Read (SBW+)
1 uC   Size: 65536 bytes Time: 906 ms Speed: 70,6 KB/s
Total  Size: 262144 bytes Time: 906 ms Speed: 282,6 KB/s

Share this post


Link to post
Share on other sites

Benchmark in last post was related to normal data read SBW operation. For all SBW devices is also possible faster transfer with DATA_QUICK operation, and here are the results for reading  64 KB from target device.

 

Flash Quick Read (SBW)
1 uC  Size: 65536 bytes Time: 1391 ms Speed: 46,0 KB/s
Total Size: 262144 bytes Time: 1391 ms Speed: 184,0 KB/s

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

×