Dear All
How can I drive 2 BLDC motor usinc InstaSPIN FOC / HAL and have access to the PWM of the second BOOSTXL-DRV8301
// write the PWM compare values
HAL_writePwmData(halHandle,&gPwmData);
only access the bottom DRV8301
Thanks
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.
Dear All
How can I drive 2 BLDC motor usinc InstaSPIN FOC / HAL and have access to the PWM of the second BOOSTXL-DRV8301
// write the PWM compare values
HAL_writePwmData(halHandle,&gPwmData);
only access the bottom DRV8301
Thanks
Dear Chris,
Thank you for your reply. I couldn't find ctrl_both.h
Could you explain how to use the CTRL_init(), If FAST_ROM_V1p6 is not defined(I assume it has to be removed if I want to use two CTRL and EST)? I found there is a source of this function sw\modules\ctrl\src\float. Specifically, how do I assign the pmemory?
My understanding is that CTRL and Estimator have their own memory block in ROM , so called FAST. If I need two CTRL and Estimator, there needs someplace to accommodate the second one, right?
Dear Chris,
Thank you very much for your reply. I might figure out where I was wrong:
I used two CTRL and EST handle.
CTRL_Handle ctrlHandle;
CTRL_Handle ctrlHandle_J1;
so something like ctrlHandle_J1 = CTRL_initCtrl(ctrlNumber_J1, estNumber_J1); can cause problem, because there is only one CTRL allowed in FAST. Am I right?
So the major overhaul is to edit the CTRL_Obj, which means a whole bunch of variables , flags and functions.But I need to use only one CTRL_Handle. Am I right?
Thank you
Yichao
Hi Yichao and Chris
Thanks for your help, I will take a look at the code provided by Yichao, but why did you replace the ctrl.x hal.x in the TI directory, it would be more interesting to replace them in the project working directory
Right now I am trying to achieve a QEP reading while still using sensorless, and it is not obvious because of the way the CTRL_runOnLine_User and CTRL_runOnLine functions are written
best
Lotfi