I'm planning to build a custom Arduino Mega PCB, so I downloaded the schematics and design files. For the schematic, I have a fairly good understanding of the connections, components, and their purpose.
However, I'm a bit unsure about the IC7B op-amp, RN5C/RN5D 10K voltage divider, and T1 FET and how they work together in the grand scheme of things. A picture of that part of the schematic is attached below. I also attached the power jack portion of the schematic below as well.
I'm assuming the op-amp will either send a voltage or not depending on the VIN line. That output is connected to gate of the FET that will either close or open the USB VCC line. So either the barrel jack or the USB will power the 5V Vcc line but NEVER both. Is that correct? I see the +3V3 line is the output of the voltage regulator but also the input of the op-amp so that's feedback op-amp right? I'm still not sure what the two 10K resistor voltage divider before the CMP input on the op-amp is for.
If you can confirm my guess and/or explain their role and importance, that'd be great.