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.

MSP432 software bsl invocation



Hi,

I tried to get the software bsl invocation running, but it is not working. The intention is to use the UART for software update.

Calling

BSL_INVOKE(BSL_DEFAULT_PARAM);

out of the application starts the BSL and successfully synchronize with the BSL Scripter 3.1.0.0 on the pc side. But afterwards the BSL is not responding to the scripter commands anymore.

Using a new or erased (FACTORY_RESET) mcu the BSL works fine after hard reset.

Are there any other preparations to do to call BSL_INVOKE?

Regards,

Dirk

  • Hi Dirk,

    I'm not sure what those commands are since according to the BSL user's guide, these commands are unlisted. Section 2.1 of the user's guide has explanations for the MODE command which initializes the selected communication channel for a BSL session and invokes the BSL. Example commands are included which initializes UART and the BAUD Rate for MSP432. 

    http://www.ti.com/lit/ug/slau655/slau655.pdf

    Sincerely,

    Sean

  • Hi Sean,

    thanks for the responds, but there was a misunderstanding based on too short explanation perhaps.

    I tried two approaches (according SLAU622 section 4.3) to invoke the BSL on msp432

    - new or erased (FACTORY_RESET by jtag or flashmailbox) mcu after reset

    - called by the application software running on the mcu (section 4.3.1 and BSL section in the msp432p401r.h header file)

    The hardware setups as well as the script file for the BSL-Scripter are completely the same for both approaches!

    Regards,

    Dirk

  • Hi Dirk,

    I'm still not seeing any reference to the BSL_INVOKE command as valid, section 4.3.1 has the commands listed for the software invoke. And yes, as stated in the document, the 32-bit argument is formatted the same for both software invoke, and hardware using Boot Override Flash Mailbox.

    Sincerely,
    Sean

  • Hi Sean,

    BSL section in msp432p401r.h:

    /******************************************************************************
    * BSL *
    ******************************************************************************/
    #define BSL_DEFAULT_PARAM ((uint32_t)0xFC48FFFF) /*!< I2C slave address = 0x48, Interface selection = Auto */
    #define BSL_API_TABLE_ADDR ((uint32_t)0x00202000) /*!< Address of BSL API table */
    #define BSL_ENTRY_FUNCTION (*((uint32_t *)BSL_API_TABLE_ADDR))

    #define BSL_AUTO_INTERFACE ((uint32_t)0x0000E0000) /*!< Auto detect interface */
    #define BSL_UART_INTERFACE ((uint32_t)0x0000C0000) /*!< UART interface */
    #define BSL_SPI_INTERFACE ((uint32_t)0x0000A0000) /*!< SPI interface */
    #define BSL_I2C_INTERFACE ((uint32_t)0x000080000) /*!< I2C interface */

    #define BSL_INVOKE(x) ((void (*)())BSL_ENTRY_FUNCTION)((uint32_t) x) /*!< Invoke the BSL with parameters */


    /******************************************************************************


    Regards,
    Dirk
  • Hi Dirk,

    Do you have a MSP-BSL Programmer interfacing between the PC and the device after invoking BSL?

    Sincerely,
    Sean
  • Hi Sean,

    I'm not using a MSP-BSL programmer in between, because the BSL is working fine with new or erased msp's and the current hardware setup (pc rs232 with a level shifter to the uart of the msp). Only in case of the software invocation of the BSL, it is not responding after a successful synchronization with the BSL-scripter.

    Regards,
    Dirk

  • Hi Chris,

    Your last post is lost somewhere!?

    The SLAA659A paper and examples dealing mainly with the flashmailbox after a reboot. With this approach the BSL is working fine.
    My intension was to start the BSL directly out of an application (running on the msp) for a field update. The section 4.3.1 of the SLAU622 give the impression that I can simply call the BSL with the descripted function.

    In my case the application (TIRTOS with driverlib) is calling BSL_INVOKE within a task. That means, the BSL is running with TIRTOS in the back. Also the UART is OPEN for communication (sharing the same UART for communication and BSL).

    Back to my question in the first post - Are there any other preparations to do to call BSL_INVOKE?

    Regards,
    Dirk
  • Dirk,
    My apologies about the confusion. I am still trying to get some resolution on what is required. If you feel up for it would you mind trying the following and see if it is applicable (not the custom piece just the PCM setting)?

    // Enter to BSL
    // VCORE needs to be set to PCM_AM_LDO_VCORE0 before invoking the BSL, if not BSL will generate a faultISR
    MAP_PCM_setPowerState(PCM_AM_LDO_VCORE0);
    MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P1, GPIO_PIN0);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0);
    ((void (*)())BSL_ENTRY_FUNCTION)((uint32_t)CUSTOM_BSL_PARAM); // Call the BSL with given BSL parameters

    Regards,
    Chris
  • Hi,

    Closing this thread for the time being, feel free to re-open if needed.

    Sincerely,
    Sean
  • Hi Dirk,

    did you get it to work?
    How and where are you calling the API "BSL_INVOKE(...)"?

    Thanks,

    Michael

**Attention** This is a public forum