Interrupt issue

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

cross mob
FD_aurix
Level 5
Level 5
100 sign-ins 100 replies posted 5 solutions authored

Hi all

 

I’ve a CCU6 counter that, on the period match trigs tha ADC start of conversion and generate an interrupt (for debug purpose).

Inside this interrupt I flip one output pin  (trace C3)

At the end of conversion of the ADC I’ve another interrupt that flips another pin (trace C2).

I’m experience some issue related to the interrupt handling, maybe I’m missing something into the configuration.

It seems that, in some occasiona t the moment totally randomly, the interrupt flag is not cleared once service the interrupt and the same interrupt is re-triggered.

As you can see the internal signal seems to work properly, the ADC is properly triggered (trace 2) even if no evicence is present on the debug signal related to the counter (C3)

Below how I’ve defined the interrupt (Compiler Tasking )

 

void __interrupt(50) __vector_table(1) __enable_  interrupt_ADC (void);

 

void interrupt_ADC (void)

{

      debug_pin_toggle();

}

 

Same things sometime happens on the ADC  end of conversion interrupt.

 

I’m missing something? I've to clear some flags into the interrupt function?

0 Likes
1 Solution
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

I guess you are using EVADC, if so there are flag registers (eg. GxCEFLAG, GxREFLAG, GxSEFLAG) which need to be cleared within the interrupt routine. 

Thanks.

View solution in original post

0 Likes
1 Reply
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

I guess you are using EVADC, if so there are flag registers (eg. GxCEFLAG, GxREFLAG, GxSEFLAG) which need to be cleared within the interrupt routine. 

Thanks.

0 Likes