Skip to content
Benjamin Vernoux edited this page Mar 24, 2023 · 2 revisions

HydraFW binary Auxiliary pins guide

This guide is updated towards firmware release HydraFW v0.10 and later

In all supported modes, the following binary commands allow to interact with 4 auxiliary pins that can be used as input or output.

The pins are PC4, PC5, PC6 and PC7

Commands

Once the PIN mode has been selected, the following commands are available :

  • 0b11000000 Read auxiliary pins
  • 0b1101wxyz Write auxiliary pins
  • 0b11100000 Read auxiliary pins mode
  • 0b11110000 Set auxiliary pins mode

Command details

Read auxiliary pins (0b11000000)

This command returns one byte containing the value of the four auxiliary pins in the last 4 bits.

Format :

MSB  1     2      3      4      5      6      7     8 LSB
|------|------|------|------|------|------|------|------|
     -     -      -      -     PC7    PC6    PC5    PC4

Write auxiliary pins (0b1101wxyz)

This command sets the auxiliary pins to the value set in each bit :

 - w : PC7
 - x : PC6
 - y : PC5
 - z : PC4

This command returns 0x01 if successful, 0x00 in case of error.

Read auxiliary pins mode (0b11100000)

This command returns one byte containing the current auxiliary pin configuration. Format :

MSB  1     2      3      4      5      6      7     8 LSB
|------|------|------|------|------|------|------|------|
 Pullup Pullup Pullup Pullup IN/OUT IN/OUT IN/OUT IN/OUT
    PC7    PC6    PC5    PC4    PC7    PC6    PC5    PC4

Pullup : 0=disable 1=enable
IN/OUT : 0=output  1=input

Set auxiliary pins mode (0b11110000)

This command must be followed by 1 byte, representing the status for each pin. Format :

MSB  1     2      3      4      5      6      7     8 LSB
|------|------|------|------|------|------|------|------|
 Pullup Pullup Pullup Pullup IN/OUT IN/OUT IN/OUT IN/OUT
    PC7    PC6    PC5    PC4    PC7    PC6    PC5    PC4

Pullup : 0=disable 1=enable
IN/OUT : 0=output  1=input

This command returns 0x01 if successful, 0x00 in case of error.

How to Flash/Use HydraFW

How to Build/Flash/Use HydraFW

Developer Getting-Started with HydraBus and STM32CubeIDE

Hardware

Firmware (hydrafw) performances

Firmware (hydrafw) Application guides

Firmware (hydrafw) guides

How to Help

Clone this wiki locally