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.

MSPM0L1304: MSPM0 BSL Programming Development Issue

Part Number: MSPM0L1304

Hi TI Teams,

I am currently developing the BSL programming flow in our software. The document I am referencing is “MSPM0 Bootloader” (slau887a.pdf).

One of my requirements is to erase the NONMAIN region and then reprogram it with the required configuration. I understand the constraint that the NONMAIN region should not be left erased without being reprogrammed.

However, I found that the only available method to erase NONMAIN is using the “CMD Factory Reset” command, which also erases the MAIN region. I would like to ask whether there is any command that can erase only the NONMAIN region without erasing MAIN.

In addition, under the default state, the “CMD Memory Read Back” command cannot be used to read the device content, which I am aware of. Therefore, to verify the device content, only the “CMD Standalone Verification” command using CRC32 can be used. However, this command requires a minimum verification size of 1024 bytes.

Currently, I would like to verify the programmed content of the NONMAIN region via BSL, but the NONMAIN region is only 512 bytes. In this case, it seems that I cannot use the “CMD Standalone Verification” command with CRC32. Are there any other commands or methods available to verify the programming result of the NONMAIN region?

 

Thanks.

Steve.

  • Usually, nonmain modification is done during factory mass production phase, using SWD interface to program nonmain once.

    But there are other method by using BSL, please use erase and program command in below docs 4.3 Bootloader Core Commands

    You can set nonmain address with these two command to program nonmain, erase then program.

    www.ti.com/.../slau887a.pdf

    Are there any other commands or methods available to verify the programming result of the NONMAIN region?

    No... You can either enable the BSL readout function by modifying nonmain via SWD or using SWD to program nonmain.

    But you can still to have a try to verify the CRC of nonmain using Standalone Verification with 1kB length, I don't know what will happen, but you can have a try.

    Just verify via BSL won't damage the device.

  • Hi Chi,

    At this point, my requirement is to use only the BSL to program the IC, without using the SWD interface.

    I understand that BSL can be used to program the NONMAIN region. However, for erase operations, the “CMD Factory Reset” command erases both the MAIN and NONMAIN regions, and the “CMD Flash Range Erase” command requires a minimum erase size of 1024 bytes. Since the NONMAIN region is only 512 bytes, I am concerned that using “CMD Flash Range Erase” directly may damage the IC.

    Based on this, it appears that the “CMD Standalone Verification” command also cannot accurately verify the NONMAIN region, correct? And is there no other method available via BSL to verify only the NONMAIN region?

    Steve.

  • CMD Factory Reset” command

    This is a recovery cmd, and will reset nonmain content.

    If you want to erase nonmain, you need to use erase command.

    Since the NONMAIN region is only 512 bytes, I am concerned that using “CMD Flash Range Erase” directly may damage the IC.

    According to hardware, it's a 1kB size Flash bank, so you can have a try the entire procedure on your dev board, I thinks it's OK, but we didn't add this kind of operation in document.

    Based on this, it appears that the “CMD Standalone Verification” command also cannot accurately verify the NONMAIN region, correct? And is there no other method available via BSL to verify only the NONMAIN region?

    You can still use this command to verify the nonmain, if we want to verify Nonmain we have to verify 1KB, considering the remaining bytes as 0xFF.

  • Hi Chi

    This is a recovery cmd, and will reset nonmain content.

    Sorry, based on the description in the document, it indicates that the NONMAIN content will be erased.

    Does this mean that both the MAIN and NONMAIN regions of the IC will be restored to the factory default state?

    According to hardware, it's a 1kB size Flash bank, so you can have a try the entire procedure on your dev board, I thinks it's OK, but we didn't add this kind of operation in document.

    So it seems that it is acceptable to directly erase the 1 KB block that includes the NONMAIN region, and that erasing the additional address range 0x41C00200–0x41C003FF together would not cause any issues, correct?

    You can still use this command to verify the nonmain, if we want to verify Nonmain we have to verify 1KB, considering the remaining bytes as 0xFF.

    Okay, I will test the CRC32 verification.

    Thank you for your explanation and help.

    Steve.

  • Sorry, based on the description in the document, it indicates that the NONMAIN content will be erased.

    Does this mean that both the MAIN and NONMAIN regions of the IC will be restored to the factory default state?

    NONMAIN content will be erased to 0xFF and you need to program it.

    You understand is correct.

    So it seems that it is acceptable to directly erase the 1 KB block that includes the NONMAIN region, and that erasing the additional address range 0x41C00200–0x41C003FF together would not cause any issues, correct?

    It shouldn't cause any error.

  • Hi Chi

    It shouldn't cause any error.

    Unfortunately, when I tried to use the “Flash Range Erase” command to erase the NONMAIN region, it returned MSG 0x05, which indicates that the erase address is not supported.

    After reviewing the description of the “Flash Range Erase” command, it indeed does not support operations on the NONMAIN region.

    It seems that the only way to erase the NONMAIN region is to use “Factory Reset,” correct? Even though this will also erase the MAIN region at the same time.

    Thanks.

    Steve.

  • It seems that the only way to erase the NONMAIN region is to use “Factory Reset,” correct? Even though this will also erase the MAIN region at the same time.

    Thanks for provide the feedback.

    So, we need to program nonmain first, then program the main region.