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.

TMS320F280049: Flash API usage with ECC enable or not

Part Number: TMS320F280049

Hi,

I'm using F280049c for CAN UDS bootloader situation.

What we used is F280049c's Flash API library with RAM application.

We see a phenomenon that MCU will go to NMI interrupt ,which is caused by FLUNCERR flag, when doblank_check function, and some other flash operations.

We found that the ECC is enabled by default.

    Flash_enableECC(eccBase);

Only if we disable ECC check for Flash. The whole process will be successful.And we double check the data writed into the memory with the orginal hex file. We dowrite the right data.

So, Is there something should I care about that causing ECC error?

Regards

Arrow

  • Hi Arrow,

    How about verify after programming? Is that successful with ECC enabled?

    Thanks and regards,
    Vamsi

  • ,

    Hi Vamsi

    I read the data from the memory browser, and the data is the same with what I want to write in .

    If I enable the ECC, the core will go to the NMI interrupt first when steps into the function Fapi_doBlankCheck () in Flash erase process.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    void sharedErase(uint32_t sectors)
    {
    statusCode.status = NO_ERROR;
    statusCode.address = 0x12345678;
    int i = 0;
    Fapi_StatusType oReturnCheck;
    Fapi_FlashStatusWordType oFlashStatusWord;
    int fail = 0;
    //
    // Note that wait-states are already configured in the Device_init().
    // However, if INTOSC is used as the clock source and
    // if the CPUCLK falls in the range (97,100] (check other ranges given in DS),
    // then an extra wait state is needed for FSM operations (erase/program).
    // Hence, below function call should be uncommented in case INTOSC is used.
    // At 100MHz, execution wait-states for external oscillator is 4 and hence
    // in this example, a wait-state of 5 is used below.
    // This example is using external oscillator as the clock source and hence
    // below is commented.
    //
    // This wait-state setting impacts both Flash banks. Applications which
    // perform simultaneous READ/FETCH of one bank and PROGRAM or ERASE of the other
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    If I disable the the Fapi_doBlankCheck() function.The Core can go through the sharedErase function.

    But when going to next  Program_CallFlashAPI() function, it will go to NMI interrupt when steps in to Fapi_issueProgrammingCommand().

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    void Program_CallFlashAPI(void)
    {
    uint32 u32Index = 0;
    uint16 i = 0;
    Fapi_StatusType oReturnCheck;
    Fapi_FlashStatusType oFlashStatus;
    Fapi_FlashStatusWordType oFlashStatusWord;
    // A data buffer of max 8 16-bit words can be supplied to the program function.
    // Each word is programmed until the whole buffer is programmed or a
    // problem is found. However to program a buffer that has more than 8
    // words, program function can be called in a loop to program 8 words for
    // each loop iteration until the whole buffer is programmed.
    //
    // Remember that the main array flash programming must be aligned to
    // 64-bit address boundaries and each 64 bit word may only be programmed
    // once per write/erase cycle. Meaning the length of the data buffer
    // (3rd parameter for Fapi_issueProgrammingCommand() function) passed
    // to the program function can only be either 4 or 8.
    //
    // Program data in Flash using "AutoEccGeneration" option.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Again, I can go through the whole bootloader process, when I disable ECC.

    I can't verify after programming when ECC enabled.

    Arrow

  • Hi Arrow,

    Did you check the ECC error log registers to know the address at which ECC error is occurring?

    Please inspect that address and make sure whether the corresponding flash and ECC are erased or not.

    Note: I am out of office and may return early next week.

    I will ask our team to monitor this post for you.

    Thanks and regards,
    Vamsi

  • Hi Vamsi

    I will check the register to see the address.

    Since I can skip the ECC to fulfill the flash process , this is not an urgent issue now.

    I'll keep you informed the lastest result maybe this Saturday, since now is the China's national holiday.

    Thanks and regards

    Arrow

  • Hi Arrow,

    Thanks for your reply, enjoy the national holiday! Please note that Vamsi will be out of office until early to mid-next week. Any replies before that may not be seen.

    Regards,

    Vince

  • Hi Arrow,

    Do you need further help on this?  Did you check the suggested registers?

    Thanks and regards,
    Vamsi

  • Hi Arrow,

    I am closing this post since I did not hear back from you in the last 3 weeks.

    Please open a new post as needed.

    Thanks and regards,

    Vamsi