Other Parts Discussed in Thread: UNIFLASH
Hello,
We have been using the MSPFlasher (v1.3.20 currently) utility to load firmware on several of our MSP430F5335 based products for quite a while now in our standard production process. We have been loading a custom BSL image as well as the normal application image with no issues. I created a batch file for this process to make it easier for our production team. I was making two calls to MSPFlasher, one to program the custom BSL and one for the application. Recently I updated the BSL to use the JTag lockout feature to keep JTag access disabled by default when the product is deployed in the field. The updated BSL allows for enabling the JTag on boot up if a certain GPIO is grounded during reset. This change is requiring our production staff to ground the GPIO line in order to allow the standard batch file to successfully program the part, even with a brand new part which has the default factory BSL.
If possible, I would like to allow our production staff to do the initial programming (factory BSL in part) without requiring the GPIO line to be shorted to ground. In an attempt to accomplish this, I have tried several approaches (unsuccessfully):
1) I have tried adjusting the command line options with MSPFlasher to not reset the device after programming the custom BSL so that I can make a second MSPFlasher call to continue programming the application and then do the reset when complete. This was done with two calls to MSPFlasher and it didn't seem to work.
2) If have tried programming the application code first and then programming the BSL. I used the ERASE_SEGMENT option with -e to try and allow the BSL programming process on only erase the memory areas required for the BSL, but the BSL code apparently crosses segment boundaries, and I got an error.
3) As a third attempt, I tried combining the custom BSL and application code into one intel hex file so I could program everything in one call to MSPFlasher, but it still didn't seem to work unless I grounded the GPIO line.
Here are the results of option 3 above with the GPIO line NOT GROUNDED:
D:\XA32>tools\MSPFlasher\MSP430Flasher.exe -w "E3_MSP.hex" -v -b -s -z [RESET,VCC=3300]
* -----/|-------------------------------------------------------------------- *
* / |__ *
* /_ / MSP Flasher v1.3.20 *
* | / *
* -----|/-------------------------------------------------------------------- *
*
* Evaluating triggers...done
* Checking for available FET debuggers:
* Found USB FET @ COM7 <- Selected
* Initializing interface @ COM7...done
* Checking firmware compatibility:
* FET firmware is up to date.
* Reading FW version...done
* Setting VCC to 3300 mV...done
* Accessing device...done
* Reading device information...done
* Unlocking BSL memory...done
* Loading file into device...done
* Verifying memory (E3_MSP.hex)...
# Exit: 10
# ERROR: Could not reset device
* Resetting device (RST/NMI)...done
* Starting target code execution...done
* Disconnecting from device...done
*
* ----------------------------------------------------------------------------
* Driver : closed (EEM polling thread is already active)
* ----------------------------------------------------------------------------
*/
The application does not automatically start when MSPFlasher exits. If I cycle the power on the board after the above attempt, the board will boot up properly and appears to have programmed the BSL and application successfully.
Here are the results of option 3 above with the GPIO line grounded:
D:\XA32>tools\MSPFlasher\MSP430Flasher.exe -w "E3_MSP.hex" -v -b -s -z [RESET,VCC=3300]
* -----/|-------------------------------------------------------------------- *
* / |__ *
* /_ / MSP Flasher v1.3.20 *
* | / *
* -----|/-------------------------------------------------------------------- *
*
* Evaluating triggers...done
* Checking for available FET debuggers:
* Found USB FET @ COM7 <- Selected
* Initializing interface @ COM7...done
* Checking firmware compatibility:
* FET firmware is up to date.
* Reading FW version...done
* Setting VCC to 3300 mV...done
* Accessing device...done
* Reading device information...done
* Unlocking BSL memory...done
* Loading file into device...done
* Verifying memory (E3_MSP.hex)...done
*
* ----------------------------------------------------------------------------
* Arguments : -w E3_MSP.hex -v -b -s -z [RESET,VCC=3300]
* ----------------------------------------------------------------------------
* Driver : loaded
* Dll Version : 31400000
* FwVersion : 31200000
* Interface : TIUSB
* HwVersion : U 3.0
* JTAG Mode : AUTO
* Device : MSP430F5335
* EEM : Level 7, ClockCntrl 2
* Erase Mode : ERASE_ALL
* Prog.File : E3_MSP.hex
* Verified : TRUE
* BSL Unlock : TRUE
* InfoA Access: FALSE
* VCC ON : 3300 mV
* ----------------------------------------------------------------------------
* Resetting device (RST/NMI)...done
* Starting target code execution...done
* Disconnecting from device...done
*
* ----------------------------------------------------------------------------
* Driver : closed (No error)
* ----------------------------------------------------------------------------
*/
I get no errors with the GPIO line grounded, and the application automatically starts running when MSPFlasher exits.
Do you have any suggestions of how I may be able to do this. I would like to minimize our production steps by not requiring that they ground the GPIO line when programming a new part from TI. I understand and want all future JTag access to require grounding the GPIO line.
Thanks,
Greg Dunn
