MSPM0G3105: Programming via UART with Bootloader

Part Number: MSPM0G3105
Other Parts Discussed in Thread: UNIFLASH, , MSPM0G3507, MSPM0G3107, SEGGER

Tool/software:

Hello,

Is there a way to program the MSPM0G3105 through Uniflash (or BSL GUI) with a USB-UART connection?

I see that the MSPM0G3507 has the option, but the MSPM0G3105 does not.

As a test, I migrated the 'bsl_uart_flash_interface_LP_MSPM0G3507_nortos_ticlang' project to the MSPM0G3105 and was able to program my board.

 With the uart bsl program loaded, I booted the board with PA18 pulled high and tried to use Uniflash with it set to MSPM0G3507(BOOTLOADER) and connection as serial, but only receive the following error messages from Uniflash.

Is there support for this on the G3105, or do I need to use a debugger?

Thanks,

Travis

  • Hi Travis,

    I believe that using the MSPM0G3507(BOOTLOADER) device selection should work just fine. The error message you are seeing here looks like the device is not in BSL mode. Are you certain that you are still in BSL mode when you start the connection? When you power the device on or reset with PA18 pulled high, the device will go into BSL mode for 10 seconds then go to sleep. 

    You could also enable verbose output to see the BSL commands and responses to check further into the error, if you are unable to resolve by checking the above, I'd recommend you try this and paste the output so we can further check the issue.

  • Hi Dylan,

    I was able to program the device with another piece of hardware. While the device seems to be loaded and functioning, I am still getting errors from Uniflash. Is this of any concern, and do you know why I might be seeing the following output in the console?

    [11/8/2024, 10:37:36 AM] [INFO] CORTEX_M0P: MSPM0G3507(Bootloader)
    [11/8/2024, 10:37:36 AM] [INFO] CORTEX_M0P: Invoking Bootloader....
    [11/8/2024, 10:37:37 AM] [ERROR] CORTEX_M0P: Automatic Bootloader invocation failed with response....1
    [11/8/2024, 10:37:37 AM] [ERROR] CORTEX_M0P: Try manual Bootloader Invocation...
    [11/8/2024, 10:37:38 AM] [INFO] CORTEX_M0P:
    [11/8/2024, 10:37:38 AM] [INFO] CORTEX_M0P: BSL Connected
    [11/8/2024, 10:37:38 AM] [INFO] CORTEX_M0P: Command Interpreter version: [0x0100] Build ID: [0x0100] Application version: [0x00000000] Active Plugin Interface version: [0x0001] BSL Max buffer size: [0x1EC0] BSL Buffer Start address: [0x20000160] BCR Config ID: [0x00000x0001] BSL Config ID [0x00000x0001]
    [11/8/2024, 10:37:38 AM] [INFO] CORTEX_M0P: BSL Password is correct!
    [11/8/2024, 10:37:39 AM] [INFO] CORTEX_M0P: Erasing sectors containing DataBlock starting at 0x0 is successful!
    [11/8/2024, 10:37:39 AM] [INFO] CORTEX_M0P: Erasing sectors containing DataBlock starting at 0x0 is successful!
    [11/8/2024, 10:37:39 AM] [INFO] CORTEX_M0P: Erasing memory time elapsed: 0.079s
    [11/8/2024, 10:37:47 AM] [INFO] CORTEX_M0P: Programming memory time elapsed: 8.044s
    [11/8/2024, 10:37:47 AM] [INFO] CORTEX_M0P: Number of bytes programmed: 7640 bytes
    [11/8/2024, 10:37:47 AM] [INFO] CORTEX_M0P: Programming speed: 0.9275kByte/s
    [11/8/2024, 10:37:47 AM] [ERROR] CORTEX_M0P: Data Block Size less than 1KB!!! Verification Failed for Datablock at0x0
    [11/8/2024, 10:37:47 AM] [INFO] CORTEX_M0P: CRC check at 0x0 does not match. expected value: 0x914485A1 obtained from BSL: 0x5F729772
    [11/8/2024, 10:37:47 AM] [INFO] CORTEX_M0P: Verifying memory time elapsed: 0.04764s
    [11/8/2024, 10:37:47 AM] [INFO] CORTEX_M0P: System Reset Issued!!!
    [11/8/2024, 10:37:47 AM] [INFO] CORTEX_M0P: System reset is executed!
  • The first two errors just appear to be that the Uniflash + debugger combination you are using are unable to place the device into BSL mode. This could be due to quite a few reasons, depending on which other hardware you are using to interface with your target device. Generally I would not say this is concerning if you are still able to properly manually invoke BSL (which judging by the output, it looks like this worked fine).

    As for the second error about data block size, I am wondering how you've generated the binary file you are flashing to the device? The added info in the line below indicates that the CRC check for the binary has failed, I am wondering if the binary file was generated correctly. 

  • In that case, I will ignore the first 2 error messages about placing the device into BSL mode.

    I created the binary file through CCS Theia by enabling the Arm Hex Utility in Properties and setting the output format to TI-TXT hex.

  • Hi Travis,

    Sorry for the slow response here, I am in contact with the SW team that developed this tool to get further information.

    TI-TXT should work just fine here and should not cause the issue you are seeing.

  • Hey Dylan,

    Have you gotten any update from the SW team? Could this be a result of using the MSPM0G3507 (BOOTLOADER) selection for the MSPM0G3105?

  • I should have a patch to send to you later today that we are hoping will help.

    In the meantime, could you also confirm for me what debugger and flasher combination you have that is working to program the device? Then additionally, for your USB-UART connection what hardware are you using? I assume the target MSPM0G3107 is on a custom PCB?

  • Ok, thank you.

    I have used the Segger J-Link with Uniflash and CCS Theia to program the device without any errors.  The target MSPM0G3105 is on a custom PCB and I am using a TTL-232R-5V-AJ cable for the USB-UART connection.

  • Hey Travis,

    Apologies the delay please use this binary and let me know how it goes.

    6888.FlashMSPM0SLBootloader.dll

  • Hi Henry,

    I tried the new DLL and it got rid of the first 2 error messages about the bootloader invocation as well as adding a "Program Load completed successfully" message. I am still seeing the error message about the CRC check, but now it is only showing that it obtained 2 bytes from BSL instead of 4.

    I attached the 2 files with the console output from Uniflash, with one using the original DLL that came with the Uniflash package, as well as the new DLL you gave me.

    Uniflash_Console_Output_NEW_DLL.txt
    [11/27/2024, 9:29:50 AM] [INFO] CORTEX_M0P: MSPM0G3507(Bootloader)
    [11/27/2024, 9:29:51 AM] [INFO] CORTEX_M0P:
    [11/27/2024, 9:29:51 AM] [INFO] CORTEX_M0P: BSL Connected
    [11/27/2024, 9:29:51 AM] [INFO] CORTEX_M0P: Command Interpreter version: [0x0100] Build ID: [0x0100] Application version: [0x00000000] Active Plugin Interface version: [0x0001] BSL Max buffer size: [0x1EC0] BSL Buffer Start address: [0x20000160] BCR Config ID: [0x00000x0001] BSL Config ID [0x00000x0001]
    [11/27/2024, 9:29:51 AM] [INFO] CORTEX_M0P: BSL Password is correct!
    [11/27/2024, 9:29:51 AM] [INFO] CORTEX_M0P: Erasing sectors containing DataBlock starting at 0x0 is successful!
    [11/27/2024, 9:29:51 AM] [INFO] CORTEX_M0P: Erasing sectors containing DataBlock starting at 0x0 is successful!
    [11/27/2024, 9:29:51 AM] [INFO] CORTEX_M0P: Erasing memory time elapsed: 0.07953s
    [11/27/2024, 9:29:59 AM] [INFO] CORTEX_M0P: Programming memory time elapsed: 7.979s
    [11/27/2024, 9:29:59 AM] [INFO] CORTEX_M0P: Number of bytes programmed: 7576 bytes
    [11/27/2024, 9:29:59 AM] [INFO] CORTEX_M0P: Programming speed: 0.9272kByte/s
    [11/27/2024, 9:29:59 AM] [ERROR] CORTEX_M0P: Data Block Size less than 1KB!!! Verification Failed for Datablock at0x0
    [11/27/2024, 9:29:59 AM] [INFO] CORTEX_M0P: CRC check at 0x0 does not match; expected value: 0x37C4D431 obtained from BSL: 0x58F2
    [11/27/2024, 9:29:59 AM] [INFO] CORTEX_M0P: Verifying memory time elapsed: 0.04813s
    [11/27/2024, 9:29:59 AM] [INFO] CORTEX_M0P: System Reset Issued!!!
    [11/27/2024, 9:29:59 AM] [INFO] CORTEX_M0P: System reset is executed!
    [11/27/2024, 9:29:59 AM] [SUCCESS] Program Load completed successfully.

    Uniflash_Console_Output_ORIGINAL_DLL.txt
    [11/27/2024, 9:25:20 AM] [INFO] CORTEX_M0P: MSPM0G3507(Bootloader)
    [11/27/2024, 9:25:20 AM] [INFO] CORTEX_M0P: Invoking Bootloader....
    [11/27/2024, 9:25:22 AM] [ERROR] CORTEX_M0P: Automatic Bootloader invocation failed with response....1
    [11/27/2024, 9:25:22 AM] [ERROR] CORTEX_M0P: Try manual Bootloader Invocation...
    [11/27/2024, 9:25:23 AM] [INFO] CORTEX_M0P:
    [11/27/2024, 9:25:23 AM] [INFO] CORTEX_M0P: BSL Connected
    [11/27/2024, 9:25:23 AM] [INFO] CORTEX_M0P: Command Interpreter version: [0x0100] Build ID: [0x0100] Application version: [0x00000000] Active Plugin Interface version: [0x0001] BSL Max buffer size: [0x1EC0] BSL Buffer Start address: [0x20000160] BCR Config ID: [0x00000x0001] BSL Config ID [0x00000x0001]
    [11/27/2024, 9:25:23 AM] [INFO] CORTEX_M0P: BSL Password is correct!
    [11/27/2024, 9:25:23 AM] [INFO] CORTEX_M0P: Erasing sectors containing DataBlock starting at 0x0 is successful!
    [11/27/2024, 9:25:23 AM] [INFO] CORTEX_M0P: Erasing sectors containing DataBlock starting at 0x0 is successful!
    [11/27/2024, 9:25:23 AM] [INFO] CORTEX_M0P: Erasing memory time elapsed: 0.07977s
    [11/27/2024, 9:25:31 AM] [INFO] CORTEX_M0P: Programming memory time elapsed: 7.979s
    [11/27/2024, 9:25:31 AM] [INFO] CORTEX_M0P: Number of bytes programmed: 7576 bytes
    [11/27/2024, 9:25:31 AM] [INFO] CORTEX_M0P: Programming speed: 0.9273kByte/s
    [11/27/2024, 9:25:31 AM] [ERROR] CORTEX_M0P: Data Block Size less than 1KB!!! Verification Failed for Datablock at0x0
    [11/27/2024, 9:25:31 AM] [INFO] CORTEX_M0P: CRC check at 0x0 does not match. expected value: 0x37C4D431 obtained from BSL: 0xC15858F2
    [11/27/2024, 9:25:31 AM] [INFO] CORTEX_M0P: Verifying memory time elapsed: 0.04724s
    [11/27/2024, 9:25:31 AM] [INFO] CORTEX_M0P: System Reset Issued!!!
    [11/27/2024, 9:25:31 AM] [INFO] CORTEX_M0P: System reset is executed!

  • Hi Travis,

    Thank you for your patience.

    Let me check that portion out and get back to you on it.

    Thank you,

    Henry Nguyen