Jan 25, 2021
09:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 25, 2021
09:34 AM
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?
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
#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?
Solved! Go to Solution.
- Tags:
- dave 4.4.2
- IFX
- pwm_svm
1 Solution
Feb 18, 2021
01:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 18, 2021
01:59 AM
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
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
2 Replies
Feb 18, 2021
01:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 18, 2021
01:59 AM
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
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
Feb 19, 2021
06:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 19, 2021
06:33 AM
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