TI论坛
直播中

杨万富

7年用户 1495经验值
擅长:526774
私信 关注
[问答]

请问InstaSPIN-FOC lab 11的FAST_ROM_V1p6在哪定义的?

lab11为A Simplified Example without Controller Module,程序中有如下代码:
#ifdef FAST_ROM_V1p6
[
// These function calls are used to initialize the estimator with ROM
// function calls. It needs the specific address where the controller
// object is declared by the ROM code.
CTRL_Handle ctrlHandle = CTRL_init((void *)USER_CTRL_HANDLE_ADDRESS
,0x200);
CTRL_Obj *obj = (CTRL_Obj *)ctrlHandle;
// this sets the estimator handle (part of the controller object) to
// the same value initialized above by the EST_init() function call.
// This is done so the next function implemented in ROM, can
// successfully initialize the estimator as part of the controller
// object.
obj->estHandle = estHandle;
// initialize the estimator through the controller. These three
// function calls are needed for the F2806xF/M implementation of
// InstaSPIN.
CTRL_setParams(ctrlHandle,&gUserParams);
CTRL_setUserMotorParams(ctrlHandle);
CTRL_setupEstIdleState(ctrlHandle);
]
#else
[
// initialize the estimator. These two function calls are needed for
// the F2802xF implementation of InstaSPIN using the estimator handle
// initialized by EST_init(), these two function calls configure the
// estimator, and they set the estimator in a proper state prior to
// spinning a motor.
EST_setEstParams(estHandle,&gUserParams);
EST_setupEstIdleState(estHandle);
]
#endif

// get Idq from estimator to avoid sin and cos, and a Park transform,
// which saves CPU cycles
EST_getIdq_pu(estHandle,&gIdq_pu);
请问:
1、FAST_ROM_V1p6在哪定义的?程序中找了半天都没找到。
2、CTRL_init()和EST_getIdq_pu()两个函数都是在main.h中声明的,这两个函数的原型在哪?

回帖(1)

冯敬宇

2018-12-6 10:56:55
1. 右键工程属性,C2000 compiler 》 advanced option 》 predefine.
只有F2806x 需要这个。
2.  ROM里面,看不到。
ERIC
                                                                         - ERIC
举报

更多回帖

发帖
×
20
完善资料,
赚取积分