Skip to content

HydraFW binary raw wire mode guide

Baldanos edited this page Apr 2, 2019 · 8 revisions

HydraFW binary raw-wire mode guide

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

Commands

Once the raw-wire mode has been selected, the following commands are available :

  • 0b00000000 Return to main mode. Returns BBIO1
  • 0b00000001 Mode identification. Returns RAW1
  • 0b00000110 Read byte
  • 0b00000111 Read bit
  • 0b00001000 Peek input pin
  • 0b00001001 Clock tick
  • 0b0000101x Clock low(0) / high(1)
  • 0b0000110x Data low(0) / high(1)
  • 0b0001xxxx Bulk raw-wire transfer
  • 0b0010xxxx Bulk clock ticks
  • 0b0011xxxx Bulk send bits
  • 0b01000000 Configure peripherals
  • 0b011000xx Set raw-wire speed
  • 0b10000xy0 Configure raw-wire port
  • 0b11xxxxxx Binary Auxiliary pins

Command details

###Read byte (0b00000110) This command ready a byte on the raw-wire bus, and sends it back to the user.

Read bit (0b00000111)

This command will send a clock pulse, then return the value of the data line to the user.

Peek input pin (0b00001000)

This command returns the state of the data line.

Clock tick (0b00001001)

This command sends a clock pulse on the CLK line. Returns 0x01 once done.

Clock low(0) / high(1) (0b0000101x)

This commands sets the CLK line low(0) or high(1). Returns 0x01 once done.

Data low(0) / high(1) (0b0000110x)

This commands sets the data line low(0) or high(1). Returns 0x01 once done.

Bulk raw-wire transfer (0b0001xxxx)

In this mode, the last 4 bits of the command define the number of bytes to write (from 1 to 16) (Command 0b00010000 will send 1 byte). Hydrabus will wait for the defined number of bytes, then send a 0x01 (acknowledge).

Bulk clock ticks (0b0010xxxx)

In this mode, the last 4 bits of the command define the number of clock ticks to send (from 1 to 16) (Command 0b00100000 will send 1 clock tick). Returns 0x01 once done.

Bulk send bits (0b0011xxxx)

In this mode, the last 4 bits of the command define the number of bits to send (from 1 to 16) (Command 0b00110000 will send 1 bit). Returns 0x01 once done.

Configure peripherals (0b01000000)

Do nothing (to be defined for future evolution). Returns 0x01.

Set raw-wire speed (0b011000xx)

This command sets the raw-wire device bitrate. The two last bits will select the speed (int bits/sec) within the following list :

  • 0b00 => 5000
  • 0b01 => 50000
  • 0b10 => 100000
  • 0b11 => 1000000

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

Configure raw-wire port (0b10000xy0)

This allows to set the following parameters :

  • x sets the mode (0=2-wire, 1=3-wire)
  • y sets the endianness (0=MSB, 1=LSB)

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

Clone this wiki locally
You can’t perform that action at this time.