TMS470MF03107: About FLASH EEPROM erased and programmed sector bit 0 or 1 states

Part Number: TMS470MF03107
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

1、After erasing all and programming certain sectors,theoretically,the erased while not programmed sectors' bits state in FLASH EEPROM should be '1',but now there exists sometimes that the erased sectors' bits state are all '0',not '1',what factors or root reason can cause this phenomena? 

2、If the target  sectors' bits' states are '0',is it possible that the process of programming followed will fail?  If fail can happen, what factors or root reason can cause this phenomena?   

  • Hi,

    1、After erasing all and programming certain sectors,theoretically,the erased while not programmed sectors' bits state in FLASH EEPROM should be '1',but now there exists sometimes that the erased sectors' bits state are all '0',not '1',what factors or root reason can cause this phenomena? 

    That is correct. After an erase, all bits should be 1's. What do you mean by sometimes? Are you using the Flash API to erase or are you using the CCS or Uniflash Flash erase to erase all flash banks through JTAG? Are you saying it will erase successfully sometimes but not all the times?

    2、If the target  sectors' bits' states are '0',is it possible that the process of programming followed will fail?  If fail can happen, what factors or root reason can cause this phenomena?

    If a flash bit is 0 then you cannot change it to a '1' without a erase. You cannot program a '1' to a bit that is a '0'. You can only do a erase to change a bit from a '0' to a '1'. 

  • hi thanks for reply!

    You mention:

    That is correct. After an erase, all bits should be 1's. What do you mean by sometimes? Are you using the Flash API to erase or are you using the CCS or Uniflash Flash erase to erase all flash banks through JTAG? Are you saying it will erase successfully sometimes but not all the times?

    We program the .hex file into the chip flash using CCS or Uniflash after erasing all . And then during the customer using period,the program use the FLASH API to erase and write the target sector of the EEPROM region of BANK1 indicated  in the picture above. When we aim to write some non-zero data into the target sector,after ignition off and on operation, the data read back indicate all 0s,which is not expected.

             We want to know the potential root cause of this unexpected phenomenon.  thanks!

  • Hi,

      Can you show me which API you use to program the target sector?

      Are you programming the sector as a regular flash or as an emulated EEprom? 

      What was the content of the target sector before you call the API? Was it all 1's to begin with?

      Do you see the problem on one device or all the devices you have?

  • Hi ,

         you mention:

          "Can you show me which API you use to program the target sector?"

          In the application program,We use Flash_Erase_B() to erase,and use Flash_Prog_B() to program.

          "Are you programming the sector as a regular flash or as an emulated EEprom? "

          As an emulated EEPROM;

          "What was the content of the target sector before you call the API? Was it all 1's to begin with?"

          It all depends.It's strange,do you know why?

           " Do you see the problem on one device or all the devices you have?"

           This problem is raised by the probability of 40% or so among the devices .

  • Hi,

      "Are you programming the sector as a regular flash or as an emulated EEprom? "

          As an emulated EEPROM;

    I don't think you are using the flash bank 1 as an emulated EEprom memory. You would have needed to use a FEE driver to emulate a regular flash memory as a EEprom. Please refer to the TMS470M FEE driver https://www.ti.com/tool/download/TMS470MFEE for details. 

        "Can you show me which API you use to program the target sector?"

          In the application program,We use Flash_Erase_B() to erase,and use Flash_Prog_B() to program.

    What is the return value after calling Flash_Erase_B? Did it succeed or fail? 

    What are the status of stat1, stat2, stat3 and stat4 after the erase?

    Did you disable preconditioning before calling Flash_Erase_B? Normally, a flash erase will involve a step called preconditioning. Preconditioning is similar to programming all 0's to a sector. After the sector is preconditioned, the erase can take place. The precondition step can be disabled. This is the reason I want to know if you disable precondition. Refer to the User's Guide. 

    If the sector has already been determined to be
    blank using Flash_Blank_B prior to erase, the
    status → stat1 element can be initialized to
    0x12345678 prior to calling Flash_Erase_B to
    disable preconditioning and speed up erase. Nonblank
    sectors by default should have the value of
    status → stat1 initialized to 0x00000000 (or some
    value other than 0x12345678) to make sure
    preconditioning is enabled during erase. For more
    information, see Recommended Erase Flows in
    Section 5.

    5.2 Using Flash_Erase_B()
    Figure 1 describes the flow for erasing a single sector on a device when using the Flash_Erase_B function
    to accomplish the erase.
    The user should familiarize themselves with the Flash_Erase_B function description in Section 3.10.
    To save erase time, Flash_Erase_B supports disabling preconditioning (program to 0's prior to applying
    erase pulses) on sectors that return TRUE from the Flash_Blank_B function. This preconditioning disable
    is accomplished via a special key (0x12345678) passed via the FLASH_STATUS_ST status.stat1 element
    (for more information, see Flash_Erase_B desciption in Section 3.10) to the Flash_Erase_B function.
    While this feature does enable potentially faster throughput for erase on blank sectors, it does require the
    user to take extra care to make sure no depleted bits exist in the target sector prior to calling
    Flash_Erase_B with preconditioning disabled. This is the reason for the Flash_Compact_B call prior to the
    Flash_Blank_B call in Figure 1. A device shipped from TI should have no depleted columns, but a device
    that may have been reset or power cycled during a previous erase operation may contain depleted
    columns or marginally erased bits. The flow shown in Figure 1 is designed to repair any such bits if
    allowed to run to completion on a given sector.
    It is not advisable to skip erase altogether on sectors that read as blank, because these sectors may
    require repair to marginally erased bits or depleted columns that is performed during execution of
    Flash_Erase_B.
    Flash_Erase_B also allows for collecting erase pulse statistics for the sector if the user is interested.