no interrupt with ADC004

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

cross mob
Not applicable
I build a project for xmc1100 with ADC001_Example1_XMC12 as model. Of course, for XMC1100 I must use ADC004, all other is the same.
(It's new build, not migrated project.)
In interrupt-routine I added some code to switch the LED on Board in Interrupt.
But nothing happens, while reading the value, I get a zero-value.
What's the trick here?
rgds
0 Likes
11 Replies
lock attach
Attachments are accessible only for community members.
Not applicable
Hi,

You should be able to get conversion result in debug view with attached example running on XMC1100 BootKit. It is built according to ADC001_Example1_XMC12.



Best regards,
Sophia
0 Likes
Not applicable
Thanks for your help, Sophia,
but now we have greater confusion. Your sample is near the same I built, as you say: ADC001_Example1_XMC12.
I changed input-pin to 2.7, migrate device to Q024F064 and it works twice. I made some extension to project until it did not run. No trouble, back to start, removed changed project from workspace, import your project, but I did not get it running anymore.
Do you have any idea? Or someone else?
rgds
0 Likes
Not applicable
Hi,

Would like to clarify the followings:
1) Did you try to run the example on XMC1100 BootKit with T038F064 package device?
2) If yes, did you try to change the pin from 2.5 to 2.7 and get it running on the same BootKit?
3) Did you try to run the project built for Q024F064 (with the same code & settings) but failed?
4) What do you mean "it works twice"?

Best regards,
Sophia
0 Likes
Not applicable
Hi,
1.) no, first migrated to Q024F064, changed Pin 2.5 to 2.7
3.) runs successfully TWICE
4.) TWICE means 2 (or 3) builds:
import, migration, build, success; some changes, build, success; some changes, build, fail (!)
drop complete project, reimport, migration, build, fail; drop, reimport, build, fail; ...

best regards
G.
0 Likes
Not applicable
I have changed a configuration to some Ports from group 0 and it works, but I didn't get a value from prot 2.7 (it's in group 1).
New empty project with adc004 on port 2.6 will work, change to port 2.7 will not work.

And, other question (maybe new thread):
How to coexist adc004 and uart001 in one project?

rgds
0 Likes
Not applicable
Hi Hans-Jürgen,

1) As for the P2.7 problem, it has been forwarded further, will inform you once get update.
2) What do you suppose to do with ADC004 & UART001?

Best regards,
Sophia
0 Likes
Not applicable
Hi Hans-Jürgen,

Here is the update for P2.7 problem:
The XMC1100 does not provide the dual group access to the channels. Each ADC pin is mapped only once to an ADC group. Especially in QFN24 package, only group0 is allowed to be used. Currently in ADC004, the P2.7 is assigned to group1 (Group1 CH1).

Pls follow up with eTicket 751668681.

Best regards,
Sophia
0 Likes
Not applicable
Hi, Sophia,
your answer from Apr 29th
2.) I read the values from Port, do something with it and I'll log these values and some results over UART.

Quite now I found the cause, why I didn't got an Interrupt with easy configuration:
I will not work, if there is an underscore in Name of InterruptServiceRoutine.
In your sample you use "GlobalResultEvent". I used "isr_Adc" and this does not work. After changing to "isrAdc", it works also.
(I can't remember, why sometimes it runs only twice.)

rgds H-J
0 Likes
Not applicable
Hi Hans-Jürgen,

The interrupt should work even use "isr_Adc", as long as it is the same as what has been defined in "Interrupt Node Configuration" tab and there is no "SPACE" in between eg. "isr Adc".

595.attach

Best regards,
Sophia
0 Likes
Not applicable
Hi, Sophia,

I should have test it without the actual updates.
With this updates it works as expected.
If there is a space isr-name in main.c, I'll get a compiler error, but solver doesn't generate an error. (I'm sure, there was no space in my test.)

rgds
Hans-Juergen
0 Likes
Not applicable
Hi Hans-Jürgen,

"DAVE TIP of the day: Why there is no warning if no interrupt function name defined?" explains the mechanism of creating an interrupt for the NVIC002 App. Hope you find it useful.

Best regards,
Sophia
0 Likes