problems with PWM_SVM APP

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User20891
Level 1
Level 1
Hello,

I'm having some issues in implementing the SVM_PWM APP on Dave 4.

I tried to follow the code in APP's HELP:

"
#include
#include //Declarations from DAVE Code Generation (includes SFR declaration)

#define ANGLE_ONE_DEGREE (46603U)
#define ANGLE_SEVEN_DEGREE (ANGLE_ONE_DEGREE * 7.2)
int main(void)
{
DAVE_STATUS_t status;
status = DAVE_Init(); /* Initialization of DAVE Apps */
if(status == DAVE_STATUS_FAILURE)
{
/* Placeholder for error handler code. The while loop below can be replaced with an user error handler */
XMC_DEBUG(("DAVE Apps initialization failed with status %d\n", status));
while(1U)
{
}
}
PWM_SVM_Start(&PWM_SVM_0); // synchronous start for the CC8 slices.
/* Placeholder for user application code. The while loop below can be replaced with user application code. */
while(1U)
{
}
return 1;
}
//enable period match in event settings tab
//Drag one interrupt APP configure with below handler name
//connect period match signal to interrupt
void PeriodMatchInterruptHandler(void)
{
static uint32_t angle = 0;
if(angle > 0xffffff)
{
angle = 0;
}
else
{
angle = angle + ANGLE_SEVEN_DEGREE;
}
PWM_SVM_SVMUpdate(&PWM_SVM_0, 500, angle);
}
"

But I tried to measure the signal out of the pins and no PWM signal is showing, just ON or OFF states.

Can anyone help?
0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hi,

Could you kindly check the dave app based example code(PMSM_FOC) available which uses the SVM PWM block ? Please check this document for reference too.

Best Regards,
Vasanth

View solution in original post

0 Likes
2 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hi,

Could you kindly check the dave app based example code(PMSM_FOC) available which uses the SVM PWM block ? Please check this document for reference too.

Best Regards,
Vasanth
0 Likes
User20891
Level 1
Level 1
Vasanth wrote:
Hi,

Could you kindly check the dave app based example code(PMSM_FOC) available which uses the SVM PWM block ? Please check this document for reference too.

Best Regards,
Vasanth


Hello,

Actually I wanted to use the ACIM_FREQ_CTR App, but the SVM is not working there either.

Best regards,
José Alberto
0 Likes