我们做的是电机驱动,所用芯片是F280049C。SDK是C2000Ware_MotorControl_SDK_3_00_01_00。
电机有一些参数是需要识别的,比如各个offset, 比如USER_MOTOR_Rs_Ohm, USER_MOTOR_Ls_d_H,USER_MOTOR_Ls_q_H等等;
而这些识别是需要花费时间的,理想状况是马达驱动只识别一次,保存下来,以后再次启动就不用识别了。
另外应该还会自学习的参数,比如hall顺序,等等。都需要方案能够保存参数。
我在网上搜了flash使用的介绍,几乎都指向c2000ware\driverlib\f28004x\driverlib\flash.c的库和c2000ware\driverlib\f28004x\examples\flash的例程。
但flash api却没有读函数,只有写,擦,验证函数,比如
Fapi_StatusType Fapi_doBlankCheck( uint32 *pu32StartAddress, uint32 u32Length, Fapi_FlashStatusWordType *poFlashStatusWord)
Fapi_StatusType Fapi_doVerify( uint32 *pu32StartAddress, uint32 u32Length, uint32 *pu32CheckValueBuffer, Fapi_FlashStatusWordType *poFlashStatusWord)
Fapi_StatusType Fapi_issueProgrammingCommand( uint32 *pu32StartAddress, uint16 *pu16DataBuffer, uint16 u16DataBufferSizeInWords, uint16 *pu16EccBuffer, uint16 u16EccBufferSizeInBytes, Fapi_FlashProgrammingCommandType oMode)
那么我的问题是,有办法读出来吗?,假设用一段flash保存了用户参数,却无法读出来,就无法给需要的参数做初始化,请问我对flash api的理解有误吗?
我这个用户需求如何实现?