Disable Afec Interrupt Fail

Discussion around product based on ARM Cortex M4 core.

Moderators: nferre, ncollot

Posts: 4
Joined: Tue Dec 23, 2014 2:54 pm

Disable Afec Interrupt Fail

Mon May 04, 2015 5:44 pm

Hi Guys!
I'm using SAM4E to acquire two channels for each ADC.
After assigning callback function, I try to disable interrupt on DRDY for AFEC1, .
I report part of code to explain the problem.

Code: Select all

afec_set_callback(AFEC0, AFEC_INTERRUPT_DATA_READY, voltage_data_ready, 1);
afec_set_callback(AFEC1, AFEC_INTERRUPT_DATA_READY, current_data_ready, 1);
afec_set_callback(AFEC0, AFEC_INTERRUPT_OVERRUN_ERROR, voltage_overrun_error, 0);
afec_set_callback(AFEC1, AFEC_INTERRUPT_OVERRUN_ERROR, current_overrun_error, 0);
afec_disable_interrupt(AFEC1, AFEC_INTERRUPT_DATA_READY);
When the code runs, I get interruption from AFEC1 on DRDY,  although I've disabled the DRDY Interrupt (but if I read the Interrupt Mask Register for AFEC1, the interrupt results correctly disabled!).
Do you have any idea to solve this problem?
Where is the mistake?

Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest