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.

MSP430F67791A: BSL problem observed

Part Number: MSP430F67791A
Other Parts Discussed in Thread: MSP430F5324, MSP-FET, MSP430FR5729, MSP430G2231

Hello,

I have come across issues while programming MSP430F67791A flash on my custom board using on chip UART BSL.

I have used   P2.0( Data transmit ) , P2.1( Data receive) , TEST , RST pins for boot loading. And launch pad hardware is used between the BSL Scripter s/w and my custom board.I have followed TI's BSL documents and soft tools listed ti.com. My two observation and queries are as under:

1) I was not able to program the chip using bsl smoothly ( say out of 10 times i am able to do it 2 times successfully) . In the failed scenario , Launch Pad's red and green led blink continuously and some times Red led stops blinking and Green led glows very little.Even though i press the button on launch pad after connection , behaviour remains same.I have tried on two MSP430F67791A boards.

Interestingly i have another custom board based on MSP430F5324 with similar BSL connection, which doesn't have such issues.With the same launch pad and bsl connection , it was getting programmed smoothly using UART BSL.

any suggestion plz.

2) In my application i store some value at info memory 0x1800. so my .TI-TXT  file has that portion of code .when i pass the .txt file to BSL Scripter command , it says can not write to that location and exit.

what is the solution to this.

experiment_MSP430F67791A.txt
@1800
17 
@C000
81 00 00 9C 8C 00 02 1C 3E 40 02 00 3F 40 00 00
B0 13 6C C0 8C 00 00 1C 8D 00 94 C0 3E 40 01 00
3F 40 00 00 B0 13 88 C0 B0 13 30 C0 B0 13 84 C0
B2 40 80 5A 5C 01 40 18 5F 42 00 1C 4F 4F 40 18
82 4F 02 1C 40 18 D2 42 00 18 00 1C 0C 43 10 01
1B 14 CA 0C 06 3C FA 4D 00 00 AA 00 01 00 3E 53
3F 63 0B 4E EB 0F F7 23 1A 16 10 01 1F 15 0F 16
CE 0C EE 0F 04 3C CC 43 00 00 AC 00 01 00 DC 0E
FA 23 10 01 80 00 90 C0 80 00 50 C0 FF 3F 03 43
80 00 8C C0 FE 
@FFFE
00 C0 
q

Regards,

Ars

 

  • Hi Ars,

    Which LaunchPad are you using? I'm assuming you're using the on-board debugger on the LaunchPad. Or are you using the MSP-FET? The issue you're facing is probably due to the fact that you're not using the MSP-FET for BSL programming which is recommended. Take a look at Table 1 in the MSP Debuggers User's Guide for more details.

    Regards,

    James

  • Thanks for your comment.

    James Evans said:
    Which LaunchPad are you using? I'm assuming you're using the on-board debugger on the LaunchPad.

    The launchpad i am using is,  for connecting required signals to the mentioned mcu chip on my custom board for BSL.  the launchpad is  MSP-EXP430G2.

    I have followed TI application report SLAA535.same setup working for other msp430 mcu.

    MSP430 Target here  is my msp430f67791A board

    James Evans said:
    you're facing is probably due to the fact that you're not using the MSP-FET for BSL programming which is recommended

    The above setup is working very well for MSP430F5324 , MSP430FR5729 etc .And already 8K+ chip has been programmed using this setup.

    We were looking for low cost solution for Field F/w up-gradation...so we have choosen the launchpad interface......NOT MSP-FET. We use msp-fet for debugging / development in our lab.

    Any software changes required in the chip on launchpad for bsl interface to msp430f67791A ?

    From my original post ...........

    In my application i store some value at info memory 0x1800. so my .TI-TXT  file has that portion of code .when i pass the .txt file to BSL Scripter command , it says can not write to that location and exit. What could be the possible cause ?

    regds,

    Ars

  • I have missed the setup( from TI application report  sla535a ) in my previous post. MSP430 Target  here  is custom  msp430f67791A  board

  • Hello James / TI Team,

    Please can i have any update on the topic.

    Rgds,

    Ars

  • Hello TI Team,

    Sorry to say i have not received any solution to this for quite sometimes now.Can you check / confirm.. with above mentioned launchpad setup , is it possible or not to upgrade firmware of MSP430F67791A via uart BSL.

    In case "no" please revert back so that we can drop that part in that particular project.

    Rgds,

    Ars

  • Hi Ars,

    Ars said:
    I have followed TI application report SLAA535.same setup working for other msp430 mcu.

    It was unclear how you were using the LaunchPad for BSL programming in your earlier posts, so thanks for mentioning this app note.

    Ars said:
    In the failed scenario , Launch Pad's red and green led blink continuously

    I found this in SLAA535. You may want to check why the BSL invocation is failing.

    If the BSL invocation fails, the red and green LEDs will blink continuously in an alternating pattern. The MSP430G2231 on Launchpad can only generate the BSL Entry Sequence once at the beginning after reset. Therefore, in order to regenerate the BSL Entry sequence, it is necessary to reset the MSP430G2231 on the Launchpad by pushing the S1 reset button.

    For more details about why BSL invocation can fail, see Section 1.3.1.1.1 Factors That Prevent BSL Invocation With Shared JTAG Pins in the MSP430™ Flash Devices Bootloader (BSL) User's Guide.

    Ars said:
    is it possible or not to upgrade firmware of MSP430F67791A via uart BSL

    If robustness is required, then I would recommend using the MSP-FET or BSL-ROCKET to ensure all devices can be programmed consistently. Keep in mind that the BSL approach in SLAA535 does not use an official BSL hardware tool, so it will have inherent limitations.

    Regards,

    James

  • Hello James,

    Thanks for your suggestions.

    James Evans said:
    For more details about why BSL invocation can fail, see Section 1.3.1.1.1 Factors That Prevent BSL Invocation With Shared JTAG Pins in the MSP430™ Flash Devices Bootloader (BSL) User's Guide.

    I checked few of them...like VCC is good 3.3V for me. And TMS and TCK  pins are pulled high thru' 47K Ohm.But still no success.

    James Evans said:
    If the BSL invocation fails, the red and green LEDs will blink continuously in an alternating pattern. The MSP430G2231 on Launchpad can only generate the BSL Entry Sequence once at the beginning after reset. Therefore, in order to regenerate the BSL Entry sequence, it is necessary to reset the MSP430G2231 on the Launchpad by pushing the S1 reset button.

    those 2 leds (red & green) do not stop blinking.Tried pressing "S1" key on launchpad or re-inserting the USB cable from launchpad to pc.But it did not help.

    Other method I tried , was jumping to bsl location from my application code by pressing a tactile switch(just to test).

    __disable_interrupt();
    ((void (*)())0x1000)();

    It did stop.. Red and Green led blinking on launchpad but next processes on bsl scripter  FAILED. i tried several times but no success.

    James Evans said:
    If robustness is required, then I would recommend using the MSP-FET or BSL-ROCKET to ensure all devices can be programmed consistently.

    OK , let me try once with MSP-FET !

    Rgrds,

    Ars

  • Hi Ars,

    Ars said:
    I checked few of them...like VCC is good 3.3V for me. And TMS and TCK  pins are pulled high thru' 47K Ohm.But still no success.

    Thanks for checking that. Make sure the JTAG interface matches the recommendations in the MSP430 Hardware Tools User's Guide.

    Ars said:
    Other method I tried , was jumping to bsl location from my application code by pressing a tactile switch(just to test).

    That probably worked to enter BSL mode, but the BSL scripter may not be able to handle that especially if it's waiting on a response after the BSL invocation sequence.

    Ars said:
    It did stop.. Red and Green led blinking on launchpad but next processes on bsl scripter  FAILED. i tried several times but no success.

    Was there a specific error or error code?

    Ars said:
    OK , let me try once with MSP-FET !

    That will help us know that the device can properly enter BSL mode. Let us know if that works.

    Regards,

    James

  • Hi James,

    Thanks for your input.

    James Evans said:
    Was there a specific error or error code?

    It  was [E6] in reply at the first scripter  command's response.checked it enabling verbose mode in script.

    Well.... My other method ( i.e a sort of workaround using software code )....which was not working yesterday.....worked today by following these sequence with same  MSP-EXP430G2 launchpad:

    a. My Custom board setup with Launcpad is same as that in my intial posts.

    b. From MSP430F67791A application code ..jumped to bsl location

    c. Then press the "S1" key on launchpad.Red & Green leds stopped blinking.

    d. Then i call bsl scripter with required file to load. It works.Program loaded to the chip !

    as we are at the edge of product trial delivery, this the best method i could stick to.What i can sense is that ...it is the BSL entry sequence that is not happening in the case of hardware method (using TEST & RST pins )

    For Hardware method .....i will have to give a try with MSP-FET in some time.

    Sorry to say.....can you pls help to get one of question from first post of mine on the topic. It is :

    "In my application i store some factory value at info memory 0x1800. so my .TI-TXT  file has that portion of code .when i pass the .txt file to BSL Scripter command , it says can not write to that location and exit."

    is there anyway to write that portion too along with main code using scripter.

    And....is there any command that i can include in the script.txt .....so that after loading the program file chip can be reset automatically instead of doing power cycle.

    Thanks,

    Ars

  • Hi Ars,

    I'm glad to hear you've found a workaround with your setup.

    Ars said:
    "In my application i store some factory value at info memory 0x1800. so my .TI-TXT  file has that portion of code .when i pass the .txt file to BSL Scripter command , it says can not write to that location and exit."

    You're probably using the MASS_ERASE command. For MSP430 Flash and MSP432P4 devices, this command erases only the main memory of the device, not the information memory. To erase the information memory, use the ERASE_SEGMENT or ERASE_SEGMENT_32 command.

    I hope that helps.

    Regards,

    James

  • Hi James,

    James Evans said:
    You're probably using the MASS_ERASE command.

    I am not using this command.

    In my case it is  the following line in script throwing that error while writting :

    RX_DATA_BLOCK  experiment_MSP430F67791A.txt


    The .TI-TXT file(experiment_MSP430F67791A.txt) that  i used for to test  is :

    @1800
    17 
    @C000
    81 00 00 9C 8C 00 02 1C 3E 40 02 00 3F 40 00 00
    B0 13 6C C0 8C 00 00 1C 8D 00 94 C0 3E 40 01 00
    3F 40 00 00 B0 13 88 C0 B0 13 30 C0 B0 13 84 C0
    B2 40 80 5A 5C 01 40 18 5F 42 00 1C 4F 4F 40 18
    82 4F 02 1C 40 18 D2 42 00 18 00 1C 0C 43 10 01
    1B 14 CA 0C 06 3C FA 4D 00 00 AA 00 01 00 3E 53
    3F 63 0B 4E EB 0F F7 23 1A 16 10 01 1F 15 0F 16
    CE 0C EE 0F 04 3C CC 43 00 00 AC 00 01 00 DC 0E
    FA 23 10 01 80 00 90 C0 80 00 50 C0 FF 3F 03 43
    80 00 8C C0 FE 
    @FFFE
    00 C0 
    q

    James Evans said:
    To erase the information memory, use the ERASE_SEGMENT or ERASE_SEGMENT_32 command.

    Noted

    And....is there any command that i can include in the script.txt  or any other means.....so that after loading the program file chip can be reset automatically instead of doing manual power cycle.

    Thanks,

    Ars

  • Hi Ars,

    I'll need a few days to look into this further. I'll reply no later than next Wednesday with an update.

    Regards,

    James

  • Hello Ars,

    Ars said:
    In my case it is  the following line in script throwing that error while writting

    You'll probably need to use the TOGGLE_INFO command to program the information memory. I would encourage you to read through the Bootloader (BSL) Scripter User's Guide.

    Ars said:
    And....is there any command that i can include in the script.txt  or any other means.....so that after loading the program file chip can be reset automatically instead of doing manual power cycle.

    In Table 1 in the Bootloader (BSL) Scripter User's Guide, there's a REBOOT_RESET command listed, but it's not supported for the F6xx devices.

    Regards,

    James

  • Thanks James ...helping me to refer this document.

    James Evans said:
    You'll probably need to use the TOGGLE_INFO command to program the information memory. I would encourage you to read through the Bootloader (BSL) Scripter User's Guide.

    TOGGLE_INFO command is used to toggle the INFOA lock to either protect or unlock the INFOA segment on MSP430F5xx and MSP430F6xx MCUs.

    One more point .. that i have noticed in the user guide , page 14 ....did not work for me. as i have mentioned in earlier post that :

    RX_DATA_BLOCK  experiment_MSP430F67791A.txt    command response was FAIL .

    RX_DATA_BLOCK

     

    Just a guess...probably i have to use  ERASE_SEGMENT 1800 command before executing RX_DATA_BLOCK command in the script.

     

    James Evans said:
    In Table 1 in the Bootloader (BSL) Scripter User's Guide, there's a REBOOT_RESET command listed, but it's not supported for the F6xx devices.

    Can I use  this command  SET_PC { ADDRESS }  and passing  address as RESET Vector address ( assuming it will be Fixed 0xFFFE ) , in my script file as  last command  .......so that after loading the program file chip can be reset automatically instead of doing manual power cycle.

     

    Rgds,

    Ars

  • Hello Ars,

    Ars said:

    TOGGLE_INFO command is used to toggle the INFOA lock to either protect or unlock the INFOA segment on MSP430F5xx and MSP430F6xx MCUs.

    One more point .. that i have noticed in the user guide , page 14 ....did not work for me. as i have mentioned in earlier post that :

    RX_DATA_BLOCK  experiment_MSP430F67791A.txt    command response was FAIL .

    Here's what I would do assuming nothing important (e.g. factory TLV data) is stored in INFO A segment. You should use two independent .txt files: one for INFO, one for main memory. Break the programming into two parts like this.

    TOGGLE_INFO

    ERASE_SEGMENT 0x1800

    RX_DATA_BLOCK info_memory_only_data.txt

    TOGGLE_INFO

    MASS_ERASE

    RX_DATA_BLOCK main_memory_only_data.txt

    Ars said:
    Can I use  this command  SET_PC { ADDRESS }  and passing  address as RESET Vector address ( assuming it will be Fixed 0xFFFE ) , in my script file as  last command  .......so that after loading the program file chip can be reset automatically instead of doing manual power cycle.

    This seems reasonable. Just be mindful about FAQ #2 in the BSL Scripter user's guide.

    Regards,

    James

  • James Evans said:
    Here's what I would do assuming nothing important (e.g. factory TLV data) is stored in INFO A segment. You should use two independent .txt files: one for INFO, one for main memory. Break the programming into two parts like this.

    Ok ..James ....as understand we can't upload one single file(containing both CODE + INFO section ) using the BSL , we will try checking later on ..with the partial workaround solution of yours by dividing the .txt file into two.

    Thanks and appreciate  your support on the topic.

    TI may pls close the Thread for now.

    Rgds,

    Ars

**Attention** This is a public forum