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.

MSPM0L1306: Flash Memory Locked?

Part Number: MSPM0L1306


Tool/software:

Hello, I need to unlock the FLASH memory of my MSPM0L1306 to upload a new firmware using the BSL functionality. When I execute the memory erase command and then verify a memory sector, I get a CRC different from 0xFF. I assume this is due to a protected memory sector, but in my code, I didn't protect the FLASH. Is there any sector protected by default?

Using an updated version of CCS (Version 20.2.0.12_1.8.0), which are the steps to upload a script to the MSPM0L1306 and restore the connection with the CCS? 

Thanks in advance. 

  • Hi Alex,

    On the MSPM0L1306, it is possible to have "static" FLASH protection, which is setup in the NONMAIN configuration and some or all of FLASH is permanently protected), or "dynamic" FLASH protection, which allows the application to enable/disable some or all of FLASH when it needs to write/modify FLASH.  I'll refer you to section 6.4 in the MSPM0L TRM.

    If "static" FLASH protection is not enabled, then FLASH is not write protected by default at POR.  Refer to TRM  page 39.

    Now, if you read out the contents of MAIN after the erase, rather than a CRC, what do you see?  All of MAIN should be set to 0xFFFFFFFF

  • Hi Dennis, thanks for your reply.

    The issue is that when I send a standalone command to any FLASH memory section (all of them of 1kB), expecting to get a CRC of 0xFF, I get the next frame:

    0x08 0x05 0x00 0x32 0x0B 0x00 0xC5 0x47 0x3D 0x93 0x08 0x6B

  • Hi Alex,

    Ok, if this is the BSL response what does the frame look like when you send the CMD = 0x26  to the BSL?

    And if you send the BSL command to read the contents of one of the sectors, does it return all 0xFFFF or ?

  • Hello Dennis, that frame I showed you is what I get when I send the 0x26 command, instead of 0xFFFF. What could that specifically mean?

  • Hi Alex,

    Sorry for the confusion.  What I'm asking is when you send the 0x26 command, what values do you have in 'ADDRS' and 'LENGTH' fields as shown in the example below? I know you said to "any FLASH memory section", but I would like to confirm you are using correct  'ADDRS' and 'LENGTH' values.

  • HI Alex,

    To help rule out the possibility that the issue is FLASH protection being enabled, I programmed one of our MSPM0L1306 launchpads and in debug mode checked the FLASHWSP0 location in NONMAIN which sets the 'static' memory protection.  It shows all 0xFFFFFFFF which disables FLASH protection.