Skip to content
Baldanos edited this page Nov 28, 2015 · 48 revisions

I recommend Putty for terminal to be used with HydraBus(hardware) and hydrafw(firmware) connected with USB1 or 2.

Those commands are updated towards firmware release HydraFW v0.6 Beta: **HydraFW (HydraBus) v0.6-beta-xxx

##HydraFW (HydraBus/HydraNFC) supported commands

Note:

  • All commands shall be separated by a space.
  • During a blocking read or write which wait for data(for example Slave mode), you can abort the wait by pressing HydraBus UBTN button.

##All Commands > help Available commands history Command history clear Clear screen show Show information logging Turn logging on or off sd SD card management adc Read analog values dac Write analog values pwm Write PWM gpio Get or set GPIO pins spi SPI mode i2c I2C mode 2-wire 2-wire mode uart UART mode nfc NFC mode can CAN mode sump SUMP mode jtag JTAG mode random Random number debug Debug mode

###show command

  • show system Display system Info (MCU, Flash, Kernel, Compiler ...)
  • show memory Display chibios memory informations
  • show threads Display chibios thread informations
  • show sd Display SD card informations

###logging command

  • Usage: logging [sd <file>] <on/off>

Example logging all in/out text from terminal in SD card file test.txt in root dir:

  • Start logging:

    • logging sd test.txt on
  • Stop logging:

    • logging off

###SD Card commands > help sd SD card management show Show SD information mount Mount SD card umount Unmount SD card erase Erase and reformat SD card cd Change SD card directory pwd Show current SD card directory ls List files on SD card test-perf Test SD card performance cat Display (ASCII) file on SD card hd Hexdump file on SD card rm Remove file or directory mkdir Create new directory

###ADC commands > help adc Usage: adc <adc1/tempsensor/vrefint/vbat> [period (nb ms)] [samples (nb sample)/continuous] adc1 ADC1 (PA1) tempsensor Temperature sensor vrefint Internal reference voltage vbat VBAT voltage period Delay between samples (msec) samples Number of samples continuous Read continuously

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-ADC-guide

###DAC commands > help dac Usage: dac <dac1/dac2> <raw (0 to 4095)/volt (0 to 3.3V)/triangle/noise> [exit] help DAC1, DAC2 (12bits DAC 0 to 4095/3.3V) dac1 DAC1 (PA4 used by ULED) dac2 DAC2 (PA5) raw Raw value <0 to 4095> volt Volt <0 to 3.3v> triangle Triangle output (5Hz and amplitude 3.3V) noise Noise output (amplitude 3.3V) exit Exit DAC mode (reinit DAC1&2 pins to safe mode/in)

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-DAC-guide

###GPIO commands > help gpio 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> One or more GPIO pins (PA0-15, PB0-11, PC0-15, PA* ...) mode Mode (in/out/open-drain) pull GPIO pull (up/down/floating) period Delay between reads, in milliseconds read Read GPIO values continuous Read continuously on Set GPIO pin off Clear GPIO pin

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-GPIO-guide

###Protocol SPI commands > help spi Configuration: spi [device (1/2)] [pull (up/down/floating)] [mode (master/slave)] [frequency (value hz/khz/mhz)] [polarity 0/1] [phase 0/1] [msb-first/lsb-first] Interaction: [cs-on/cs-off] <read/write (value:repeat)> [exit] device SPI device (1/2) pull GPIO pull (up/down/floating) mode Mode (master/slave) frequency Bus frequency polarity Clock polarity (0/1) phase Clock phase (0/1) msb-first Send/receive MSB first lsb-first Send/receive LSB first

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-SPI-guide

###Protocol I2C commands > help i2c Configuration: i2c [pull (up/down/floating)] [frequency (value hz/khz/mhz)] Interaction: [] [] <read/write (value:repeat)> pull GPIO pull (up/down/floating) frequency Bus frequency

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-I2C-guide

###Protocol 2-wire commands > help 2-wire 2-wire mode device 2-wire device (1) pull GPIO pull (up/down/floating) msb-first Send/receive MSB first lsb-first Send/receive LSB first

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-2wire-guide

###Protocol UART commands > help uart Configuration: uart [device (1/2)> [speed (value in bauds)] [parity (none/even/odd)] [stop-bits (1/2)] Interaction: <read/write (value:repeat)> device UART device (1/2) speed Bus bitrate parity Parity (none/even/odd) stop-bits Stop bits (1/2)

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-UART-guide

###Protocol CAN commands > help can CAN mode device CAN device (1/2) speed Bus bitrate

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-CAN-guide

###SUMP mode > help sump SUMP mode

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-SUMP-guide

###Protocol JTAG commands > help jtag JTAG mode device JTAG device (1) pull GPIO pull (up/down/floating) msb-first Send/receive MSB first lsb-first Send/receive LSB first

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-JTAG-guide

###Random number

  • random returns a 32bit random number from the MCU TRNG
  • ~ command in any mode sends a random byte

###Additional commands for HydraBus+HydraNFC: > nfc NFC> help show Show NFC parameters mifare MIFARE (ISO14443A) vicinity Vicinity (ISO/IEC 15693) scan Scan sniff Sniff (ISO14443A only) exit Exit NFC mode

For more details see https://github.com/bvernoux/hydrafw/wiki/HydraFW-HYDRANFC-guide

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