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.

MSPM0G3519: MSPM0G3519 BCR/BSL configuration NONMAIN build/flash question

Part Number: MSPM0G3519

I seem to not understand a concept correctly.  I am implementing a custom bootloader OTA update application that streams the downloaded image to bank1 (0x00040000) and then does a bank swap to the newly downloaded image.  The problem I am having is this requires a BCR/BSL configuration change to support bank swap which is where I keep locking out the MCU eventually.  I must be missing a concept because I want to write the BCR/BSL config change once and then write protect this NONMAIN region to avoid locking out my processor. 

However, once I write protect the NONMAIN, I can no longer flash the image again due to a "Error connecting to the target:  Connection to MSPM0 core failed.  Possible root causes: 1) Debug access within NONMAIN was disabled or enabled with password. 2) Peripheral mis-configuration (e.g improper watchdog or clock).  To see a more detailed diagnostic of the issue, please press the 'Read boot diagnostic' button." error.  All I can do at this point is a factory erase to flash again.  I am obviously missing key step or concept as to how to properly modify NONMAIN BCR/BSL configuration.  Below are the syscfg configuration changes I am attempting:

image.png

image.png

image.png

  • Hi Richard,

    However, once I write protect the NONMAIN, I can no longer flash the image again due to a "Error connecting to the target

    I believe this is because you set up the NONMAIN Protection and also attempt to erase it in the second time as your configuration as shown below, if do not want to modify the nonmain again, please set it as Erase MAIN memory and test again, thanks.

    Best Regards,
    Peter

  • Hi Peter, 

    Thank you so much for taking the time out to help me.  I already changed the setting to "Erase MAIN memory" and then get a CCS flash error message that I am attempting to write to NONMAIN without an erase first.  It seems like once you modify the BCR/BSL configuration, you have to always erase/overwrite it going forward?  I was hoping this was a one-time only operation where I only have to overwrite it once and then it's memory protected.  This is very frustrating because I have locked out a bunch of LP-MSPM0G3519 devkits just using the TI example codes for secondary bootloader.