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.

MSP430F5507: MSP430 BSL source code

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

Hello 

I am working on MSP430f5507, currently, I am developing my application using CCS software, MSP-FET for the hardware connection. Now I am reading about the MSP430-BSL and would like to use BSL-scripter, my questions are as the following:


1. where can I find the CCS BSL source code for the MSP430f5507, actually I have downloaded the CCS_BSL_source from the TI website but when I extracted the files I did not find the CCS source code for the microcontroller I work on (MSP430f5507)!!!!

2. in the CCS_BSL_source file that I have downloaded, there is a released BSL image for MSP430F55xx, can I use MSP-FET to burn this image into the controller, because I think that the factory default code stored in the BSL section is for USB not for UART?

3. in the project I work on, the microcontroller is connected with a wireless device through the UART's TX and RX pins, can I use this wireless device and the BSL in the controller to send the image firmware and program the controller wirelessly, what I mean is; can I remap the pins used for BSL (which are P1.1 and P1.2) to be P4.5/RXD and P4.4/TXD??


I appreciate your support and any recommendations related you would provide.

Thanks in advance...

  • Take care whatever you doing about BSL, because in last BSL flash segment is stored JTAG fuse value (factory default 0FFFFh, unlocked). With locked JTAG and non-functional BSL device is bricked. Default factory BSL for all MSP430 devices with USB hardware module is HID version.

    If I remember right, all BSL sources can be found inside slau319 zip archive. F5507 belong to F550X family, but I guess that BSL is identical for F55XX.

    MSP-FET or any other can be used for updating BSL. BSL must be unlocked first. For me, doing this with MSP430Flasher is the right way. BSL flash area is some kind of special, and it does not support breakpoint debugging. UART BSL is based on timer, not on hardware UART module, so it is fixed to P1.1 an P1.2. With minimum modification it can be reruted (by great MSP430F5xx option of port maping) to P4.X. Using hardware UART is possible, but modification is more complicated than port maping.

  • Thank you

    Regarding the BSL sources, I have two BSL images (UART_BSL and USB_BLS) that I downloaded from TI website, my question is how to burn such images in the MCU's BSL section using code composer and MSP-FET (how to update the BSL in the controller), knowing that the images are in .txt extension or TI TXT format, as the file attached

     

    6254.BSL.00.07.05.04.txt
    @1000
    09 3C 12 3C FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F
    00 07 05 04 31 40 00 44 B0 13 BA 16 0C 93 00 24
    B0 13 F8 16 B0 13 5C 17 3D 90 AD DE 04 20 3E 90
    EF BE 01 20 03 3C 0C 43 0D 43 10 01 3C 41 3D 41
    10 01 0C 43 B2 D0 03 80 82 01 B2 B0 10 00 80 01
    05 24 2C D3 D2 D3 02 02 D2 D3 04 02 10 01 92 42
    02 24 44 01 1F 42 02 24 3F 50 06 00 82 4F 40 01
    C2 43 E0 FF 1F 42 02 24 3F 50 10 00 82 4F 44 01
    4C 43 10 01 B0 13 B8 11 12 20 4C 43 92 42 02 24
    44 01 1D 42 02 24 2D 53 82 4D 40 01 1F 15 0D 16
    CD 43 00 00 1F 42 02 24 3F 50 10 00 02 3C 6C 42
    10 01 82 4F 44 01 10 01 1B 15 B0 13 B8 11 0C 20
    4F 43 1D 15 0A 16 8A 4E 00 00 1D 15 0A 16 2B 4A
    0E 9B 03 24 5F 43 01 3C 6F 42 4C 4F 1A 17 10 01
    1B 15 B0 13 B8 11 0C 20 4F 43 1D 15 0A 16 CA 4E
    00 00 1D 15 0A 16 6B 4A 4E 9B 03 24 5F 43 01 3C
    6F 42 EB 3F 03 43 7B 15 08 4C 07 4D 04 4F 4C 43
    0A 48 0B 4D 06 48 06 5E 07 63 02 3C 1A 53 0B 63
    0B 97 03 28 1B 20 0A 96 19 2C 18 B3 08 2C 0E 46
    0F 47 3E 53 3F 63 0A 9E 08 20 0B 9F 06 20 7E 44
    0C 4A 0D 4B B0 13 E0 10 07 3C 3E 44 0C 4A 0D 4B
    B0 13 B8 10 1A 53 0B 63 4C 93 E0 27 74 17 10 01
    B0 13 B8 11 04 20 B0 13 64 17 4C 43 10 01 6C 42
    10 01 5B 15 0A 4E 08 4F B2 43 54 01 06 4C 07 4D
    07 3C 17 15 0E 16 6F 4E C2 4F 52 01 16 53 07 63
    0E 4C 0F 4D 0E 5A 0F 63 07 9F 03 28 07 20 06 9E
    05 2C B0 13 B8 11 ED 27 2C 42 04 3C 98 42 54 01
    00 00 0C 43 56 17 10 01 B2 90 A5 A5 00 24 10 01
    3B 15 08 4F 0A 4E 0E 4C 0F 4D 0E 5A 0F 63 09 3C
    1F 15 0A 16 69 4A 0A 4E 0A 8C 0B 48 0B 5A CB 49
    00 00 3E 53 3F 63 0F 9D 08 28 02 20 0E 9C 05 28
    B0 13 B8 11 ED 27 6C 42 01 3C 4C 43 38 17 10 01
    92 42 02 24 40 01 36 3F 03 43 6C 42 B0 13 B8 11
    0A 20 4C 43 92 42 02 24 44 01 1F 42 02 24 3F 50
    40 00 82 4F 40 01 10 01 B0 13 B8 11 0A 20 4C 43
    1F 42 44 01 3F F0 10 00 1F 52 02 24 3F 50 40 00
    38 3F 6C 42 10 01 F2 90 52 00 0E 24 39 20 5E 42
    0F 24 6E 83 09 24 5E 83 0B 24 5E 83 12 24 5E 83
    19 24 5E 83 20 24 28 3C B0 13 76 13 80 00 BE 13
    B0 13 76 13 B2 40 A0 01 04 24 B2 40 D0 00 06 24
    10 01 B0 13 76 13 B2 40 D0 00 04 24 B2 40 68 00
    06 24 10 01 B0 13 76 13 B2 40 8A 00 04 24 B2 40
    45 00 06 24 10 01 B0 13 76 13 B2 40 45 00 04 24
    B2 40 22 00 06 24 10 01 7C 40 56 00 B0 13 92 15
    10 01 0A 12 21 83 0F 43 81 43 00 00 06 3C 1F 93
    13 20 4C 4C 82 4C 0C 24 1F 53 B0 13 DE 15 0F 93
    F6 23 7C 90 80 00 F8 27 7C 40 51 00 B0 13 92 15
    6C 43 21 53 3A 41 10 01 4E 4C 0D 4E 47 18 0D 5D
    2F 93 0F 20 82 DD 0C 24 82 93 0C 24 03 20 7C 40
    53 00 EC 3F B2 90 05 01 0C 24 DE 2B 7C 40 54 00
    E5 3F 1A 42 0C 24 3A 50 03 00 0F 9A 03 20 81 4E
    00 00 D2 3F 1E 42 0C 24 2E 52 0F 9E 18 20 81 DD
    00 00 2C 41 B0 13 96 16 4C 93 0E 24 5E 42 0E 24
    7E F0 F0 00 7E 90 50 00 03 20 B0 13 46 12 B3 3F
    B0 13 76 13 5C 43 C5 3F 7C 40 52 00 BF 3F CF 4C
    0B 24 B2 3F 03 43 4C 43 80 00 92 15 B2 40 0E 24
    08 24 B2 40 0E 24 0A 24 B0 13 BE 13 B2 40 33 02
    68 01 82 43 60 01 B2 40 40 00 62 01 82 43 6A 01
    B2 40 3C 20 64 01 B2 40 20 00 42 03 B2 40 20 02
    40 03 F2 40 06 00 0A 02 E2 43 04 02 10 01 B2 40
    41 03 04 24 B2 40 A0 01 06 24 10 01 1B 15 1F 42
    08 24 5B 4F 03 00 5E 4F 01 00 5C 4F 02 00 0D 43
    B0 13 36 17 0C DE 0D DB 0E 4F 2E 52 6A 4F 7A 80
    10 00 1C 24 5A 83 14 24 5A 83 1D 24 5A 83 21 24
    6A 83 16 24 5A 83 20 24 5A 83 0D 24 5A 83 21 24
    5A 83 24 24 6A 83 27 20 5F 43 B0 13 5C 16 27 3C
    B0 13 DC 16 24 3C B0 13 60 11 1F 3C 4F 43 F5 3F
    B0 13 5E 10 1A 3C 0E 4C 0F 4D 4C 43 B0 13 4E 17
    16 3C B0 13 28 12 11 3C B0 13 28 17 B0 13 20 16
    0E 3C B0 13 28 17 B0 13 72 14 09 3C 2E 42 3C 40
    10 10 0D 43 F8 3F 7C 40 07 00 B0 13 10 17 1A 17
    10 01 5B 15 0A 4C 0B 4D 08 4C 09 4D 08 5E 09 63
    47 43 04 3C B0 13 10 17 0A 56 0B 63 0B 99 03 28
    30 20 0A 98 2E 2C 47 93 2C 20 B0 13 56 17 3C 53
    0D 4C 3D E3 0D 5D 0D 7D 0E 48 0F 49 0E 8A 0F 7B
    0D 9F 03 28 07 20 0C 9E 05 2C B0 13 56 17 06 4C
    36 53 02 3C 06 48 06 8A 1F 42 0A 24 1F 53 0E 46
    0C 4A 0D 4B B0 13 C0 11 47 4C 4C 93 D3 23 1F 42
    0A 24 FF 40 3A 00 00 00 0C 46 1C 53 B0 13 44 15
    CB 3F 56 17 10 01 1B 15 21 83 0D 43 3A 40 E0 FF
    0B 43 7E 4A 0F 4C 0F 5B 6F 4F 0E EF 0D DE 1B 53
    3B 90 20 00 F6 2B 0D 93 0E 20 B1 40 FF 7F 00 00
    02 3C B1 53 00 00 91 93 00 00 FB 37 B2 40 A5 A5
    00 24 4C 43 04 3C B0 13 5E 10 7C 40 05 00 21 53
    1A 17 10 01 0A 12 0A 4C 7C 40 80 00 B0 13 92 15
    4C 4A B0 13 92 15 0C 4A 47 18 0C 11 B0 13 92 15
    B2 43 54 01 0D 43 07 3C 5C 4D 0E 24 C2 4C 52 01
    B0 13 92 15 1D 53 0D 9A F7 3B 1D 42 54 01 4C 4D
    B0 13 92 15 47 18 0D 11 4C 4D B0 13 92 15 3A 41
    10 01 3F 40 00 02 92 42 50 03 52 03 92 52 04 24
    52 03 4C 4C 0C 5F 0C 5C 7E 40 0B 00 92 B3 42 03
    FD 2B 92 C3 42 03 92 52 04 24 52 03 B2 D0 80 00
    42 03 1C B3 04 28 0C EF B2 C0 80 00 42 03 0F 11
    0C 11 7E 53 EB 23 92 B3 42 03 FD 2B 10 01 0C 43
    B2 40 20 89 44 03 92 B3 44 03 FD 2B B2 F0 FE FE
    44 03 92 52 06 24 54 03 7E 40 09 00 92 52 04 24
    54 03 92 C3 44 03 92 B3 44 03 FD 2B 0C 11 B2 B0
    00 04 44 03 02 28 3C D0 00 01 7E 53 EF 23 10 01
    21 83 0F 41 B0 13 72 11 2C 92 04 20 6C 42 B0 13
    10 17 12 3C 1F 42 0A 24 FF 40 3A 00 00 00 1F 42
    0A 24 EF 41 01 00 1F 42 0A 24 DF 41 01 00 02 00
    3C 40 03 00 B0 13 44 15 21 53 10 01 3B 15 0A 4C
    0B 4D 09 4E 48 4F B0 13 0A 12 4C 93 0C 20 B2 90
    05 00 0C 24 08 28 0F 49 1E 42 0C 24 2E 82 0C 4A
    0D 4B B0 13 06 11 48 93 02 20 B0 13 10 17 B0 13
    00 12 38 17 10 01 B2 43 54 01 0F 43 04 3C D2 4F
    0E 24 52 01 1F 53 1F 92 0C 24 F9 2B 82 9C 54 01
    02 24 4C 43 10 01 5C 43 10 01 B2 40 80 5A 5C 01
    32 C2 03 43 3F 40 00 24 04 3C BF 40 4C 57 00 00
    2F 53 0E 41 0F 91 F9 2B 0C 43 10 01 1C 42 08 24
    1C 53 B0 13 F6 14 4C 93 03 20 4C 43 80 00 10 17
    7C 40 05 00 80 00 10 17 B0 13 42 17 B0 13 7C 13
    B0 13 C2 12 5C B3 FC 2B B0 13 CC 13 F9 3F 03 43
    1F 42 0A 24 FF 40 3B 00 00 00 1F 42 0A 24 CF 4C
    01 00 2C 43 80 00 44 15 6E 4E 5F 4F 05 00 47 18
    0F 5F 0E DF 10 01 4D EC 0D EC 8D 10 7C F3 8C 10
    10 01 82 43 00 24 B2 40 00 A5 02 24 10 01 B0 13
    84 10 80 00 10 17 3C 40 04 01 10 01 80 00 60 17
    80 00 68 17 1D 15 10 01 FF 3F 03 43 
    @17F0
    FF FF 42 10 A5 3C 5A C3 FF FF 00 10 
    @17FC
    FF FF FF FF 
    q
    

    Actually, I did not find any reference illustrating how to use code composer studio to update BSL code.

    Much appreciation for your help and support.

  • My advice is to use small & lite CLI MSP430Flasher for this...

    e2e.ti.com/.../1352458

    First you can dump factory original HID BSL to txt file, as it is described in second post on linked topic. And than download UART BSL as it is described in first post from  linked topic.

    If MSP430Flasher complain about wrong dll (not identical msp430.dll to one installed in CCS version) and request MSP-FET firmware update, just skip it.

  • Hello Mr zrno

    I have used MSP430Flasher to program the BSL section in the microcontroller with the UART_BSL image, also, I have read the BSL section to make sure that the image was written correctly.

    Now, I am facing another issue, when I invoke the BSL using the software method, I tried to communicate with the BSL but I did not get any response, the following points are to clarify the process:

    1. I have built a simple program that calls BSL directly as shown (just to test the process), I cleared the SYSBSLPE bit in SYSBSLC register to allow reading of BSL memory.

      

    2. I connected the P1.1 and P1.2 pins with a level shifter board (TX/RX pins) connected with the PC, then sent a simple BSL data packet using BSL-scripter, but there is no ACK or any response from the BSL

    3. After that, I debugged the simple program above then paused the execution to check the address of the program counter, it was at 0xf3ffe as the following!!

    where did I go wrong???

    And many thanks for your help and support.

  • Hi Jafar

    First you can try to make a the delay about 300ms before you send the BSL information into the device after you trigger the BSL by software to make sure the BSL initialization finished. 

    Second have you try to use hardware invoke?

    It is better to capture the TX, RX and a invoke signal by a logic analyzer here to do more analyze.

  • Hi Gary 

    I tried a delay of more than 300ms and the issue is still, 

    regarding the hardware invocation, the design of the board I work on did not consider the future needs for updating firmware, which means there are no output connections with RST and TEST pins, consequently, using software invocation became essential in our case.

    I have some questions related to the software invocation :

    1. after calling the 0x1000 location to perform the invocation process, will the program counter remain in the BSL section (will the BSL keep waiting for a packet)?

    2. why the program counter jumps to an unknown address (0xf3ffe)?? I noticed that when I paused the program during the debug!!

    I appreciate your quick response 

  • Hi Jafar  

    Sorry for the late reply due to the holiday. 

    regarding the hardware invocation, the design of the board I work on did not consider the future needs for updating firmware, which means there are no output connections with RST and TEST pins, consequently, using software invocation became essential in our case.

    I want you to try the hardware just want to verify the UART BSL image you download into the device can works.

    1. after calling the 0x1000 location to perform the invocation process, will the program counter remain in the BSL section (will the BSL keep waiting for a packet)?

    Yes, it will jump to the 0x1000 but if there are some thing wrong with the BSL image that will make the PC point to a wrong place like you see 0xf3ffe.

  • Hi Gary 

    Thank you for the following up.

    I want you to try the hardware just want to verify the UART BSL image you download into the device can works.

    As you have mentioned there is a problem with the previous UART BSL image.

    I am working now on the customized version, the UART_BSL is working correctly, I just trying to remap the TX/RX pins used during the communication with the BSL, I have modified the code to make P4.5 as RX pin and P4.4 as TX pin, but when I debug the code and try to send a data packet to the BSL, I did not get any response, also, it seems that the MCU did not recognize any received character (by debugging).

    The changes I made are described in the image below

     

    So, where did I go wrong?

  • This is just a part of needed modification. You must configure P4, remap TA0.0 (present on P1.1) and TA0.1 (present on P1.2) to pins of P4. It is explained in Chapter 13 Port Mapping Controller of slau208 (MSP430x5xx and MSP430x6xx Family User's Guide). I guess that some examples you can find here on e2e, search for it.

    Here is example how I remapped both UART RX/TX pins in assembler...

    https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/737460/msp430f5529-uart-programming/2723075

    You should do this but with timer pins.

  • Hi zrno

    Thanks for the following up 

    referring to the user manual and datasheet, there are no options to select TA0.0 or TA0.1 to remap the pins at P4, please see the below image;

    on the other hand, If the restrictions above can not be changed, I am thinking of changing the timer used (from timerA to timerB), then using TimerB by remapping it with P4, does this will work?? if so, what should be taken into consideration?

**Attention** This is a public forum