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.

TMS320F280038C-Q1: Write something to flash while code is running at another sector

Part Number: TMS320F280038C-Q1

Hi,

1) For F28003x devices, can I write some parameters and values to unused flash banks, or to some sectors during my program executing real-time? If it is impossible with F28003x devices, can you offer alterative part numbers for automotive that handle it?

2) I've read a thread in forum that explains F05 flash. My device doesn't have it. Is it good or bad for me I don't know. Does my device have superior than F05 flash or same?

  • Hello Gokhan,

    1) For F28003x devices, can I write some parameters and values to unused flash banks, or to some sectors during my program executing real-time? If it is impossible with F28003x devices, can you offer alterative part numbers for automotive that handle it?

    The F28003x devices cannot read one bank and simultaneously program another. To write data to the Flash, you must be executing from RAM.

    The F28P65x series of devices is in production release, and does support programming one Flash bank while reading from another. See TMS320F28P659DK-Q1 data sheet, product information and support | TI.com

    2) I've read a thread in forum that explains F05 flash. My device doesn't have it. Is it good or bad for me I don't know. Does my device have superior than F05 flash or same?

    F05 is a previous generation of Flash-based devices. The F28003x family is on a newer Flash process with some improvements over F05.

    Best regards,
    Ibukun

  • Hi Ibukun,

    Thanks for answer.

    1) If I use F28P65x series, then my main program continoue to execute perfectly without any interruption because of writing to other sectors of flash right? Do I need extra API or something else to achieve it?

    2) My board will work in mass production and only one time program load will be done at the mass production phase. Therefore, board may be energised and re-energised during normal operation and it shouldn't require any re-load software. As a consequence, I think I need F28P65x series, right? If I continoue to use F28003x, I need extra memory hardware to my board to achieve this right?

    3) I sometimes think that I misunderstood running code flash and RAM. It might be a simple thing but I don't know exactly. If I load software to flash, does my program run on flash or RAM or both if I used some memcpy funcs?  Can you also explain differences briefly or offer document that explains these basic things?

  • Hello Gokhan,

    1) If I use F28P65x series, then my main program continoue to execute perfectly without any interruption because of writing to other sectors of flash right? Do I need extra API or something else to achieve it?

    The F28P65x has multiple flash banks. You can execute code out of one bank while programming another bank with no interruption. TI provides the Flash API library for this purpose. Program and erase operations work by sending a command and then waiting for the flash state machine to finish the operation in the background. Regular CPU operation can continue while the flash state machine is performing the program or erase operation.

    2) My board will work in mass production and only one time program load will be done at the mass production phase. Therefore, board may be energised and re-energised during normal operation and it shouldn't require any re-load software. As a consequence, I think I need F28P65x series, right? If I continoue to use F28003x, I need extra memory hardware to my board to achieve this right?

    In terms of the application, there is no difference between F28003x and F28P65x. You will program your application into the Flash once during production and then it can be run as many times as needed without having to reprogram. Code executes directly out of Flash. However, if you need to store data while the application is running (that is, emulate an EEPROM/log data to Flash memory), with F28003x you cannot do that without interrupting Flash execution (you would need to use an external NVM). With F28P65x, you can be executing code out of one Flash bank while simultaneously programming data into another Flash using the Flash API.

    3) I sometimes think that I misunderstood running code flash and RAM. It might be a simple thing but I don't know exactly. If I load software to flash, does my program run on flash or RAM or both if I used some memcpy funcs?  Can you also explain differences briefly or offer document that explains these basic things?

    C2000 devices support code execution out of both Flash and RAM. Code can execute directly out of Flash, and in the majority of our user's application cases this is what happens. However, because Flash execution performance is inherently slower than RAM due to additional wait states required, certain critical real-time control functions may need to run directly out of RAM for latency purposes. Our compiler tools provide a means to automatically copy desired code functions to RAM at startup to execute from there. In our provided linker command files, these are placed in the .TI.ramfunc section. Additionally, any functions that use the Flash API to program or erase the Flash must run out of RAM.

    Hope this clarifies your questions.

    Best regards,
    Ibukun

  • Hello Ibukun,

    Thank you so much. It was really helpful.