TI E2E Community
C2000 32-bit Microcontrollers Forum
F021 Flash API Example Code
are there any code examples available how to use the F021 Flash API in Concerto ?
I'm especially interested how to properly link the F021_API_CortexM3_LE.lib so that it can be copied to SRAM for executionand how to set/get the the correct load (SRAM) and store (Flash) addresses.
Thank you in advance,Mario
When you try to program a Flash bit that is already programmed with a value of 0, Flash wrapper will not program it. It will program only the bits that are still 1s to make them 0s. So, you don't have to worry about wear and tear.
I need to check on the other question that you asked and I will try to reply you some time late next week.
Thanks and regards,Vamsi
I am not able to erase the FLASH on the C28 either with the 75/150 MHz (M3/C28) and the 100/100 MHz (M3/C28),
I used the code provided in the previous posts but if did not work.
I am using the F021 Flash API ver 1.50, the F28M35x Control suite V110, and the compiler v6.0.2.
By the way when calling the function, as in the example in this forum:
I get an error since the prototype of the Fapi_issueAsyncCommandWithAddress in the F021.h is
extern Fapi_StatusType Fapi_issueAsyncCommandWithAddress(Fapi_FlashStateCommandsType oCommand, uint32 *pu32StartAddress);
Using the address of a C28 FLASH segment (e.g.0x102000) doesn't work as well.
Try updating controlSUITE to the latest version (v120) and try running the flash example that comes with this version. This example has been verified to work correctly.
Thank you Trey,
I have updated the controlSUITE to the version v120.
I have found examples of code running from Flash, but not about F28M35 flash erasing and reprogramming.
Could you pls give hint about where I can find it?
Is the F021 v 1.50 that I am using the good one?
An example for F021 Flash API usage on master subsystem and control subsystem can be found in controlsuite at C:\TI\controlSUITE\libs\utilities\flash_api\f28m35x.
F021 v1.50 is good to use.
Thank you Vamsi.
The example works fine and I can start writing my code.
I have succesfully modified the example and I have been able to erase and write the FLASH correctly.
Now what I want to do is dumping using the debugger API, the entire content of the FLAS and restore it later on (complete flash image).
I want to do this becuase I want to be able to store a compete configuration including the code and the parameters for version maintenance and without using the CCS but only a light GUI developed for the user on top of the debugger API.
Dumping and restoring the parameters sections only (sectors different from sector A) is OK, but when I erase and write the sector A (which contains the boot part at 0x13FFFF0) exactly with the previous content, then I have problems.
I cannot program the Concerto again also using the CCS. The only way to gain the control of the Concerto again is to erase the sector A using my code and then gain access to the board using the CCS debugger to reload my application in FLASH.I have also tried to call the "CsmUnlock();" function before starting programming and after erasing sector A but without success.
Could you please tell me how to dump a complete flash image and restore it correctly using the FLASH API?
(by the way I did this succesfully when working with the Piccolo which in fact is quite similar to the control part of the Concerto).
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.