Skip to main content
8 of 11
added 47 characters in body
stevenvh
  • 147.3k
  • 21
  • 465
  • 672

You don't want to do that! You'd configure the pin as output and make it high to provide power to the GPS receiver, but microcontrollers I/Os can only supply limited current, 25mA for the STM32F205xx (page 62 of the datasheet), which will be too low for powering your (and any other) GPS receiver (34 to 38 mA, as stated in the datasheet)

Use the I/O pin to drive a PNP transistor which will supply the required current.

enter image description here

Note that using a PNP inverses your logic: a logic low will turn the receiver on.

edit
Wouter would use a MOSFET instead of a BJT, and that's a good alternative. Just make sure you choose a logic-level FET, which will give you enough current at a \$V_{GS}\$ of -3.3V. The Rohm RZE002P02 is a suitable type. It will also have a lower voltage drop if your receiver needs less than about 200mA.

edit 2 (re clabacchio's addition of a datasheet)
This device operates at 1.8V, the STM32 at 3.3V. You'll want to control a 1.8V LDO with the PNP/MOSFET, or even better use an LDO with an enable input and control that from your microcontroller. No transistor needed. (Thanks for the suggestion, markrages.) You'll also need level shifters for the data.

stevenvh
  • 147.3k
  • 21
  • 465
  • 672