MSPM0L1228: Setting BCR, BSL after programming

Part Number: MSPM0L1228

Hello,
customer needs to lock SWD after production programming because after production programming he has to calibrate his application and then he wants to lock the SWD. He uses Keil Jlink debugger.
Is that possible that he can write the BCR, BSL after regular programming? Do we have an example script?

Regards, Holger

  • Hi Holger,

    To clarify, the customer wants to:

    1. Program their main application
    2. Perform device calibrations
    3. Program NONMAIN to lock SWD

    Is the customer able to split their full application into separate MAIN and NONMAIN output files to be flashed. The customer should be able to load the application image and perform calibration first, then load the NONMAIN configuration which will enforce all security settings upon a BOOTRST or stronger.

    Best Regards,
    Brian 

  • Hi Brian,

    > To clarify, the customer wants to:
    > Program their main applicatio
    > Perform device calibrations
    > Program NONMAIN to lock SWD
    exact, that is correct

    Regards, Holger

  • Hi Brian,
    do you have an example of the NONMAIN configuration? Do they have to consider something when flashing the NONMAIN area?
    Because currently they cannot write the NONMAIN area. How can they create the NONMAIN configuration?

    Regards, Holger

  • Hi Holger,

    To successfully write to NONMAIN, the correct programming algorithm needs to be added in the Flash Download Configuration:

    The above algorithms are used with the flashctl_nonmain_memory_write example found in the SDK. The source files of this project also include configuration structs for modifying NONMAIN memory.

    Including "const NONMAIN = scripting.addModule("/ti/driverlib/NONMAIN");" in the .syscfg, and the boot_config files in the project will generate and store a default BCR + BSL config in NONMAIN. To achieve the customer's desired behavior, I would include all components and build a .hex output image that can be separated into the MAIN and NONMAIN components. To Flash the device with these separately, follow the procedure described in the µVision User's Guide: HEX Files. Be sure to change the programming algorithm accordingly.

    If the customer doesn't have the latest CMSIS packs, they can be downloaded here: Arm Keil | CMSIS Packs.

    Best Regards,
    Brian