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

XMC™ Forum Discussions

User16619
Level 1
Level 1
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
0 Likes
2 Replies
User16619
Level 1
Level 1
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});
0 Likes
User16619
Level 1
Level 1
The problem seems to be with XMC_VADC_GROUP_ChannelInit.
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?
0 Likes