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.

MSPM0L1227: MSPM0L122x dual bank example

Part Number: MSPM0L1227

Team,gpio_toggle_output.c 

I am using CSS 20.3.0, attaching my SYSCFG file and a test code also along with this mail.

I wen through some of the Docs available on enabling bank swap and written code as per my understanding.

 

Config  done:

  1. Enabled below 2 check box in Configuration NVM

             Enable CSC Policy 

[X]

             Enable Flash Bank Swap Policy 

 
  1. Changed the erase configuration in project -> Properties -> Debug -> MSPM0 Flash Settings -> Erase method choose Erase MAIN and NONMAIN memory.

Functions flow in Code:

Function Name

Description / Purpose

DL_SYSCTL_enableFlashBankSwap()

Enables the flash bank swap policy.

DL_SYSCTL_executeFromUpperFlashBank()

Selects execution from the upper flash bank based on the configured boolean value.

DL_SYSCTL_executeFromLowerFlashBank()

Selects execution from the lower flash bank based on the configured boolean value.

DL_SYSCTL_issueINITDONE()

Issues INITDONE to reset the device after completing all bank swap configurations.

DL_SYSCTL_isFlashBankSwapEnabled

Checks whether flash bank swapping is enabled or not.

 When I call swap_enabled = DL_SYSCTL_isFlashBankSwapEnabled() after bank swap conf, I am getting swap_enabled as false always. Is there anything I am missing in configration/ code flow? Kindly confirm if my approach is correct on this feature.

  • Hi, thanks for the question! Can you try:

    • Moving your SYSCFG_DL_init(); before the first "if" statement
    • Remove SYSCFG_DL_init() from the "if" statement

    and re-run the program? I want to first ensure there are no system initialization configurations that are causing this to always read '0'. Also, if you set a breakpoint right after your configure_bank_swap_early() to check the value in the SECCFG.FLBANKSWAP register, are you seeing the expected value before the reset is triggered?

    -Brian

**Attention** This is a public forum