Hi
I am trying to use the analog comparator (COMPA) to trigger interrupts. That works fine in the code shown below, but my problem is to clear interrupts.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
I am trying to use the analog comparator (COMPA) to trigger interrupts. That works fine in the code shown below, but my problem is to clear interrupts.
Hello Arne,
Have you considered using sensor controller studio instead?
We currently don't have a proper COMPA RTOS driver, but the implementation in sensor controller studio can achieve robust and low power operation.
I think you need to clear the AUX_COMPA flag in the EVTOMCUFLAGS register (AUX_EVCTL register) before you clear MCU flag (IntPendClear(INT_AUX_COMPA)). The polarity is set in EVTOMCUPOL and is by default set to 0h (high level) which is what you want?
Also make sure to set a power constraint for the aux domain or disable power saving when using the COMPA.
Hi Erik
I have looked into Sensor Controller Studio, but I found it a bit hard to test the code. Looking forward to next release where I understand that you are able to test the code directly from Sensor Controller Studio.
However, I tested your solution by clearing the events from AUX, and it worked!
Thanks a lot!
Regards Arne