• TI Thinks Resolved

Is there any F035 Flash API sample code?

i would like to develop a bootloader for TMS470MF066. Is there any sample code which uses F035 Flash API? If my bootloader code is running in Bank 0 Sector 0, can i flash other sectors within Bank0 or the bootloader code must run in RAM? Thanks!

  • Hello Zuyuan,

    I have forwarded your request to one of our Flash API experts.  In case you were not already aware, we have an example bootloader for TMS570 that uses the F021 API and SPI.  This may be a starting point for you as the code is modular and replacing the FlashAPI and/or the SPI driver should be straight forward.  Let me know if you are interested in this code.

    Best Regards,

    Brian Fortman                  

    Industrial Drives and Automation              

    C2000 Microcontrollers

  • Hello Zuyuan,

    There is only one document I know of that shows example code using the Platform F035a Flash API, but it is written towards the TMS570LS20xxx/10xxx devices though it is still useful for the TMS470M devices.  http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=spna117a&docCategoryId=1&familyId=1870

    For your use case you presented, you will need to execute the code from RAM.

    John Hall

    MCU Safety & Security Software

    If my reply answers your question please click on the green button "Verify Answer"

  • In reply to Brian Fortman:

    Dear Mr. Fortman,

    Thank you very much! It would be very helpful for me to develop my code. 

  • In reply to John Hall:

    Hello John,

    Thank you for your answer! I have more questions: During the programming, I need to record some registration data in sector 1 of bank 0. After programming this sector, can I call Fapi_HardwareCalculateEcc() to get the ECC code for this sector and then program the ECC code to corresponding area? I read a doc, it says On Cortex-R4 in non strongly order Flash memory, the incorrect ECC may be returned. It seems for TMS470MF no such problem. Could you please give me more info. Thanks!

  • In reply to Zuyuan Li:

    Hello Zuyuan,

    The current version of the API, the Fapi_HardwareCalculateEcc() only works on Cortex R4 devices.  The next release of the API, this will be corrected and also work on Cortex M3 devices.  This new version should be released within the next 2 weeks.

    John Hall

    MCU Safety & Security Software

    If my reply answers your question please click on the green button "Verify Answer"

  • In reply to John Hall:

    Hello John,

    Thank you very much for your help. I don't know whether the ECC calculate algorithm is available or not. If we can get the algorithm code ( i.e. C code ), we can implement it in our PC program. In this way we can dynamically update register data and calculate ECC code before we download it to MCU. Could you please give me some suggestion? Thanks a lot!

  • In reply to Zuyuan Li:

    Hi john,

        I also want to know whether TI's customer can get the ECC calculation algorithm. I need your reply, thanks a lot!

    Regards,

      Shelford

    Thanks a lot!

    Best Regards

    Shelford Zhu