This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5172: How do I properly use MSP-FET for use with BSL

Part Number: MSP430F5172
Other Parts Discussed in Thread: MSP-FET,

Hi Experts,

Good day.

How can I work with BSL protocol using MSP-FET? is MSP430.dll enough for me?
But at this stage, I want to provide programming from my software myself.
I am targeting MSP430F5172 and I found something about setting the speed to 9601 but if there is a document where all this is described in relation to the MSP-FET, I would be glad to read it.

I need to make a simple production application. Where the worker needs one button and one status is programmed successfully or with an error.
My 2nd question is how do I properly use MSP-FET for use with BSL?



Keep safe.

Regards,

Josel

  • Hi Josel,

    Here are some resources to help.

    The MSP430 Flash Devices Bootloader Guide

    The User's Guide for the MSP-FET

    In the device User's Guide under section 1.10 (version Q) the BSL is explained for this device.

    Regards,

    Luke

  • Hi Luke,

    Thanks for the docs, they are important going forward, but my questions are related to msp430.dll.
    In the file msp430.h in the description of MSP430_Initialize
    written:
    When -3 was returned and calling MSP430_FET_FwUpdate(), the file CDC.log must exist in the directory of the executed binary and the content must be the string "True" without a newline. This file signals that a CDC driver is installed and prevents the update from making the MSP-FET430UIF unusable.
    Should I have this file when using NULL in the MSP430_FET_FwUpdate parameter?

    Keep safe.


    Regards,

    Josel

  • Hi Josel,

    The file is letting the API know that there are CDC drivers on the host machine. The MSP-FET is classified as a CDC (Communication Device Class) for USB connection.

    Make sure you have the appropriate CDC drivers and include the CDC.log file. Here is a document on the MSPDebug Stack Developer's Guide which may further assist in your project. I would also recommend looking at the MSPFlasher if you need a working example of software that programs an MSP430 using the MSP-FET.

    Regards,

    Luke

  • Hi Luke,

    Good day.

    The customer has three additional queries.

    I'm not trying to repeat the MSP430Flasher, I need to combine SBW + BSL into one very big button.

    1. That is, the CDC.log file must exist even if the source is an image in MSP430.dll, right?

    Thanks for the SLAU656D.
    I see some new functions, in particular MSP430_SetTargetArchitecture() they are in my DLL version
    MSP430.dll Version: 3.15.1.1
    MSP-FET FwVersion: 3.12.0.0
    MSP-FET HwVersion: U 3.0
    But I didn't find a header file for it. I am using msp430.x file from msp430.dll_developer_package_rev_3.05.000.001 package

    2. Can you give me an updated version of this package?

    3. And at this stage, I need a hint on how I can find out if my target is physically connected, or if its JTAG is blocked. Is there any way to determine this?


    Keep safe


    Regards,

    Josel

  • Hi Josel,

    1. You do need the CDC.log file no matter the source image.

    2. The latest DLL can be found here https://www.ti.com/tool/download/MSPDS 

    3. From Hardware Tools User's Guide

    Above are connections for SBW, the BSL invoke would need to be triggered in order to start programming. The MSP-FET would do this with our programs automatically but if you want your own program you would need to invoke the BSL. MSP430 Flash Device's Bootloader User's Guide Section 1.3 BSL Invocation will help with the BSL invoke process.

    I don't really understand the purpose behind your project, it seems it would be simpler to just use the existing tools like the MSP-FET and Uniflash to program a device and not require a new feature.

    Regards,

    Luke

  • Hi Luke,

    Customer responded.

    Thank you for the detailed answer, but apparently, I could not convey to you the meaning of my actions.
    There is an assembler, who does not understand how the microprocessor works, but he knows how to press the button.
    It is necessary to program the data in the product, check how correctly they are programmed, and protect this data from reading.
    It's a lot of work, and mistakes can be made.
    If there is one action and one result, the errors are minimal.

    Actually, I finished the program, but I'm still interested in the question of SBW.
    The chip is connected via SBW JTAG.
    How can I find out if it has already been programmed and has JTAG locked is it defective, or is there a connection problem?
    MSPFlasher reports this, and I'm wondering how it determines this.

    Please advise.

    Keep safe.


    Regards,

    Josel


  • Hi Joselito,

    Luke is out of office so I will jump in here.

    There is a method of checking the status of the fuse described in the MSP430 Programming With JTAG Interface User's Guide (SLAU320). The MSP-FET itself should be doing this as part of the JTAG Entry sequence and will report back if it cannot connect due to a blown fuse. 

    Best Regards,
    Brandon Fisher

  • Hi Luke and Brandon,

    Good day.

    Thanks, already understood that it occurs in DLL.
    So far, I've done everything I planned.

    I have some remarks about the work of the DLL.
    MSP430_Configure(UNLOCK_BSL_MODE, ENABLE);
    will not change SYSBSLC immediately, but set some flag that is parsed after.
    and here is the problem.
    If for example do
    MSP430_VerifyMem(0x1000, ...
    then the result will be incorrect, but if before doing this
    MSP430_ReadOutFile(0x1000, ...
    then after that
    MSP430_VerifyMem(0x1000, ...
    will already be correct.
    This flag itself is apparently needed to restrict the address field at the program level, but you should check that it is taken into account in each access function.
    I solve this issue with access
    MSP430_Memory(0x182,
    but this should be fixed in the DLL.

    Thanks for your support.
    All my questions were resolved.

    Keep safe.

    Regards,

    Josel

**Attention** This is a public forum