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.

TMS470MF6607 Flash programming

Hi,

I am developing flash driver for TMS470MF6607 controller using CCS V4.2.3.

I am following below sequence for erase operation.

  1. Initializing bank and sectors
  2. Call the Flash_Compact_B()
  3. Then start erase using Flash_Start_Erase_B()
  4. Check the status of erase using Flash_Status_U16()
  5. wait till BUSY bit in status register get cleared, since I am unable to perform any other operation during erase operation in progress.
  6. If more sectors to be erased then goto step 1, otherwise set flag to indicate erase is success.

I placed flash driver code in RAM area and above sequence is working fine. Time taken for erasing are below.

Sector Size

Time taken for erase operation (Seconds)

Additional Information

16K

0.409

Single sector

32K

0.6436

Single sector

32K

1.0

Length is overlapping two sectors

64K

1.0

Single sector

If length increased, this time will be increased. For entire erase of flash its around 12 seconds.

But according to my customer requirement, I have to excute some part code (which is placed in flash memory)  for every particulat period (after 20msec of erase start and later for every 4.5seconds) to indicate erase is in progress. And control should come back to RAM area from where it is jumped to flash. When I try to excute it, erase operation is stopped and there is no flash driver code in RAM to access.

Can provide the information to access the flash code whie erase opeartion is in progress. Is it possible to excute using any mode? Please provide it as early as possible.

Thanks in Advance.......

Regards,

Sarada CM

  • Hello Sarada,

    When a Flash Bank is performing a program or erase operation, it becomes inaccessible for reads which includes code execution until the operation has completed.  It is possible to perform an erase or program operation from one bank and still read or execute code from the other bank on this device.  The verify and read margin functions however, should be performed only from RAM as executing code from Flash while those operations are in progress will cause a system error.

    If you are trying to erase the entire bank, using the bank erase operation will be more efficient than erasing each sector individually.

  • Hi John,

    Thank you very much for reply.

    Anyway I placed all my excecutable code in RAM only, so I am able to perform other tasks during erase opeartion.

    But I found one more issue while using flash libraries. When I called Flash_Compact_B() function, its taking around 28m. Why are you holding this much time without giving controller to user.

    Please clarify this.

    Regards,

    Sarada CM

  • Sarada,

    That is due to the fact that the Flash_Compact_B() function is synchronous and will not return until the compaction has completed.

    The asynchronous compaction function is Flash_Start_Compact_B() which will return once compaction has started and then you will need to poll Flash_Status_U16() occasionally to see when the compaction operation has completed.

  •  

    Hello John,

    Thanks for reply.

    I tried with Flash_Start_Compact_B()  function and polled using Flash_Status_U16(). Then also control from Flash_Start_Compact_B()  is returned after 28ms of function call.

    Please clarify it and provide me alternate solution.

     

    Regards,

    Sarada CM

  • Sarada,

    There is some device overhead that is required and as such there is no workaround available.