Hello all,
in the below code for SAMD21 the pin D6 pin is toggled as fast as possible. This pin is tested with an oscilloscope, which is triggered on pulse length. Obviously there are several interrupt sources in use. One source is repeating each millisecond and takes about 5 microseconds. There seem to be other interrupts as well, these take about 2 microseconds.
My questions:
- Which interrupt sources are in use?
- Which timers are used? (With other words: Which timers can’t be used in my own software?)
- What happens (what won’t work any longer) if I disable these interrupts?
- Which priority have these interrupts?
Thanks, Michael
#define repeat_10(a) a;a;a;a;a;a;a;a;a;a
#define repeat_100(a) repeat_10(repeat_10(a))
#define repeat_1000(a) repeat_10(repeat_100(a))
void setup()
{
pinMode(D6,OUTPUT); // test pin
}
void loop()
{
repeat_1000
(
PORT->Group[1].OUTSET.reg = 256; // D6 = 1 PORT->Group[1].OUTCLR.reg = 256; // D6 = 0)
}
