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.

F28377D Flash API - OTP checksum mismatch

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

I tried to use the Flash API on a TMX320F28377D DSP. Fapi_getBankSectors returns all the information about the flash of the device. When I try to erase Flash E, I call Fapi_setActiveFlashBank with bank0 as the argument and I get Fapi_Error_OtpChecksumMismatch. I never used the OTP so I don't understand why I get that. Are there registers or memory regions I can look at to know a bit more details about why I get this error?

Thanks

  • Simon,

    Did you configure the Flash wait-states properly before calling API functions? InitFlash() function provided in F2837xD_SysCtrl.c can be used to configure the wait-states.

    Also, can you check if you got any ECC error when you call this function? Details of the ECC error registers (FLASH_ECC_REGS start at 0x5FB00) are available in TRM. Check these registers: SINGLE_ERR_ADDR_LOW, SINGLE_ERR_ADDR_HIGH, UNC_ERR_ADDR_LOW , UNC_ERR_ADDR_HIGH.

    Thanks and regards,
    Vamsi
  • Hi Vamsi,

    Yes Flash wait states are correctly configured but, I know I had a problem with this yesterday in my code. For an unknown reason, the predefined symbol _FLASH wasn't interpreted correctly in the code so InitFlashBank0 wasn't called and I executed my code anyway and used the Flash API probably. Could that have caused this?

    I checked the registers you mentionned and a bit more :

    Flash0EccRegs.UNC_ERR_ADDR_HIGH = 0x700AC

    Flash0EccRegs.UNC_ERR_ADDR_LOW = 0x700A8

    Flash0EccRegs.SINGLE_ERR_ADDR_HIGH = 0

    Flash0EccRegs.SINGLE_ERR_ADDR_LOW = 0x700B0

    Flash0EccRegs.ERR_STATUS.bit.FAIL_0_L = 1

    Flash0EccRegs.ERR_STATUS.bit.UNC_ERR_L = 1

    Flash0EccRegs.ERR_POS.bit.ERR_POS_L = 16

  • Hi,

    I re-checked TI example from ControlSuite and saw this comment :

    // Disable ECC. ECC does not have to be disabled to do FSM operations like
    // program and erase.
    // Due to an OTP ECC errata, disable ECC to avoid ECC errors while using
    // Flash API functions that read TI-OTP


    I just disabled ECC when using the flash api and it now works. I guess my problem was just related to this errata.

    Thanks

  • Simon,

    What is the wait-state configuration (check FRDCNTL Register at address 0x5F800) when you got these ECC errors? For 200MHz operating frequency, wait-states should be set to 3. Wait-states should be configured correctly to avoid ECC errors. If InitFlash() function does not get executed, wait-states will not be initialized correctly.

    Enable ECC and configure the wait-states before you use the Fapi_setActiveFlashBank() function. Let us know if you still get these errors. Errata is not applicable for F28377D and is applicable only for F28M35x Rev0 devices. Those comments in the example are a carry over from F28M35x devices.

    Thanks and regards,
    Vamsi