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.

MSPM0C1104: How should I implement flah_BSL function on project of MSPM0C1104.

Part Number: MSPM0C1104
Other Parts Discussed in Thread: SYSCONFIG, UNIFLASH

Tool/software:

Hello, experts:

I want to implement bsl function to my project on MSPM0C1104, and I have some question as below.

1. Can I modify start address of application code by change the value of MAIN_APP_START_ADDR which define in flashBSL_defines.h as picture show below.

2. I can not find any syscfg file to define I2C in the flash_bsl project reference from SDK. Is it necessary to add syscfg to define I2C ?

  • I can not find my device on I2C bus, and it seems like bsl does not work correct.

    I do debug run,and I got an error message"Trouble Writing Memory Block at 0x41c00100 on Page 0 of Length 0x40: Flash download failed! ...
    File Loader: Verification failed: Target failed to write 0x41C00100
    GEL: File: C:\Users\834076\AppData\Local\Temp\ti_cloud_storage\flash_bsl_LP_MSPM0C1104_nortos_ticlang.out: Load failed."

    It's the reason why the BSL function does not work correctly to jump to application code?

  • Hello Jin Guan-Lin,

    Can I modify start address of application code by change the value of MAIN_APP_START_ADDR which define in flashBSL_defines.h as picture show below

    Yes, in your BSL project, modify the MAIN_APP_START_ADDR to match the memory location where the application will be placed in FLASH main memory.

    I can not find any syscfg file to define I2C in the flash_bsl project reference from SDK. Is it necessary to add syscfg to define I2C ?

      There is no sysconfig file for the BSL project.  The I2C and UART driver configuration for the BSL is configured in flashBSL.h.  Set the ->  #define I2C_INTERFACE ENABLE.  And keep in mind that after POR there is a 10 second timeout, which means you have 10 seconds to connect to the BSL else the device will enter low power mode.  This may also explain why you cannot connect to the BSL if you wait too long.

    I got an error message"Trouble Writing Memory Block at 0x41c00100 on Page 0 of Length 0x40: Flash download failed

    The issue here is most likely the debugger configuration to perform erase of both MAIN and NONMAIN memory sections. Refer to MSPM0 Bootloader (BSL) Implementation, section 2.2 step 3.

    *IMPORTANT* - The BSL boot configuration modifies the NONMAIN section by setting the static write protection to protect the BSL code memory from modification or erasure. After NONMAIN has been programmed for the very first time, any attempt afterwards to erase and re-program NONMAIN or MAIN, the programmer will erase NONMAIN but fail to erase MAIN memory due to the write protection.  This will cause a programming error, leaving NONMAIN blank and will brick the device on the next device reset because NONMAIN is blank  So, to prevent the device from being bricked, please make sure to ALWAYS perform a factory reset on the device each time before erasing and programming the FlashBSL program code.  Refer to the MSPM0 MCU developer's guide , section 7.1.2.

  • I disable "Perform CRC verification" to load image and then  I can not connect device anymore.

    I try to do the factory reset through uniflash but it still fail and the message as show below.

    [2025/5/2 下午5:15:58] [INFO] CS_DAP_0: GEL Output: Initiating Device Factory Reset
    [2025/5/2 下午5:15:58] [INFO] CS_DAP_0: GEL Output: Attempting CS_DAP connection
    [2025/5/2 下午5:15:59] [INFO] CS_DAP_0: GEL Output: Attempting SEC_AP connection
    [2025/5/2 下午5:15:59] [INFO] CS_DAP_0: GEL Output: Command Sent
    [2025/5/2 下午5:16:00] [INFO] CS_DAP_0: GEL Output: Start hardware Reset using NRST
    [2025/5/2 下午5:16:00] [INFO] CS_DAP_0: GEL Output: Initiating BOOTRST Board Reset
    [2025/5/2 下午5:16:00] [INFO] CS_DAP_0: GEL Output: Reset line asserted
    [2025/5/2 下午5:16:01] [INFO] CS_DAP_0: GEL Output: Reset line de-asserted
    [2025/5/2 下午5:16:01] [INFO] CS_DAP_0: GEL Output: Board Reset Complete
    [2025/5/2 下午5:16:01] [INFO] CS_DAP_0: GEL Output: Reset done
    [2025/5/2 下午5:16:01] [INFO] CS_DAP_0: GEL Output: SEC_AP Disconnect
    [2025/5/2 下午5:16:01] [INFO] CS_DAP_0: GEL Output: SEC_AP Reconnect
    [2025/5/2 下午5:16:29] [ERROR] CS_DAP_0: Trouble Reading Register SECAP_RCR: (Error -2131 @ 0x2020C) Unable to access device register. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 20.0.0.3298)
    [2025/5/2 下午5:16:29] [ERROR] CS_DAP_0: GEL: Error while executing GEL_DAPInit_SECAPCommand(): Target failed to read register SECAP_RCR at ('REG'::SECAP_RCR&0xFFFFU) [mspm0_cs_dap_init.gel:247] at GEL_DAPInit_WaitForResponse() [mspm0_cs_dap_init.gel:426] at GEL_DAPInit_SECAPCommand()

    Is there anyway to unblock low power mode?

  • This is the dev board I use.

  • Hello Jin Guan-Lin,

    Ok, let me check with our development tools engineer on this.

  • Hello Jin Guan-Lin,

    I wanted to follow up with you to see if your issue is resolved?