Not applicable
Mar 21, 2013
06:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 21, 2013
06:04 AM
Hello im trying to do ADC conversions on 2 channels continuously. After a conversion is finished i want to read out the results. It works fine if i map the signal "Global Result Event" to a NVIC002.
Then i wanted to split it to 2 different interrupts (one for channel AA and one for channel BA) and mapped "channel AA event" and "channel BA event" to a NVIC002 interrupt node and its not working anymore because there are no channel events generated. When i set a channel event by software (ADC001_SetChannelEvtFlag (&ADC001_Handle0, &ADC001_ChannelAAHandle)) it directly jumps to the interrupt routine.
my Program is more or less like this:
int main(void)
{
DAVE_Init(); // IO004_Init() is called within DAVE_Init()
ADC001_GenerateLoadEvent((ADC001_HandleType*)&ADC001_Handle0);
ADC001_SetChannelEventMode((ADC001_HandleType*)&ADC001_Handle0, &ADC001_ChannelAAHandle,
ADC001_CHANNEL_EVENT_ALWAYS);
ADC001_SetChannelEventMode((ADC001_HandleType*)&ADC001_Handle0, &ADC001_ChannelBAHandle,
ADC001_CHANNEL_EVENT_ALWAYS);
while(1){
//With this line it works, therefore no events are generated?
//ADC001_SetChannelEvtFlag (&ADC001_Handle0, &ADC001_ChannelAAHandle);
}
}
//Interrupt Routine
void myADCInterrupt0(void){
while(1);
}
Thanks for your help
Werner
Then i wanted to split it to 2 different interrupts (one for channel AA and one for channel BA) and mapped "channel AA event" and "channel BA event" to a NVIC002 interrupt node and its not working anymore because there are no channel events generated. When i set a channel event by software (ADC001_SetChannelEvtFlag (&ADC001_Handle0, &ADC001_ChannelAAHandle)) it directly jumps to the interrupt routine.
my Program is more or less like this:
int main(void)
{
DAVE_Init(); // IO004_Init() is called within DAVE_Init()
ADC001_GenerateLoadEvent((ADC001_HandleType*)&ADC001_Handle0);
ADC001_SetChannelEventMode((ADC001_HandleType*)&ADC001_Handle0, &ADC001_ChannelAAHandle,
ADC001_CHANNEL_EVENT_ALWAYS);
ADC001_SetChannelEventMode((ADC001_HandleType*)&ADC001_Handle0, &ADC001_ChannelBAHandle,
ADC001_CHANNEL_EVENT_ALWAYS);
while(1){
//With this line it works, therefore no events are generated?
//ADC001_SetChannelEvtFlag (&ADC001_Handle0, &ADC001_ChannelAAHandle);
}
}
//Interrupt Routine
void myADCInterrupt0(void){
while(1);
}
Thanks for your help
Werner
5 Replies
Mar 22, 2013
11:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 22, 2013
11:34 AM
Hi Werner,
You must enable the particular channel event that you want to cause the interrupt. This is done in the ACDCH001 GUI in the "Advanced Channel Configurations" tab by selecting the "Channnel Event Mode". I believe in your case, you are not using the limit checker, so you would select "Always" in this box.
Best regards,
Mike
You must enable the particular channel event that you want to cause the interrupt. This is done in the ACDCH001 GUI in the "Advanced Channel Configurations" tab by selecting the "Channnel Event Mode". I believe in your case, you are not using the limit checker, so you would select "Always" in this box.
Best regards,
Mike
Not applicable
Mar 25, 2013
07:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 25, 2013
07:35 AM
Thanks for your answer Mike. But this will not work with ADC001 app or? I got it to work with the ADC003 (There you have a ADCCH001 app included).
Mar 29, 2013
03:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 29, 2013
03:06 PM
Sorry for the misuderstanding. Have you tried using an NVIC001 App instead?
Not applicable
Apr 27, 2013
08:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 27, 2013
08:58 AM
Hi Werner,
I'm experiencing the same problem using 2 ADC's. Did you manage to solve the problem?
I'm trying to read multiple ADC and use the values to set a PWM but I could only get it work with 1 ADC.
Best Regards.
I'm experiencing the same problem using 2 ADC's. Did you manage to solve the problem?
I'm trying to read multiple ADC and use the values to set a PWM but I could only get it work with 1 ADC.
Best Regards.
Not applicable
Apr 29, 2013
06:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 29, 2013
06:18 AM
Sounds like you are looking for ADC002 functionality.
You can setup two channels with the start mode of cancel inject repeat and in the queue configuration check the source interrupt and refill boxes.
After this you will be able to connect interrupt signals from the ADC002 app to an NVIC002 apps to connect to your interrupt handlers.
You can setup two channels with the start mode of cancel inject repeat and in the queue configuration check the source interrupt and refill boxes.
After this you will be able to connect interrupt signals from the ADC002 app to an NVIC002 apps to connect to your interrupt handlers.