STM8L151K6:COMP2...Does closing WINDWE analog switch (for Window mode) disconnect COMP1 non-inverting input from AS14 in the analog switch matrix?
Using the Cosmic IDE, I have the non-inverting input of COMP1 driven from PA4 by closing RI_AnalogSwitch_14 and RI_AnalogSwitch_0 and enabling RI_IOSwitch_3. I have COMP1 configured for COMP_Edge_Rising and the COMP1 interrupt is enabled. I see interrupts occurring when there are positive transitions on PA4. All good.
I'd really like to measure the slope of those transitions, so I want to use the Window mode to additionally trigger COMP2 at a lower voltage. According to figure 23 in the datasheet, it would seem that all I need to do (after setting the COMP2 inverting input appropriately and enabling the interrupt) is close the WNDWE analog switch to connect the non-inverting input of COMP1 to the non-inverting input of COMP2.
But this doesn't seem to work. Worse still, I now don't see COMP1 interrupts. It's as though closing the WNDWE analog switch has disconnected COMP1 from AS14 in the analog switch matrix.
Figure 54 doesn't seem to clarify the situation.
Perhaps, there is a clue in the data sheet:
In window mode, only the Group 8 (PD0, PD1 and PE5) can be used as a non-inverting input.
But that doesn't seem to correspond to Figure 23, which suggests that there is a possible routing through the analog switch matrix from other inputs.
Any help appreciated, Thanks,
Richard
