Q Mode: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
== xQB: BlueTooth (QMODE_BT) ==
reads USB and sends to UART Tx and echos to USB<br>
reads UART Rx and echos to USB
@a: sets UART baudrate to 1200<br>
@b: sets UART baudrate to 2400<br>
@c: sets UART baudrate to 4800<br>
@d: sets UART baudrate to 9600<br>
@e: sets UART baudrate to 19200<br>
@f: sets UART baudrate to 38400<br>
@g: sets UART baudrate to 57600<br>
@h: sets UART baudrate to 115200<br>
@Q: quits and restarts STorM32 (wo initializing USB)
== xQT: QMODE_NT ==
== xQT: QMODE_NT ==


Line 31: Line 15:
NTFLASH12: calls do_ntflash(NTBUS_ID_IMU3)<br>
NTFLASH12: calls do_ntflash(NTBUS_ID_IMU3)<br>


NTTUNNEL: calls nttunnel()
NTQMODE01: calls do_ntqmode(NTBUS_ID_IMU1)<br>
NTQMODE02: calls do_ntqmode(NTBUS_ID_IMU2)<br>
NTQMODE04: calls do_ntqmode(NTBUS_ID_MOTORPITCH)<br>
NTQMODE05: calls do_ntqmode(NTBUS_ID_MOTORROLL)<br>
NTQMODE06: calls do_ntqmode(NTBUS_ID_MOTORYAW)<br>
NTQMODE11: calls do_ntqmode(NTBUS_ID_LOGGER)<br>
NTQMODE12: calls do_ntqmode(NTBUS_ID_IMU3)<br>
 
NTTUNNELWTMO: calls do_nttunnel()
 
NTQUIT: quits


NTQUIT: quit
=== do_nttunnel() ===


=== nttunnel() ===
reads USB and sends to NT bus Tx<br>
reads USB and sends to NT bus Tx<br>
reads NT bus Rx and sends to USB<br>
reads NT bus Rx and sends to USB<br>
timeouts if first char is not received within 30 secs, or if next char is not received within 2 secs
timeouts if first char is not received within 30 secs, or if next char is not received within 2 secs
quits and restarts STorM32 (wo initializing USB) after timeout
quits and restarts STorM32 (wo initializing USB) after timeout


=== ntflash() ===
=== do_ntflash() ===
 
clears NT bus<br>
clears NT bus<br>
sends NT bus flash command for specified ID<br>
sends NT bus FLASH command for specified ID, and then configures NT bus uart to 57600 bps and 8E1<br>
reconfigures NT bus uart to 57600 bps and parity even<br>
calls do_nttunnel()<br>
calls nttunnel()<br>
restores NT bus uart configuration<br>
restores NT bus uart configuration<br>
=== do_ntqmode() ===
sends NT bus QMODE command for specified ID<br>
reads USB and sends to NT bus Tx<br>
reads NT bus Rx and sends to USB<br>
quits upon @Q


== xQS: QMODE_STORM32 ==
== xQS: QMODE_STORM32 ==
Line 53: Line 52:
reads USB and executes command<br>
reads USB and executes command<br>
disables motors<br>
disables motors<br>
quits when command is executed and restarts STorM32 (wo initializing USB)<br>
quits when command is executed and restarts STorM32 (wo initializing USB)


c: resets command processor
c: resets command processor


FLASH: resets the STorM32 and calls the system bootloader  
FLASH: resets the STorM32 and calls the system bootloader<br>
ESPTUNNEL: calls do_esptunnel(0)<br>
ESPFLASH: calls do_esptunnel(1)<br>
UART1TUNNEL: calls do_uart1tunnel(0)<br>
OLEDFLASH: calls do_uart1tunnel(1)<br>
UART1RXTUNNEL: calls do_uart1rxtunnel()<br>
 
QUIT: quits


UART1TUNNEL: calls do_uart1tunnel()
=== do_esptunnel() ===


QUIT: quit
if 1: sets ESP into flash mode by pulsing pins accordingly<br>
clears usb, clears uart selected by {{PARAMNAME|EspUartConfiguration}}<br>
reads USB and sends to uart Tx<br>
reads uart Rx and sends to USB<br>
timeouts if first char is not received within 30 secs, or if next char is not received within 2 secs quits and restarts STorM32 (wo initializing USB) after timeout


=== do_uart1tunnel() ===
=== do_uart1tunnel() ===
if 1: sends 'FLASH', and then configures uart1 to 57600 bps and 8P1<br>
clears usb, clears uart1<br>
reads USB and sends to uart1 Tx<br>
reads uart1 Rx and sends to USB<br>
timeouts if first char is not received within 30 secs, or if next char is not received within 2 secs quits and restarts STorM32 (wo initializing USB) after timeout
=== do_uart1rxtunnel() ===
reads USB and echos to USB<br>
reads USB and echos to USB<br>
reads uart1 Rx and echos to USB<br>
reads uart1 Rx and sends to USB<br>


@a: sets uart1 baudrate to 1200<br>
@a: sets uart1 baudrate to 1200<br>
Line 75: Line 94:
@g: sets uart1 baudrate to 57600<br>
@g: sets uart1 baudrate to 57600<br>
@h: sets uart1 baudrate to 115200<br>
@h: sets uart1 baudrate to 115200<br>
@Q: quits and restarts STorM32 (wo initializing USB)
== xQs: QMODE_STORM32 UART ==
reads USB and UART, and executes command<br>
disables motors<br>
quits when command is executed and restarts STorM32 (wo initializing USB)<br>
c: resets command processor
FLASH: resets the STorM32 and calls the system bootloader
QUIT: quit
== xQB: BlueTooth (QMODE_BT) ==
reads USB and sends to UART Tx and echos to USB<br>
reads UART Rx and echos to USB
@a: sets UART baudrate to 1200<br>
@b: sets UART baudrate to 2400<br>
@c: sets UART baudrate to 4800<br>
@d: sets UART baudrate to 9600<br>
@e: sets UART baudrate to 19200<br>
@f: sets UART baudrate to 38400<br>
@g: sets UART baudrate to 57600<br>
@h: sets UART baudrate to 115200<br>


@Q: quits and restarts STorM32 (wo initializing USB)
@Q: quits and restarts STorM32 (wo initializing USB)

Latest revision as of 09:40, 2 June 2018

xQT: QMODE_NT

reads USB and executes command
disables motors
quits when command is executed and restarts STorM32 (wo initializing USB)

c: resets command processor

NTFLASH01: calls do_ntflash(NTBUS_ID_IMU1)
NTFLASH02: calls do_ntflash(NTBUS_ID_IMU2)
NTFLASH04: calls do_ntflash(NTBUS_ID_MOTORPITCH)
NTFLASH05: calls do_ntflash(NTBUS_ID_MOTORROLL)
NTFLASH06: calls do_ntflash(NTBUS_ID_MOTORYAW)
NTFLASH11: calls do_ntflash(NTBUS_ID_LOGGER)
NTFLASH12: calls do_ntflash(NTBUS_ID_IMU3)

NTQMODE01: calls do_ntqmode(NTBUS_ID_IMU1)
NTQMODE02: calls do_ntqmode(NTBUS_ID_IMU2)
NTQMODE04: calls do_ntqmode(NTBUS_ID_MOTORPITCH)
NTQMODE05: calls do_ntqmode(NTBUS_ID_MOTORROLL)
NTQMODE06: calls do_ntqmode(NTBUS_ID_MOTORYAW)
NTQMODE11: calls do_ntqmode(NTBUS_ID_LOGGER)
NTQMODE12: calls do_ntqmode(NTBUS_ID_IMU3)

NTTUNNELWTMO: calls do_nttunnel()

NTQUIT: quits

do_nttunnel()

reads USB and sends to NT bus Tx
reads NT bus Rx and sends to USB
timeouts if first char is not received within 30 secs, or if next char is not received within 2 secs quits and restarts STorM32 (wo initializing USB) after timeout

do_ntflash()

clears NT bus
sends NT bus FLASH command for specified ID, and then configures NT bus uart to 57600 bps and 8E1
calls do_nttunnel()
restores NT bus uart configuration

do_ntqmode()

sends NT bus QMODE command for specified ID
reads USB and sends to NT bus Tx
reads NT bus Rx and sends to USB
quits upon @Q

xQS: QMODE_STORM32

reads USB and executes command
disables motors
quits when command is executed and restarts STorM32 (wo initializing USB)

c: resets command processor

FLASH: resets the STorM32 and calls the system bootloader
ESPTUNNEL: calls do_esptunnel(0)
ESPFLASH: calls do_esptunnel(1)
UART1TUNNEL: calls do_uart1tunnel(0)
OLEDFLASH: calls do_uart1tunnel(1)
UART1RXTUNNEL: calls do_uart1rxtunnel()

QUIT: quits

do_esptunnel()

if 1: sets ESP into flash mode by pulsing pins accordingly
clears usb, clears uart selected by EspUartConfiguration
reads USB and sends to uart Tx
reads uart Rx and sends to USB
timeouts if first char is not received within 30 secs, or if next char is not received within 2 secs quits and restarts STorM32 (wo initializing USB) after timeout

do_uart1tunnel()

if 1: sends 'FLASH', and then configures uart1 to 57600 bps and 8P1
clears usb, clears uart1
reads USB and sends to uart1 Tx
reads uart1 Rx and sends to USB
timeouts if first char is not received within 30 secs, or if next char is not received within 2 secs quits and restarts STorM32 (wo initializing USB) after timeout

do_uart1rxtunnel()

reads USB and echos to USB
reads uart1 Rx and sends to USB

@a: sets uart1 baudrate to 1200
@b: sets uart1 baudrate to 2400
@c: sets uart1 baudrate to 4800
@d: sets uart1 baudrate to 9600
@e: sets uart1 baudrate to 19200
@f: sets uart1 baudrate to 38400
@g: sets uart1 baudrate to 57600
@h: sets uart1 baudrate to 115200

@Q: quits and restarts STorM32 (wo initializing USB)

xQs: QMODE_STORM32 UART

reads USB and UART, and executes command
disables motors
quits when command is executed and restarts STorM32 (wo initializing USB)

c: resets command processor

FLASH: resets the STorM32 and calls the system bootloader

QUIT: quit

xQB: BlueTooth (QMODE_BT)

reads USB and sends to UART Tx and echos to USB
reads UART Rx and echos to USB

@a: sets UART baudrate to 1200
@b: sets UART baudrate to 2400
@c: sets UART baudrate to 4800
@d: sets UART baudrate to 9600
@e: sets UART baudrate to 19200
@f: sets UART baudrate to 38400
@g: sets UART baudrate to 57600
@h: sets UART baudrate to 115200

@Q: quits and restarts STorM32 (wo initializing USB)