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.
hi:
I use f28020 as HALL sensor BLDC control .
when I migrated HVBLDC_Sensor from controlsuite , macro HALL3_READ_MACRO(hall1) as fllow :
#define HALL3_READ_MACRO(v) \
v.CmtnTrigHall = 0; /* Reset trigger, it only handshakes with calling program.*/ \
if (v.EdgeDebounced==0) /* Debounce current position. */ \
{ \
HALL3_DEBOUNCE_MACRO(v) \
v.CmtnTrigHall = v.EdgeDebounced; /* Set Commutation trigger here*/ \
} \
else /* If current position is debounced, find match in table */ \
HALL3_NEXT_STATE_MACRO(v) /* and return pointer to current state. Ptr to be incremented*/ \
/* by MOD6CNT after RET.*/ \
\
v.EdgeDebounced = 0; /* Reset trigger*/
question1:
EdgeDebounced is a switch of debouncing or debounced , but as below said . this macro run in debouncing adjust ,can not run HALL3_NEXT_STATE_MACRO(v),forever. because of last " v.EdgeDebounced = 0;" Is that correct?
question2:
in HALL3_DEBOUNCE_MACRO(v) , in my understand it start run and create HALLmap[i] function . but" HallMapPointe" don't useful at
BLDCPWM_MACRO(pwm1). because:
if (hall1.HallGpioAccepted==5) pwm1.CmtnPointer = 0;
else if (hall1.HallGpioAccepted==1) pwm1.CmtnPointer = 1;
else if (hall1.HallGpioAccepted==3) pwm1.CmtnPointer = 2;
else if (hall1.HallGpioAccepted==2) pwm1.CmtnPointer = 3;
else if (hall1.HallGpioAccepted==6) pwm1.CmtnPointer = 4;
else if (hall1.HallGpioAccepted==4) pwm1.CmtnPointer = 5;
so HallMapPointe just input from MOD6CNT and NOT output to BLDCPWM_MACRO. also" HallMap[i] " do not useful !
as these I think " HALL3_DEBOUNCE_MACRO(v)" do not useful , shall I correct?
qustion 3:
in HVBLDC_Sonser there has a" speed_pr.h " , in it : "SpeedScaler"=60*f/rmp_max; in initial SpeedScaler =260 .
I don't know why SpeedScaler =260. how calculate it ?
"BaseRpm"=1800 . 1800 means rmp_max?
best regard!
Hi,
We are not able to fully support this project as the people involved in this project are not around anymore. I can attempt to give some answers
1. Yes
2. It is needed to identify the switching sequence where the PWMs should be applied to and not how much duty cycle to use
3. You may have to experimentally verify how it is chosen, I have no clue right now.