Updated Debug Serial (markdown)

Candas1
2021-01-29 23:46:36 +01:00
parent d4ad9a7ad2
commit 041665c439

@@ -15,7 +15,7 @@ Debug Serial will allow you to get information from the board as Human readable
Use a serial terminal/monitor to read the output at 115200 bauds (could be 38400 bauds if you use a previous version of the firmware).<br /> Use a serial terminal/monitor to read the output at 115200 bauds (could be 38400 bauds if you use a previous version of the firmware).<br />
DEBUG_SERIAL_ASCII output is: DEBUG_SERIAL_ASCII output is:
`in1:345 in2:1337 cmdR:0 cmdL:0 BatADC:0 BatV:0 TempADC:0 Temp:0\n` `in1:345 in2:1337 cmdR:0 cmdL:0 BatADC:0 BatV:0 TempADC:0 Temp:0`
|Field|Ouput| |Field|Ouput|
|---|---| |---|---|
@@ -26,4 +26,44 @@ DEBUG_SERIAL_ASCII output is:
|BatADC|Battery adc-value measured by mainboard| |BatADC|Battery adc-value measured by mainboard|
|BatV|Battery calibrated voltage multiplied by 100 for verifying battery voltage calibration| |BatV|Battery calibrated voltage multiplied by 100 for verifying battery voltage calibration|
|TempADC|For board temperature calibration| |TempADC|For board temperature calibration|
|Temp|Temperature in celcius for verifying board temperature calibration| |Temp|Temperature in celcius for verifying board temperature calibration|
## Debug Protocol:
If enabled with parameter DEBUG_SERIAL_PROTOCOL in config.h, debug protocol lets you send Ascii commands to set or get data.
|Command|Usage|Description|
|---|---|---|
|HELP|HELP<BR>HELP PPPP|Prints all commands/parameters/variables available for the protocol<br>If parameter/variable PPPP is provided, it will print individual help text|
|GET|GET<br>GET PPPP|Prints current value, initial value, minimum and maximum for all parameter/variable<br>If parameter/variable PPPP is provided, it will print current value, initial value, minimum and maximum for parameter/variable|
|SET|SET PPPP VVVV|Sets Parameter PPPP with Value VVVV|
|INIT|INIT PPPP|Sets Parameter PPPP to its initial value|
|SAVE|SAVE|Saves all Parameters that can be saved to EEPROM|
|WATCH|WATCH PPPP|Enables/disables output for parameter/variable|
<br>
All commands can be used for parameters.
Variables cannot be Set|Initialized|Saved.
<br>
|Type|Name|Description|Can be saved to EEPROM|
|----|----|----|----|
|Parameter|CTRL_MOD|Ctrl mode 1:Voltage 2:Speed 3:Torque|No|
|Parameter|CTRL_TYP|Ctrl type 0:Commutation 1:Sinusoidal 2:FOC|No|
|Parameter|I_MOT_MAX|Max phase current A|Yes|
|Parameter|N_MOT_MAX|Max motor RPM|Yes|
|Parameter|FI_WEAK_ENA|Enable field weak 0:OFF 1:ON|No|
|Parameter|FI_WEAK_HI|Field weak high RPM|No|
|Parameter|FI_WEAK_LO|Field weak low RPM|No|
|Parameter|FI_WEAK_MAX|Field weak max current A(FOC only)|No|
|Parameter|PHA_ADV_MAX|Max Phase Adv angle Deg(SIN only)|No|
|Variable|IN1_RAW|Input2 raw value|No|
|Parameter|IN1_RAW|Input2 type 0:Disabled, 1:Normal Pot, 2:Middle Resting Pot, 3:Auto-detect|Yes|