I relatively new to working with MCU's and have been having some trouble figuring out what "mode" to set a pin to when trying to map it to the correct function. For this project, I am using a STM32L431VCT6 and I am just trying to wrap my head around what mode to set the pin to to correctly fit with what the schematic of this device is showing.
So from what I understand, the red is the input/output signal to/from that pin, and the black writing on the micro are the modes the pin is capable of. Now if I go to my STM32CubeMX application, and select pin 37 which is USB DTR/USB PRESENT
on the schematic, I am presented with a series of options. How can I figure out what one to choose? I've selected COMP1_INP
for the pin 37, but could it also be GPIO_Input
?
I've had a look at the data sheet for that pin, and it doesn't seem to give me much info other than its alternative modes.
Any help or pointers would be really appreciated.
USB DTR/USB PRESENT
seems like it should be a simple GPIO Input or possibly an edge triggered interrupt.COMP1_INP
would be the input to an analog comparator, which didn't seem like a useful choice for something labeledUSB DTR/USB PRESENT
. \$\endgroup\$