Hello, I'd like to know how to do it correctly generates an interrupt on a microcontroller from Atmel, a SAMD10.
I am currently working on the RTC module and I had created a small program that would light an LED when the counter of the RTC module was equal at the value
that I fixed (1 second) with a flag on the COMP register.
Currently, I want to generate an interrupt without using the ASF library that is too large.
My program is composed of multiple files so I want to generate an interrupt when the value of my counter is equal to the register count.
I tried things without great success.
But I do not see how writing this interruption without using the ASF? If I use the flags, we have to wait until my program gets to the line of code with the condition if (...). In any case, if I only write a condition that will not work.
I can understand the interruption but I can not put it into practice. I understand that if the RTC module counter reaches a second, I have to interrupt
the execution of the current program to return to the execution of subprogramme corresponding to the interruption.
Does someone could tell me how to implement an interruption?
thanks