From 039ee41419e164c4a463642b01a9c9f8dbca6393 Mon Sep 17 00:00:00 2001 From: Candas1 Date: Thu, 21 Apr 2022 10:16:03 +0200 Subject: [PATCH] Updated Debug Serial (markdown) --- Debug-Serial.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Debug-Serial.md b/Debug-Serial.md index 9372314..3557866 100644 --- a/Debug-Serial.md +++ b/Debug-Serial.md @@ -9,16 +9,16 @@ Use a [FTDI adapter](https://s.click.aliexpress.com/e/_AqPOBr) or a [Bluetooth m [HC-06](https://www.aliexpress.com/af/HC-06.html) works, connected to USART2 at 9600 bauds (define DEBUG_SERIAL_USART2 and USART2_BAUD=9600). -## Configuration: +## :gear: Configuration: Use DEBUG_SERIAL_USART2 for the left cable or DEBUG_SERIAL_USART3 for the right cable.
Different variants can have it already enabled on a different cable depending on which cable is use by this variant by default. -## Wiring: +## :electric_plug: Wiring: * Connect GND and RX of a 3.3v FTDI adapter/Bluetooth module to the blue wire on left (DEBUG_SERIAL_USART2) or right sensor board cable (DEBUG_SERIAL_USART3) depending on config.h settings ⚠ Red wire from sensor cable delivers 15v !!! -## Output: +## :desktop_computer: Output: 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).
DEBUG_SERIAL_ASCII output is: @@ -37,7 +37,7 @@ DEBUG_SERIAL_ASCII output is: The above is done in `main.c`, see [lines 440](https://github.com/EFeru/hoverboard-firmware-hack-FOC/blob/cf7b1d0de1da34612b056c316480f47702a15cbe/Src/main.c#L440) and [line 225](https://github.com/EFeru/hoverboard-firmware-hack-FOC/blob/cf7b1d0de1da34612b056c316480f47702a15cbe/Src/main.c#L225) by using printf statements, wrapped in ```#if defined(DEBUG_SERIAL_USART2) || defined(DEBUG_SERIAL_USART3)```. More printf statements with same wrapping can be added in other places for monitoring purposes. -## Debug Protocol: +## :keyboard: Debug Protocol: If enabled with parameter DEBUG_SERIAL_PROTOCOL in [config.h](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/master/Inc/config.h), in combination with DEBUG_SERIAL_USART2 or DEBUG_SERIAL_USART3 for selecting the right cable, debug protocol lets you send Ascii commands.
### Commands @@ -93,7 +93,7 @@ Values are being translated to external<>internal format automatically. |Variable|BATV|Calibrated Battery Voltage *100|No|No| |Variable|TEMP|Calibrated Temperature °C *10|No|No| -## Troubleshooting: +## :toolbox: Troubleshooting: * Make sure the baud rate is 115200 * Make sure you are using the sensor cable(left=DEBUG_SERIAL_USART2 or right=DEBUG_SERIAL_USART3) selected in config.h * TX can be defective on your mainboard, you can switch to other sensor cable if not used already in config.h