I am having a hard time understanding the Reference manual in regards to the ADC Threshold.
Whatever I have here is working. Now, I am trying to understand it.
I set the threshold in the threshold registers.
There is only 4 Threshold registers if I am not mistaken? (THRHLR0, THRHLR1, THRHLR2, THRHLR3)
Now, I select the threshold register into the ADC channel I am using
ADC_1.CWSELR1.B.WSEL_CH9 = 0x0; //0000 : THRHLR0 register is selected
The Manual mentions that I can select one of 15 threshold registers, but there seems to only be 4?
1110 : THRHLR14 register is selected
1111 : THRHLR15 register is selected
Now, I enable the Watchdog for Channel 9
ADC_1.CWENR0.B.CWEN9 = 1;
Here I enable the 'Watchdog Threshold Interrupt'
The problem is that there seems to be 5 watchdogs.
How did, or does, the channel specify which watchdog to use?
Is the watchdog a Threshold Watchdog and there are 4 of them?
ADC_1.WTIMR.B.MSKWDG0H = 1;
ADC_1.WTIMR.B.MSKWDG0L = 1;