DAVE_Init() does not finish when Pin App Method is used

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

cross mob
lock attach
Attachments are accessible only for community members.
Markus_S
Level 2
Level 2
First like received 10 sign-ins 5 questions asked
Hi,

I have startet a Project on the XMC2Go Baord that for now uses the DAVE-Apps PWM and ADC. The files are in the Attachement.
The observation is now that
- PWM starts normally (seen on Output Pin P0.7) if I comment out line 45 in main.c.
- Program does NOT finish the step "status=DAVE_Init();" if this line is not commentet out. No PWM-Signal on Pin 0.7.

But line 45 reads only " DIGITAL_IO_SetOutputLow(&DIGITAL_IO_0);". It has no connection to the PWM.

Why is that?
0 Likes
1 Solution
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The ADC is configured in continuous conversion mode and start conversion after initialization. My assumption is that your are not leaving the interrupt context when the next conversion interrupt is already pending if you keep the mentioned line uncommented.
You can alternatively deselect the start conversion after initialization and after the call to start the PWM, i.e. PWM_CCU4_Start(&PWM_CCU4_0);, you do ADC_MEASUREMENT_StartConversion(&ADC_MEASUREMENT_0);

Regards,
Jesus

View solution in original post

0 Likes
1 Reply
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The ADC is configured in continuous conversion mode and start conversion after initialization. My assumption is that your are not leaving the interrupt context when the next conversion interrupt is already pending if you keep the mentioned line uncommented.
You can alternatively deselect the start conversion after initialization and after the call to start the PWM, i.e. PWM_CCU4_Start(&PWM_CCU4_0);, you do ADC_MEASUREMENT_StartConversion(&ADC_MEASUREMENT_0);

Regards,
Jesus
0 Likes