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.

MSP430F5249: BSL Scripter over UART going wrong

Part Number: MSP430F5249
Other Parts Discussed in Thread: MSP-FET

Hi,

I've been having problems lately trying to flash my program onto the MSP430F5249 using BSL Scripter over UART.

I have a bash script that creates the BSL entry sequence and then invokes the BSL scripter. Here's my code for the entry sequence:

function generateBSLEntrySequence
{
    #Initially set RST and TST to Low
    setLow $TST_PIN
    setLow $RST_PIN

    #Toggle TST
    sleep $OnePeriod
    setHigh $TST_PIN
    sleep $OnePeriod
    setLow $TST_PIN

    #Set TST to high
    sleep $OnePeriod
    setHigh $TST_PIN

    #Set RST high
    sleep $HalfPeriod
    setHigh $RST_PIN

    #Set TST low
    sleep $HalfPeriod
    setLow $TST_PIN
}

Here TST_PIN and RST_PIN are gpios that have been exported. OnePeriod=0.1 and HalfPeriod=0.05

Since this is in bash the periods are in units of seconds. My concern is whether the values are too big.

The BSL User Guide says the first high level of TEST pin must be at least tSBW, En. Looking at the datasheet tSBW, En has max value of 1µs.

Does that mean the TEST pin has be high for at least 1µs or a maximum of 1µs?

This script has worked previously but something is going wrong as the program doesn't work as expected and no changes have been made.

I am doing a reset of the micro-controller after running BSL.

Can someone help? Is there anything wrong with my script?

  • I just got a ruling on this very tSBW,EN question in this thread:

    https://e2e.ti.com/support/microcontrollers/f/166/t/730337

    The answer is that the positive pulse on TEST needs to be a minimum of the datasheet tSBW,EN maximum, but there is no maximum pulse period.  TI products like the old BSLDEMO program and the Rocket hardware device range from 110us to 15ms.  So your values are certainly way longer than you need, but if there is no maximum, in theory it shouldn't matter.

    But I'm really interested in your statement that this has worked for you before.  Can you tell me what hardware you are using to connect to the F5249?  Nominally, Scripter requires a Rocket, an MSP-FET, or a Launchpad and G2231 setup as described in slaa535a.pdf.  If you've found another setup that works, I'd appreciate knowing about it.   I've tried using a CP2102 USB-to-Serial adapter, generating the invoke sequence, then running Scripter, but the first thing Scripter does is bring DTR low, and keeps it there.  So the target chip is in perpetual reset, and of course no flashing takes place.  I hope you've found a way around this problem, and will share it.

  • We've got two gpios connected to the TST and RST pins as well a UART connection to the MSP430.

    Tanks for the clarification about tSBW,EN. My script should work.

    Does BSL Scripter require any special privileges to run on a Linux platform? Perhaps it needs write access or something like that?

     

  • I don't know about Linux permissions.

    What device are you using that has the GPIO pins?

  • I discovered that the RX_DATA_BLOCK wasn't successful after the MAS_ERASE. So I tried doing two RX_DATA_BLOCK commands and found that worked!

    You can assume, therefore, that RX_DATA_BLOCK will always succeed. You have to check that the data written is actually what was sent. Not ideal!

  • Sorry, I should have said "You CAN'T assume, therefore, that RX_DATA_BLOCK will always succeed."

  • Hi Jacob,

    is your question resolved? If so please mark the thread that solved your answer as "Resolved".

    Thanks,
    Andre

**Attention** This is a public forum