Skip to content

HydraFW GPIO guide

Benjamin Vernoux edited this page Nov 19, 2018 · 8 revisions

HydraFW GPIO (General Purpose Input/Output)

Input type:  0 to 5V

Output type: 3.3volt normal, or open drain
(pull up/pull down resistors integrated in MCU or external).
Pull-up/down resistors Integrated in MCU: Between 30 to 50K (Typical 40K).
Maximum voltage: 5.5volts (5volt safe).

Output type - open drain/open collector (high=Hi-Z, low=ground),
 normal (high=3.3volts, low=ground).
Use open drain/open collector output types with pull-up resistors
for multi-voltage interfacing.

This guide is updated towards firmware release HydraFW v0.9 Beta

GPIO configuration syntax description:

Configuration: gpio <PA0-15, PB0-11, PC0-15, PA*> <mode (in/out/open-drain)> [pull (up/down/floating)]

Interaction: gpio <PA0-15, PB0-11, PC0-15, PA*> [period (nb ms)] <read/continuous> or <on/off>


  • <string> One or more GPIO pins PA0-15, PB0-11, PC0-15, PA*

  • mode with parameter in, out or open-drain

  • pull with parameter up or down or floating to choose internal MCU pull up/down or no pull/external

  • read read GPIO value(s)

  • continuous read continuously

  • on Set GPIO pin (work only for GPIO configured as out or open-drain)

  • off Clear GPIO pin (work only for GPIO configured as out or open-drain)

GPIO configuration & interaction example:

Configuration & interaction on HydraNFC GPIO:

> gpio pa3 pb11 mode out off
Clearing PA3 PB11

> gpio pa2 pc0-1 mode out on
Setting PA2 PC0 PC1

> gpio pb11 mode out on
Setting PB11

> gpio pa2-3 pc0-1 pb11 r
PA2     1
PA3     0
PB11    1
PC0     1
PC1     1

Warning with PA9 in open-drain with internal pull up on

> gpio pa9 mode open-drain pull up on
If we measure the PA9 we should think it output +3v3 but in fact the output is +1.1V
It seems linked to the fact this pin is special like defined in datasheet 
see Table 58. USB OTG FS DC electrical characteristics => it seems linked to RPD / RPU for PA9 to be confirmed
Clone this wiki locally
You can’t perform that action at this time.