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.

MSPM0L2228: MSPM0L2228

Part Number: MSPM0L2228
Other Parts Discussed in Thread: MSPM0L1228

Tool/software:

In MSPM0L2228 controller how can i get security state of flash as a secure / not secure?

What register i have to use to get flash secure state?

Is backdoor access feature available in MSPM0L228 controller?

  • Hi, 

    What register i have to use to get flash secure state?

    What's your requirement about this flash secure state?

    Can you show me some section in TRM?

    https://www.ti.com/lit/pdf/slau847

    Or some spec in this document?

    https://www.ti.com/lit/an/slaae29/slaae29.pdf

    Regards,

    Helic

  • In NXP backdoor access feature is present, that i have to implement in TI.
    So for that  need to check:

    1. Flash is secure or not.
    2. If flash is secure, check the backdoor key is enabled.
    3. If it is enabled, perform command write sequence on flash.

  • Hi, 

    In MSPM0L2228 controller how can i get security state of flash as a secure / not secure?

    From my point of view, L2228's internal Flash can be secured.

    But we need to dig into basic description, since there are many definition about security.

    1. Flash is secure or not.
    2. If flash is secure, check the backdoor key is enabled.
    3. If it is enabled, perform command write sequence on flash.

    Can you please help clarify the specific details of these features?

    From my side, I can tell you that in this document:https://www.ti.com/lit/an/slaae29/slaae29.pdf

    There are some Flash security feature that you can check:

    It's hard to me to understand [NXP backdoor access feature], since I am a TIer.

    Once you check these safety/security feature, if you still have some question, please feel free to ask me.

    Hope I can guide you well.

    Regards,

    Helic

  • In NXP:
    Back door access:
    The Verify Backdoor Access Key command is qualified by the
    FSEC[KEYEN] bits. The Verify Backdoor Access Key command releases security if
    user-supplied keys in the FCCOB match those stored in the Backdoor Comparison Key
    bytes of the Flash Configuration Field. The column labeled Flash Configuration Field
    offset address shows the location of the matching byte in the Flash Configuration Field.


    In FSEC register, check SEC bit(if SEC:1 then flash is not secure, if SEC:0 then flash is secure)
    if SEC = 0, then check backdoor access is enable or not with KEYEN bit from FSEC register.
    If backdoor access is enable then
    check CCIF bit = 0 from FTFC register,if CCIF bit is not clear then Clear RDCOLERR & ACCERR & FPVIOL flag in flash status register. Write 1 to clear
    then pass 0x45(backdoor access key) to FCC0B0
    then Perform command write sequence on Flash.

    Please can you check how this can implement in MSPM0L1228 controller.

  • Hi, 

    Back door access:

    Supported by SWD password.

    Please refer to TRM: https://www.ti.com/lit/ug/slau847d/slau847d.pdf

    All security you can find description here: Chapter 4 SECURITY

    In FSEC register, check SEC bit(if SEC:1 then flash is not secure, if SEC:0 then flash is secure)

    How to define this [Flash is secure].

    Only way to access flash in MSPM0 is using SWD debug interface.

    We can enable SWD password to protect Flash.

    And in TRM, you can find Flash protection function:

    Flash write-erase protection

    Flash read-execute protection

    Flash IP protection.

    L2228 also support ECC Flash, there are register that will show the result 1 or 2 bit error in Flash check.

    1 bit error will be auto fixed by ECC, and 2 bit error will cause a Flash interrupt.

    Regards,

    HElic

  • Thanks for giving this info,
    Please can you share that ( there are register that will show the result 1 or 2 bit error) register name to check flash is protected or not.

    Regards,

    Deepika.

  • Hi, 

    For Flash ECC interrupt, please refer to TRM: https://www.ti.com/lit/ug/slau847d/slau847d.pdf

    Table 2-12. Error Sources and Handling Mechanisms

    Regards,

    Helic

  • Hi,

    Is there any backdoor key bit present in flash? above chain i explain about backdoor.

    Thanks,

    Deepika.

  • Hi, 

    Sorry, I don't quite understand these description.

    Back door access:
    The Verify Backdoor Access Key command is qualified by the
    FSEC[KEYEN] bits. The Verify Backdoor Access Key command releases security if
    user-supplied keys in the FCCOB match those stored in the Backdoor Comparison Key
    bytes of the Flash Configuration Field. The column labeled Flash Configuration Field
    offset address shows the location of the matching byte in the Flash Configuration Field.


    In FSEC register, check SEC bit(if SEC:1 then flash is not secure, if SEC:0 then flash is secure)
    if SEC = 0, then check backdoor access is enable or not with KEYEN bit from FSEC register.
    If backdoor access is enable then
    check CCIF bit = 0 from FTFC register,if CCIF bit is not clear then Clear RDCOLERR & ACCERR & FPVIOL flag in flash status register. Write 1 to clear
    then pass 0x45(backdoor access key) to FCC0B0
    then Perform command write sequence on Flash.

    Regards,

    Helic

  • Back door access:
    The verify backdoor access key command is used to unlock the controller when it is in secure state. This command allow to bypass the security setting without needing to reprogramed the flash configuration field. By using verify backdoor access key command temporirly unsecure the MCU allowing debugging and programming. Once MCU is reset, it will return to its secure state.

  • HI, 

    We don't have this kind of register.

    But with security config in non-main (include SWD password, Flash protection, and factory reset control), I don't think this is a necessary function for security.

    I recommend you to go through this document firstly: https://www.ti.com/lit/an/slaae29/slaae29.pdf

    To see if MSPM0 can meet your requirement.

    Regards,

    Helic