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.
是这段程序吗?没看明白,为什么pwm1.CmtnPointer只给0,有可能转不起来?
LOOP_CNT_MAX的初值是0,“ ”if (LoopCount != LOOP_CNT_MAX) LoopCount++; ” 这句好像永远也不会执行
// Initial Rotor Alignment Process
if (AlignFlag != 0)
{
mod1.Counter = 0;
pwm1.CmtnPointer = 0;
BLDCPWM_MACRO(1,2,3,pwm1)
if (VirtualTimer > 0x7FFE)
{ if (LoopCount != LOOP_CNT_MAX)
LoopCount++;
else
{
AlignFlag = 0;
VirtualTimer = 0;
VirtualTimer++;
VirtualTimer &= 0x00007FFF;
}
}
else
{
VirtualTimer++;
VirtualTimer &= 0x00007FFF;
}
}
else
{
// =============================== LEVEL 1 ======================================
// This Level describes the steps for a minimum system check-out which confirms
// operation of system interrupts, some peripheral & target independent modules
// and one peripheral dependent module.
// ==============================================================================
#if (BUILDLEVEL==LEVEL1)
。。。。。。。。。。。。。。。。。。。
我知道level1~level3都是开环转,但是 level1之前的那段程序,也就是前面我拷贝的那段程序是做什么用的?为什么我走Level1 电机也没转,需要改什么参数吗?EnableFlag已经置1,也能听到电流的声音,但电机不转.