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.

Custom BSL frequency for F5528

Other Parts Discussed in Thread: MSP430F5528

All:

As stated in SLAA452B - "USB Field Firmware Updates on MSP430 MCYs" in heading 6.1

"If the clock that is applied to the MSP430 device’s XT2 oscillator is any frequency other than one of those that the BSL is able to auto-detect (4 MHz, 8 MHz, 12 MHz, or 24 MHz), then it is necessary to customize the value in the BSL and download this new BSL image to each MSP430 device."

As stated, I downloaded SLAA450.zip, copied the 5xx_6xx_BSL_source to c:\MSP430.

Using IAR embedded workbench, I found the necessary workspace in

"c:\MSP430\5xx_6xx_BSL_source\MSP430F552x_USB"

I then made changes to SPEED_1...SPEED_4  and SPEED_1_PLL...SPEED_4_PLL in "BSL_Device_File.h"

I was able to compile and download the updated BSL to my 5528 device.

However, I found that the "branch" to 0x1000 did not work  - it needed to be a "branch" to 0x1014.

I confirmed this by looking at the file lnk430F5529_BSL_AREA.xcl

Is there a reason this changes for a "custom BSL file" that is downloaded to the target via IAR download?

 

 

 

  • Additional question:

    If a change is made to the BSL_Device_File.h for frequency, am I required to also change the USB_VID and USB_PID information?

    The comment in the file states:

    " // Vendor ID (VID) for device, TI (MSP430)=0x2047

     // You can use is only in this example.

    // You can order your own VID at www.usb.org "

  • I found a related post: http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/139683.aspx

    However, I still have several questions:

    1. Why do I need to branch to 0x1014 to get my updated BSL to work?

    2. Why is the area from 0x1000 to 0x100F populated with FFFF?

    3. Am I required to change the USB_VID when using BSL changed only to support a different frequency?

     

  • Todd Anderson78572 said:

    If a change is made to the BSL_Device_File.h for frequency, am I required to also change the USB_VID and USB_PID information?

    XT2 used for BSL is not related to VID / PID, so there is no need for change it. VID / PID is linked to driver on PC side.

  • I pulled down the BSL code from the TI website. (SLAA450.zip)

    It did have a workspace for the MSP430F552x_USB under 5xx_6xx_BSL_Source. When I made the changes for the different frequency and compiled, I was able to download that into the BSL area.

    However, one file, BSL430_Low_Level_Init.s43, was excluded from the workspace's build. It has a jump instruction that should go at 0x1000 and jump to the start of the BSL. With that file excluded, the jump is not there, and the start of the BSL is at 0x1014. I am able to get that to work. However, I am having difficulty including the Jump at 0x1000.

    So, for now, I can actually do a "call" from a different project to 0x1014, which starts up BSL and allows the TI example executeble to download new code into the device via USB.

    Simply "unexcluding" BSL430_Low_Level_Init.s43 from the build did not work - for some reason, the locations 0x1000 - 0x100F are not being update with any contents.

  • Any idea why the file "BSL430_Low_level_Init.s43 was "excluded" from build on the SLAA450.zip?

    This file is in the USB-based BSL, which is used to support F5529.

  • Is the MSP430F552x BSL based on the SLAA450 zip file, or is a separate build?

    I would hope that using the default F552x BSL on the SLAA450 zip, I would be able to duplicate what is shipped with the MSP430F5528 part. Again, why did was the "BSL430_Low_Level_Init.s43" file excluded from the IAR build in SLAA450.zip?

  • I have tried in vain to add a branch at 0x1000 to the program entry. Here is my latest attempt on the IAR Tools:

    In lnk430F5529_BSL_AREA.xcl, I have made the following changes.

    1. In BSL Memory area,

    was

    -Z(CODE) ZAREA=1000-100F

    -Z(CODE) ZAREA_CODE=1014-17FF

    -Z(CODE) BSL0=1010-11FF

    now

    -Z(CODE) ZAREA=1002-100F
    -Z(CODE) ZAREA_CODE=1000-1001,1014-17FF

    -Z(CODE) BSL0=1000-11FF

    2. In Code, added

    -Z(CODE) BSLENTRY=1000-1001

    Also, changed  

    -P(CODE) CODE=1014-17FF

    to

    -P(CODE) CODE=1000-1001,1014-17FF

    I have also added the following assembly language file - BSL430_Branch.s43:

    //**************************************************************
    // BSL Initial Branch
    //**************************************************************

    #define XRSEGBSLENTRY RSEG BSLENTRY:CODE:NOROOT(1)

                  MODULE  ?bslentry 
                 
                  PUBLIC __bsl_entry
                              
                  EXTERN __program_start
                 
                  RSEG     BSLENTRY
                  
    __bsl_entry   JMP    __program_start            ; BSL ENTRY AREA

                  END

    Result - still no code at address 0x1000 other than 0xFF !

    Are there any IAR Tools Gurus who can help? [I am using IAR Embedded Workbench 5.51.6]

  • I have had some email exchanges with IAR on this. I am simply trying to add a jump instruction at 0x1000 that will get me to my start location at 0x1014. We have a map file that shows the branch at 0x1000, but when I try updating the BSL (for the F5528) with the FET programmer, the jump instruction at 0x1000 is excluded. Everything else associated with the custom BSL download appears to work.

    For now, I have a work-around, and that is to branch to 0x1014 from my code (after closing USB-related stuff).

    I will keep trying to squeeze in the jump instruction as time permits me to work on this...

**Attention** This is a public forum