Attachments are accessible only for community members.
Feb 10, 2020
02:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2020
02:32 AM
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?
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?
Solved! Go to Solution.
1 Solution
Feb 10, 2020
05:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2020
05:31 AM
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
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
1 Reply
Feb 10, 2020
05:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2020
05:31 AM
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
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