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.

TMS320F28379D: why flash becomes inaccessible during Erase and Write

Part Number: TMS320F28379D


Tool/software:

I am using TMS320F28379D. I have questions regarding saving run time data in flash memory
1. Why can't I erase one sector of flash and read from another sector of flash simultaneously ? Why does flash become inaccessible during erase/program operations ?
2.I need to save some run time data in Flash. While programming flash, it becomes inaccessible to read. The Flash API documentation suggests copying codes to RAM, but my code won't fit inside RAM due to limited space therefore I'm saving them in flash. Is there any other ways to save data somewhere else while also running the code only from flash ?
  • 1. Why can't I erase one sector of flash and read from another sector of flash simultaneously ? Why does flash become inaccessible during erase/program operations ?

    During a program or erase operation the entire flash bank is placed in a special mode to apply the voltages necessary to change the state of the flash bits.  Every sector in the same bank has some shared control ports, etc so that is why the sectors in the same bank cannot be used during these operations

    2.I need to save some run time data in Flash. While programming flash, it becomes inaccessible to read. The Flash API documentation suggests copying codes to RAM, but my code won't fit inside RAM due to limited space therefore I'm saving them in flash. Is there any other ways to save data somewhere else while also running the code only from flash ?

    The flash API itself has to be ran from RAM due to this restriction. In terms of the run time data, are you trying to save it in real time to the flash?  Otherwise I think it would occupy some area of RAM, this area could be re-used and fed into the flash API as the data array to program into flash.  

    Best,

    Matthew

  • 1. Thanks for your reply, its clear now.

    2. Yes, I'm saving the real time data in flash. So even if I save the data in RAM temporarily to feed it into flash API later, I still can't fit my remaining code inside RAM (ISRs and other code) while programming flash with real time data. Is there any other option available to achieve this task?

  • Karthick,
    There is no other option, flash and RAM are the only writeable memory types on this device.  Is it possible to keep some of your functional code in flash, and execute from there to save RAM?  While there are some additional waitstates when running from flash, since we have a prefetch buffer the overall impact is not 1:1 with the WS. 

    Meaning, keep majority of your functional code in flash, and only use RAM for flash API and data variables; and when data is ready to be stored in flash, call out to the API, etc.  Once you go through this organization of the code, you can see what RAM remains, and then if there are more time critical functions(like ISRs) those can be copied over to RAM.

    Best,
    Matthew