希望TI出个这个工具的使用教程,一步一步的,怎么操作。
另外哪位大侠会的话也可以告诉我一下。
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.
希望TI出个这个工具的使用教程,一步一步的,怎么操作。
另外哪位大侠会的话也可以告诉我一下。
F021 Flash API Reference Guide:http://www.ti.com/lit/ug/spnu501h/spnu501h.pdf
Advanced F021 Flash API Erase/Program Usage:http://www.ti.com/lit/an/spna148/spna148.pdf
上面是F021 Flash API user guide,更多信息可浏览wiki:
http://processors.wiki.ti.com/index.php/F021FlashApi?keyMatch=F021%20Flash%20API&tisearch=Search-EN
Hi gaoyang,
这个建议好,后续可以整理一份文档出来。
今天刚好跟同事聊到这个话题,这里借花献佛,以LS0432举例简述F021 Flash API的使用步骤,使用HalCoGen生成底层驱动后,修改如下位置:
1. Sys_startup.c 里增加函数_copyAPI2RAM_()的调用;
/* USER CODE BEGIN (75) */ _copyAPI2RAM_(); /* USER CODE END */ /* call the application */ /*SAFETYMCUSW 296 S MR:8.6 <APPROVED> "Startup code(library functions at block scope)" */ /*SAFETYMCUSW 326 S MR:8.2 <APPROVED> "Startup code(Declaration for main in library)" */ /*SAFETYMCUSW 60 D MR:8.8 <APPROVED> "Startup code(Declaration for main in library;Only doing an extern for the same)" */ main(); /* USER CODE BEGIN (76) */ /* USER CODE END */ /*SAFETYMCUSW 122 S MR:20.11 <APPROVED> "Startup code(exit and abort need to be present)" */ exit(0);
2. 在sys_core.asm里增加如下部分:
;------------------------------------------------------------------------------- ; ; Copy the Flash API from flash to SRAM. ; .def _copyAPI2RAM_ .asmfunc _copyAPI2RAM_ .ref api_load flash_load .word api_load .ref api_run flash_run .word api_run .ref api_size flash_size .word api_size ldr r0, flash_load ldr r1, flash_run ldr r2, flash_size add r2, r1, r2 copy_loop1: ldr r3, [r0], #4 str r3, [r1], #4 cmp r1, r2 blt copy_loop1 bx lr .endasmfunc
3. 在sys_core.h里增加如下函数声明:
void _copyAPI2RAM_(void);
4. 完成上述配置后,在main()中调用Flash_API即可。
多谢,等手把手的文档出来,会有很大帮助的,今年已经有不少朋友打听这个工具怎么使用了。
你好我现在的烧写方式就是像你所说的这样啊。但是我现在想换一种方式烧写FlashDriver。就是把FlashDriver部分做成一个Hex文件,在上位机烧写ECU的Hex文件之前先烧写FlashDriver。所以不太会做了。不知道如何将给的F021库能以Hex文件的形式烧录。另外您方便留一下您的联系方式吗?QQ号或者邮箱,以后有问题可以继续请教你!
非常赞,就是这个问题。
另外Fapi_enableMainBankSectors(0xFF); 需改成0xFFFF