DSPRelated.com
Forums

Motor control application using DSP56F807

Started by kvnvarmain May 17, 2006
Hi i am working on a motor control application using DSP56F807.We are
developping an algorithm for position control of BLDC motor.I am facing
a problem in the commutaion algorithm of the BLDC motor. Actually we
have developped a commutaion algorithm and it is working(not upto the
mark). we have configured our PWM module for edge aligned, independent
mode of operation,16Khz of PWM frequency.Actually the value we enter
into the six value registers would decide the PWM duty cycle. But in my
case it is not happening what ever value i am giving into the value
registers, the output duty cycle is not changing.Another related issue
is that the counter register shoud count the clock pulses and whenever
it reaches the modulo value, it should be reset but this is also npt
happening. please help me in this regard

thanks and regards
Varma KVN
After you reload PWM duty cycle registers, you need to
fire load ok bit by setting LDOK bit in PWM Control
Register.

Charlie.

--- kvnvarmain wrote:

> Hi i am working on a motor control application using
> DSP56F807.We are
> developping an algorithm for position control of
> BLDC motor.I am facing
> a problem in the commutaion algorithm of the BLDC
> motor. Actually we
> have developped a commutaion algorithm and it is
> working(not upto the
> mark). we have configured our PWM module for edge
> aligned, independent
> mode of operation,16Khz of PWM frequency.Actually
> the value we enter
> into the six value registers would decide the PWM
> duty cycle. But in my
> case it is not happening what ever value i am
> giving into the value
> registers, the output duty cycle is not
> changing.Another related issue
> is that the counter register shoud count the clock
> pulses and whenever
> it reaches the modulo value, it should be reset but
> this is also npt
> happening. please help me in this regard
>
> thanks and regards
> Varma KVN
>
__________________________________________________
After loading the values to the PWM value register you need to set the LDOK bit in PWM contol register, then only the new duty cycle will come into effect.

>From your second doubt it is very clear that the PWm module initialization is not done correctly to work as per your expectation.

Share your code probably I can help you. Other way is download SDK from freescale website and you get examply code in SDK for BLDC motor commutation and also for proper initialization code for PWM.

Hope this will help you.

Regarsd,
Sankar

On Wed, 17 May 2006 kvnvarmain wrote :
>Hi i am working on a motor control application using DSP56F807.We are
>developping an algorithm for position control of BLDC motor.I am facing
>a problem in the commutaion algorithm of the BLDC motor. Actually we
>have developped a commutaion algorithm and it is working(not upto the
>mark). we have configured our PWM module for edge aligned, independent
>mode of operation,16Khz of PWM frequency.Actually the value we enter
>into the six value registers would decide the PWM duty cycle. But in my
>case it is not happening what ever value i am giving into the value
>registers, the output duty cycle is not changing.Another related issue
>is that the counter register shoud count the clock pulses and whenever
>it reaches the modulo value, it should be reset but this is also npt
>happening. please help me in this regard
>
>thanks and regards
>Varma KVN