Attachments are accessible only for community members.
Jul 29, 2019
05:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2019
05:31 PM
Hello,
I want to use the ADC for pin P2.9 on the XMC1302. It's attached to VADC0.G1CH4.
I followed this thread https://www.infineonforums.com/threads/3603-ADC-example-in-documentation-not-working and used the attached project from the Infineon employee.
Only change made from the project zip is in VADC.c where I uncommented lines that had VADC_G1,4 in them. Now the breakpoint I set in VADC_G1_Result_ISR() is never called. Why does this make the program stop working?
Thanks
I want to use the ADC for pin P2.9 on the XMC1302. It's attached to VADC0.G1CH4.
I followed this thread https://www.infineonforums.com/threads/3603-ADC-example-in-documentation-not-working and used the attached project from the Infineon employee.
Only change made from the project zip is in VADC.c where I uncommented lines that had VADC_G1,4 in them. Now the breakpoint I set in VADC_G1_Result_ISR() is never called. Why does this make the program stop working?
Thanks
2 Replies
Jul 30, 2019
10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 30, 2019
10:11 AM
Added this XMC_GPIO_Init as the first line in main() but the VADC_G1_Result_ISR is still not called.
XMC_GPIO_Init(XMC_GPIO_PORT2, 9, &(XMC_GPIO_CONFIG_t){.mode = XMC_GPIO_MODE_INPUT_TRISTATE, .output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH});
Jul 30, 2019
10:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 30, 2019
10:50 AM
The problem seems to be with XMC_VADC_GROUP_ChannelInit.
If this line is commented, then VADC_G1_Result_ISR is called. Any ideas?
XMC_VADC_GROUP_ChannelInit(VADC_G1,4, &g_channel_handle[4]);
If this line is commented, then VADC_G1_Result_ISR is called. Any ideas?