jazz 209 Posted December 22, 2013 Author Share Posted December 22, 2013 @@jazz Thank you for putting so much time and effort into this. Is there anyway you can summarize what you are doing here with the programmer, with these updates - less space, speed? Do you have any pics of your setup? Thanks! This topic was some kind of progress report. I had long holidays between June and October, without topic related activity. I have list of functions that must be supported by flasher. There are two points left, fuse blow and customized BSL firmware update for flasher itself. Everything else is done, and I will not make any significant updates. At the end I will publish interface (flasher / PC - commands / data exchange) here together with source of PC side, and it will be very easy to integrate it in Energia, or make customized flasher on any OS. If anybody have topic related questions or some requests, we can discuss it here. Complete SBW+ development hardware is here... On the left side are MSP430x5xx target boards. Two on the left top are MSP430F5435. On the right side are MSP430x2xx target boards. Two on right bottom are MSP430G2553 (with DIP sockets). In the middle are 2 MSP430F5510 boards with all pins available. Upper one is armed with SBW+ connectors to 8 target devices and it is used as main board for project development. Another one is flashed by BSL with last stable firmware version and it is used as SBW+ flasher to main board. All target boards have 5-pin SBW+ connection. At the bottom are 5-wire flat cables used for connection between programmer and target devices. SBW+ target device connection pinout is... VCC GND PX.0 (X=1, 2, 3... J) TEST RESET jsolarski, bluehash, dubnet and 2 others 5 Quote Link to post Share on other sites
bluehash 1,581 Posted December 22, 2013 Share Posted December 22, 2013 @@jazz Not that is sweet! Thank you for taking the time to write this up( and for the PIC too ). Quote Link to post Share on other sites
Rubi 11 Posted January 2, 2014 Share Posted January 2, 2014 Awesome. I like your prototyping stile. Quote Link to post Share on other sites
jazz 209 Posted January 19, 2014 Author Share Posted January 19, 2014 Blowing soft fuse for FRAM device will write four $55 bytes on address $FF80. Example with MSP430FR5739... D:\msp430>flash -p com21 -f sbw_test_fr_16.txt -w -v -fuse File "sbw_test_fr_16.txt" Address: 01C00 Words: 512 Address: 0C200 Words: 7808 16640 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 OK 0381 1106 24 24 94AFAA04 1500 3300 Write Size: 16640 bytes Time: 90 ms Speed: 179,3 KB/s Verify Size: 16640 bytes Time: 105 ms Speed: 153,4 KB/s Fuse will be blown. Continue (Y/N)? y Fuse Blow Release Device Total Time: 1938 ms D:\msp430> With blown soft fuse it is not possible anymore to have JTAG/SBW access to FRAM device... D:\msp430>flash -p com21 -f sbw_test_fr_16.txt -v File "sbw_test_fr_16.txt" Address: 01C00 Words: 512 Address: 0C200 Words: 7808 16640 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 Blown 0000 0000 00 00 00000000 0000 0000 Release Device Total Time: 187 ms D:\msp430> It is possible to unblow FRAM soft fuse with mass erase by UART BSL... D:\msp430\MSP430FR5739>BSL_Scripter.exe script.txt ------------------------------------------ BSL Scripting application 1.07 The local time is: 14:59 on 19.01.2014 ------------------------------------------ Initializing, Mode: 5xx COM: COM22 DONE Verbose mode on Mass Erase: ------------------------------------------------- [80] [01] [00] [15] [64] [a3] {00} ------------------------------------------------- ------------------------------------------------- {80} {02} {00} {3b} {00} {60} {c4} ------------------------------------------------- DONE RX Password: ------------------------------------------------- [80] [21] [00] [11] [ff] [ff] [ff] [ff] ... [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] ... [ff] [ff] [ff] [ff] [ff] [9e] [e6] {00} ------------------------------------------------- ------------------------------------------------- {80} {02} {00} {3b} {00} {60} {c4} ------------------------------------------------- DONE D:\msp430\MSP430FR5739> It can be used MSP430G2553 based BSL (slaa535 LaunchPad-Based MSP430 UART BSL Interface) MSP430FR5739_BSL_Fuse.rar Lubba 1 Quote Link to post Share on other sites
jazz 209 Posted January 22, 2014 Author Share Posted January 22, 2014 Blowing soft fuse for MSP430F5xx device will write four $55 bytes on address $17FC (BSL area). Example for MSP430F5510... D:\msp430>flash -p com21 -f sbw_test_32r5.txt -e -w -v -fuse File "sbw_test_32r5.txt" 32768 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 OK 3180 1104 12 12 013BB046 2700 2E00 Erase Write Size: 32768 bytes Time: 379 ms Speed: 84,2 KB/s Verify Size: 32768 bytes Time: 196 ms Speed: 162,6 KB/s Fuse will be blown. Continue (Y/N)? y Fuse Blow Release Device Total Time: 1360 ms D:\msp430> With blown soft fuse it is not possible anymore to have JTAG/SBW access to MSP430F5xx device... D:\msp430>flash -p com21 -f sbw_test_32r5.txt -v File "sbw_test_32r5.txt" 32768 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 Blown 0000 0000 00 00 00000000 0000 0000 Release Device Total Time: 312 ms D:\msp430> It is possible to unblow MSP430F5xx soft fuse with setting four bytes on address $17FC to zero ($00 and $FF are fuse values that enable JTAG) by BSL... D:\msp430\MSP430F5510>BSL_Scripter.exe script.txt ------------------------------------------ BSL Scripting application 1.07 The local time is: 16:20 on 22.01.2014 ------------------------------------------ Initializing, Mode: 5xx USB: USB RX Password: DONE Waiting 1000 milliseconds DONE RX Password: DONE Writing RAM_BSL.00.07.06.36.txt to device (fast): SENT Sending Set PC to 2504: SENT Waiting 3000 milliseconds DONE Initializing, Mode: 5xx USB: USB Writing RESET_FUSE.txt to device: DONE To completely restore soft fuse (four bytes on address $17FC back to $FF) BSL must be reflashed... D:\msp430>flash -p com21 -f bsl5510.txt -ubsl -ebsl -w -v File "bsl5510.txt" Address: 01000 Words: 1024 2048 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 OK 3180 1104 12 12 013BB046 2700 2E00 Unlock BSL Erase BSL Write Size: 2048 bytes Time: 50 ms Speed: 39,2 KB/s Verify Size: 2048 bytes Time: 15 ms Speed: 126,9 KB/s Release Device Total Time: 219 ms D:\msp430> MSP430F5510_BSL_Fuse.rar I done this only to present fuse blow command with my SBW+ flasher. Take care what are you doing because with blown soft JTAG fuse and erased BSL is not possible any more to have JTAG/BSL access to device. Quote Link to post Share on other sites
jazz 209 Posted January 25, 2014 Author Share Posted January 25, 2014 Result of read command ("-r" switch for SBW+, "-rq" switch for SBW) can be displayed or stored to file. First number is device no (#) 0..7 , and if value is over 7 then will be displayed result for all connected devices. Second number is hex start address, and third is hex end address. Reading words from start of BSL area, for MSP430F5510 and MSP430F5172... D:\msp430>flash -p com21 -r 8 1000 1040 Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 OK 3180 1104 12 12 013BB046 2A00 2100 1 91 OK 3080 1104 30 10 B15B9446 2000 1700 Read #0 01000: 3C34 3C08 3FFF 3FFF 3FFF 3FFF 3FFF 3FFF ; 4... . . . . . . 01010: 0000 0000 0000 0000 0000 0000 0000 0000 ; ................ 01020: 0000 0000 0000 0000 0000 0000 0000 0000 ; ................ 01030: 0000 0000 0000 0000 0000 0000 0000 0000 ; ................ #1 01000: 3C09 3C12 3FFF 3FFF 3FFF 3FFF 3FFF 3FFF ; .... . . . . . . 01010: 0000 0000 0000 0000 0000 0000 0000 0000 ; ................ 01020: 0000 0000 0000 0000 0000 0000 0000 0000 ; ................ 01030: 0000 0000 0000 0000 0000 0000 0000 0000 ; ................ Release Device Total Time: 47 ms D:\msp430> With "-rf" (or "-rqf") switch result will be stored to file using TI txt format. Example of making backup of original BSL, for MSP430F5510 and MSP430F5172... D:\msp430>flash -p com21 -ubsl -rf 8 1000 1800 Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 OK 3180 1104 12 12 013BB046 2A00 2100 1 91 OK 3080 1104 30 10 B15B9446 2000 1700 Unlock BSL Read #0 "rf0.txt" #1 "rf1.txt" Release Device Total Time: 47 ms D:\msp430> BSL5510.txt BSL5172.txt bluehash 1 Quote Link to post Share on other sites
bluehash 1,581 Posted January 30, 2014 Share Posted January 30, 2014 Keep them coming. Thanks for the updates. Quote Link to post Share on other sites
jazz 209 Posted March 10, 2014 Author Share Posted March 10, 2014 AFAIK, all MSP430 FET's working on fixed voltage, and use voltage level translators for interface with targets on different supply voltage. I prefer as simple as possible design, so flasher will work on same voltage as targets without voltage level translators. For example if 2.5V external supply (from target device/board) is used, flasher will run on this external voltage. There will be digitally controlled regulator on flasher board. It will support 2.1V - 3.6V with 0.1V resolution. I made some basic tests, and there is no problem with running flasher on low voltage (2.1V). Example of flashing MSP430G2955 on 2.1V and 3.6V, using flasher digitally controlled regulator... D:\msp430>flash -p com21 -f sbw_test_60.txt -vcc 21 -e -w -v File "sbw_test_60.txt" Address: 01100 Words: 30592 61184 bytes Set VCC 2,1 V Get Device # JTID Fuse Device Proc 0 89 OK 2955 00A0 1 89 OK 2955 00A0 Erase Write Size: 61184 bytes Time: 1218 ms Speed: 49,1 KB/s Verify Size: 61184 bytes Time: 366 ms Speed: 163,1 KB/s Release Device Total Time: 1750 ms D:\msp430>flash -p com21 -f sbw_test_60.txt -vcc 36 -e -w -v File "sbw_test_60.txt" Address: 01100 Words: 30592 61184 bytes Set VCC 3,6 V Get Device # JTID Fuse Device Proc 0 89 OK 2955 00A0 1 89 OK 2955 00A0 Erase Write Size: 61184 bytes Time: 1218 ms Speed: 49,1 KB/s Verify Size: 61184 bytes Time: 367 ms Speed: 162,8 KB/s Release Device Total Time: 1765 ms D:\msp430> Quote Link to post Share on other sites
jazz 209 Posted April 23, 2014 Author Share Posted April 23, 2014 At the beginning, 2 SBW+ commands were implemented, write and read, so later read was used for SBW+ verify. Program data from all (up to 8) target devices are transferred to PC, and than on PC side, application was making comparison of file data against received data from target devices. Due to SBW+ and USB transfer speed limitation, with full SBW+ bus (8 devices), verify was going down to 100 KB/s. I made new SBW+ verify command that sending data to target device, and than comparison is done on target device. Speed is not depending on number of connected target devices, and it will go up to 220 KB/s. I also made (only for MSP430x5xx, not MSP430x2xx) fast SBW+ CRC that will go up to 2 MB/s. Example of new verify and CRC with MSP430F5659 as target... D:\msp430>flash -p com21 -f sbw_test_5659.txt -e -ws -v -crc File: "sbw_test_5659.txt" Address: 08000 Words: 262144 Size: 524288 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 2 91 OK 3081 2106 10 10 B7A50951 0A00 1100 Erase Write Smart Time: 2595 ms Speed: 197,3 KB/s Verify Time: 2330 ms Speed: 219,7 KB/s CRC Calculation File #2 A0C7 A0C7 Time: 254 ms Speed: 2.013,0 KB/s Release Device Total Time: 5781 ms D:\msp430> Changed old (based on SBW+ read, and SBW Quick read) verify switches to "-vr" and "-vrq". There are SBW standard Read/Write Quick commands, so FRAM devices can be flashed using standard SBW connection (TEST / RESET), without extra pin, on lower writing speed, but still faster than MSP-GANG. D:\msp430>flash -p com21 -f sbw_test_fr_16.txt -wq -vrq File: "sbw_test_fr_16.txt" Address: 01C00 Words: 512 Address: 0C200 Words: 7808 Size: 16640 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 2 91 OK 0381 1106 24 24 94AFAA04 1500 3300 Write Quick Time: 278 ms Speed: 58,4 KB/s Verify Read Quick Time: 425 ms Speed: 38,1 KB/s Release Device Total Time: 781 ms D:\msp430> RobG 1 Quote Link to post Share on other sites
jazz 209 Posted June 4, 2014 Author Share Posted June 4, 2014 I only made one p2p FRAM board with MSP430FR5739 for development/testing, and was waiting for non-QFN 64 KB FRAM devices. Now, there are available, and I made p2p board with MSP430FR5959. Example of flashing 15.5 KB file, with 2 FRAM devices (MSP430FR5739 and MSP430FR5959) on SBW+ bus. D:\msp430>flash -p com21 -f test_msp430fr5739.txt -w -v File: "test_msp430fr5739.txt" Address: 0C200 Words: 7936 Size: 15872 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 OK 0381 1106 24 24 94AFAA04 1500 3300 1 99 OK 6581 1106 30 30 E1271D07 2F00 1900 Write Time: 84 ms Speed: 183,7 KB/s Verify Time: 83 ms Speed: 184,9 KB/s Release Device Total Time: 250 ms D:\msp430> Example of flashing 63 KB file, with MSP430FR5959 on SBW+ bus. D:\msp430>flash -p com21 -f test_msp430fr5959.txt -w -v File: "test_msp430fr5959.txt" Address: 04400 Words: 32256 Size: 64512 bytes Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 1 99 OK 6581 1106 30 30 E1271D07 2F00 1900 Write Time: 310 ms Speed: 202,9 KB/s Verify Time: 297 ms Speed: 211,7 KB/s Release Device Total Time: 781 ms D:\msp430> Quote Link to post Share on other sites
jazz 209 Posted June 23, 2014 Author Share Posted June 23, 2014 Example of flashing CC430F5147 (#0 3881) together with other MSP430F5xx devices. It has lowest writing rate (93,8 KB/s - 216,8 KB/s) from all 5xx chips that I have. D:\msp430>flash -p com21 -f test_msp430f5510.txt -wt -e -w -v -mr -vcc 22 File: "test_msp430f5510.txt" Address: 08000 Words: 16384 Size: 32768 bytes Set VCC 2,2 V Get Device # JTID Fuse Device Core Hard Soft LotWafer DieX DieY 0 91 OK 3881 1106 10 10 219CA446 1800 0F00 1 91 OK 5435 0100 10 10 ADE98146 0A00 2100 2 91 OK 3180 1104 12 12 013BB046 1200 1E00 3 91 OK 3180 1104 12 12 013BB046 0D00 1E00 4 91 OK 5435 0100 10 10 ADE98146 0400 2000 5 91 OK 3180 1104 12 12 013BB046 2A00 2100 6 91 OK 3080 1104 30 10 B15B9446 2000 1700 7 91 OK 3081 2106 10 10 B7A50951 0A00 1100 Write Test Smart #0 #1 #2 #3 #4 #5 #6 #7 0 93,8 100,6 102,0 102,2 102,5 103,3 105,4 106,4 1 216,8 232,5 235,7 236,1 236,9 238,6 243,6 245,9 Erase Write Time: 410 ms Speed: 77,9 KB/s Verify Time: 157 ms Speed: 202,8 KB/s Marginal Read File #0 #1 #2 #3 #4 #5 #6 #7 MR0: C841 C841 C841 C841 C841 C841 C841 C841 C841 MR1: C841 C841 C841 C841 C841 C841 C841 C841 C841 Time: 467 ms Speed: 68,4 KB/s Release Device Total Time: 1328 ms D:\msp430> Quote Link to post Share on other sites
jazz 209 Posted December 17, 2014 Author Share Posted December 17, 2014 At previous page is simple example with CDC - UART bridge and two 2xx target devices. There was only one 4 Mbps UART. There will be 3 firmware edition: basic without bridges, with 2 CDC - UART bridges, and with 2 CDC - Mailbox bridges. In case of 2 CDC - UART bridges, number of target devices will be limited to max 4. After target device release, bridges will be enabled and ready. I made testing with two 2xx target devices connected to both bridges. If system is used just for logging (not full duplex), both bridges together (working in parallel, at the same time) are able to go up to 4 Mbps. mov.w #WDTPW + WDTHOLD, &WDTCTL mov.b &CALBC1_16MHZ, &BCSCTL1 mov.b &CALDCO_16MHZ, &DCOCTL bis.b #UCSWRST, &UCA0CTL1 bis.b #(BIT5 + BIT4), &P3SEL ; P3.4/P3.5 = TXD/RXD bis.b #UCSSEL_2, &UCA0CTL1 ; SMCLK ; 16000000 Hz 4000000 bps mov.b #004h, &UCA0BR0 mov.b #000h, &UCA0BR1 bis.b #(UCBRS_0 + UCBRF_0), &UCA0MCTL bic.b #UCSWRST, &UCA0CTL1 mov.w #70, R14 mov.b #32, R15 Loop bit.b #UCA0TXIFG, &IFG2 jnc Loop mov.b R15, &UCA0TXBUF add.b #1, R15 cmp.b #127, R15 jne Loop mov.b #32, R15 sub.w #1, R14 jnz Loop Quote Link to post Share on other sites
jazz 209 Posted January 20, 2015 Author Share Posted January 20, 2015 For MSP430x5xx mailbox logging, 2 CDC are available, and 2 MSP430x5xx target devices from total 8 can be selected. If CDC is closed, mailbox is disabled. If CDC is open, mailbox is enabled, and SBW bus is active continuously. Setup is done by CDC baudrate value. Last baudrate digit is used for selecting target device. Baudrate value higher than 65535 is used for 32-bit mailbox selection. Lower value is used for 16-bit mailbox selection. There are less SBW operations per word with 32-bit mailbox, and it is faster than 16-bit. Here is logging example using 32-bit mailbox for target device #1 and #3. mailbox.zip Quote Link to post Share on other sites
jazz 209 Posted April 6, 2015 Author Share Posted April 6, 2015 After power-up / reset programmer is in slow mode (-slow) and on board regulator is on minimum voltage 1.8V (-vcc 0). Before switching to fast mode (-fast) voltage need to be increased over 2.0V. Maximum regulator voltage is close to 3.0V (-vcc 15), and step is (not linear) close to 0.8V. Will see about this later, but for now programmer can not work with target devices that have capacitor on RESET pin. PC side for Linux and Windows is written in Free Pascal (http://www.freepascal.org/). flash.zip bsl.zip Programmer firmware (v1.096), for basic device (SBW+), and device with Uart / Mailbox bridges (SBW+ Uart / Mailbox). sbwp_1096.zip CDC PID (VID is TI 2047 for all). 099F BSL 09B8 SBW+ 09B9 SBW+ Uart / Mailbox Windows CDC drivers. wincdc.zip bluehash and RobG 2 Quote Link to post Share on other sites
jazz 209 Posted April 14, 2015 Author Share Posted April 14, 2015 Complete CDC transfer between PC and programmer can be logged by enabling {$DEFINE CDCLOG} in flash.pas Short manual manual.pdf RobG and bluehash 2 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.