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.

MSPM0G3507: How to access Flash

Part Number: MSPM0G3507

Hello.
I would like to know how to access Flash on MSPM0G series.
Firstly, I want to accomplish two things.
① Refer to the Flash addresses 0x00000000 to 0x0003FFFF in the CORRECTED area of the MAIN area and process the data.
②Refer to the address of the specified function mapped to the CORRECTED area of the MAIN area and execute the function.

Previously, I inquired about how to access Flash in a separate matter.
In that case, I solved it by adding the offset 0x00400000 to access the UNCORRECTED area of the MAIN area so that it would not become Default_handler.

However, when I used the relatively new SDK 1.10 instead of the SDK 1.00 I was using at the time, even if I referenced the CORRECTED address, it did not become Default_handler.

Can ① and ② be achieved without accessing the UNCORRECTED area? I would like you to tell me.

e2e.ti.com/.../lp-mspm0g3507-when-you-refer-to-the-flash-address-in-product-sample-it-becomes-default_handler

  • Hi there,

    However, when I used the relatively new SDK 1.10 instead of the SDK 1.00 I was using at the time, even if I referenced the CORRECTED address, it did not become Default_handler.

    Did you mean that you program the protected Flash data without ECC generated, and then the MCU will not jump to NMI interrupt. Do you read the protected data after you program it? It doesn't make sense.

    Can you share the code here and I will check it later.

    B.R.

    Sal

  • I would like to PROGRAM without ECC protection and access that data to read the data.
    I am using flashctl_multiple_size_read_verify_LP_MSPM0G3507_nortos_ticlang.
    The code is listed here.
    e2e.ti.com/.../lp-mspm0g3507-when-you-refer- to-the-flash-address-in-product-sample-it-becomes-default_handler/4708440#4708440
  • Hi,

    Due to you have showed several code in antoher thread, I am not sure which one you test with the latest sdk version.

    Please upload here and I can check what happen.

    B.R.

    Sal

  • The new SDK use the API function with ECC generated, so the ECC code is update according to the data, This is the reason why you will find no ECC error occurs.

    If you use "DL_FlashCTL_programMemoryFromRAM8" rather than "DL_FlashCTL_programMemoryFromRAM8WithECCGenerated", and then the ECC error will occur (soemtimes it will not happen with some specific data because maybe the ECC code is the same).

    Below will make the FALSHDED happen:

    /* 8-bit data to write to flash */
    uint8_t gData8 = 0x01;

    ...

    gCmdStatus = DL_FlashCTL_programMemoryFromRAM8(
    FLASHCTL, MAIN_BASE_ADDRESS, &gData8);

    ...

    unsigned char Test = 0;
    unsigned char *pTest;

    pTest = (void *)MAIN_BASE_ADDRESS; // #define MAIN_BASE_ADDRESS (0x00001000)

    Test = *pTest; // Test = (unsigned char)(*pTest);

    ...

    I always suggest you use the FLASH program API with ECC, and read operation can with or without ECC. This method is more stable.

    B.R.

    Sal