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.

Some questions about using the Flash API(F021 Version2.01.01)

Other Parts Discussed in Thread: HALCOGEN

Hi,

I am using the TMS570LS1227ZWT HDK demo board for using the FEE to reading and writing the parameter datas.
It seems that there are two ways to do the flash operations:

1. Use the functions generated by the HALCoGen,(TI_Fee_WriteAsync, TI_Fee_Read, etc.)

2.  use the offcial Flash API(lastest version F021 2.01.01) released by TI. 

And my questions are :

1. Is the Flash API independent of the functions generated by the HALCoGen, which means the Flash API for the flash operations will not call the functions generated by the HALCoGen?

2. Prior to any Flash operations of the Flash API, a proper initialization of the flash device should be done.

I can find "TI_Fee_Init( )" in the sample code example_TI_Fee_Write_Read.c of HANCoGen(v04.04.00). Is there a function of Flash API to do this?

Or we must also call the same "TI_Fee_Init()", and then all of the Flash API can operate the Flash without exceptions? Is there a Program Flow for the initialization? :)

3. There are some Erase/Program usage samples in the document "Advanced F021 Flash API Erase/Program Usage" for the "FlashBank0". If I wanna test it with FEE, is the only change needed "Fapi_setActiveFlashBank(Fapi_FlashBank0)" to "Fapi_setActiveFlashBank(Fapi_FlashBank7)" ?

4. Could you help to supply the samples and the Program Flow for the reading of the Flash/FEE using the Flash API?

And the last question is, why the Flash API is recommended. Does that means it's more simpler, stable and safer than the functions directly call of the functions generated by the HALCoGen for the user?

I am looking forward to your answers!

Thanks very much in advance!

  • Hello,

    F021 is a library providing API's to access Flash banks. FEE is a software driver which uses F021 library API's to access only FEE bank(bank 7)  on the controller.

    My answers below:

    1)Infact it's the other way. Functions generated by HALCoGen will use Flash API to access FEE bank.

    2)TI_Fee_Init will call Flash API's to initialize FEE bank correctly. Also, if you want to directly access FEE bank without using functions generated by HALCogen, you need to call Flash API's directly. In document SPNU501F, you will find a section "Recommended Program Flow". In document SPNA148, you will find some examples. You can find these two documents in directory where Flash library is installed.

    3)Apart from setting the correct flash bank to active, you also need to pass correct address for programming the data. FEE bank address starts from 0xF0200000.

    4)FEE example is already part of HALCoGen examples. Flash API's example, you can find then in the documents I mentioned in point 2.

    Using Flash API, user can access any memory bank in controller. FEE api's on the other hand can only access FEE bank(bank 7). For accessing FEE bank, FEE api's would be preferred since the user need not take care of management of the sectors. User can simple do Initialize and start write/read. All bank end operations like copying the data from full sector to empty sector, erasing the full sector will be taken care by FEE api's.

  • Hi Vishwanath,

    Thanks so much for your rapid reply, and now I am clear about these operations for Flash.

    Thank you! :)