-
Notifications
You must be signed in to change notification settings - Fork 216
S76G flashing and test instructions
TTGO T-watch S7xG LoRa+GNSS board comes with factory preinstalled firmware been developed by AcSiP company.
Command line interface of this "stock" firmware is explained in these documents:
Native SoftRF firmware for S76G SiP is designed to replace the factory one.
You can always revert your S76G chip's state back into factory configuration by re-flashing the genuine AcSiP firmware, then issuing sip factory_reset command.
Genuine AcSiP v1.6.5-g9 firmware binary can be downloaded from this location.
I know about two variants of TTGO T-Watch S76xG LoRa+GNSS board hardware:
Flashing of SoftRF firmware into V1.3 board is possible but tricky.
Below I will assume that you have V1.6 or later revision of the board.
In order to flash SoftRF firmware into the S76G you will need an ST-LINK V2 adapter, like this one:
… and few DuPont jumper wires.
I suppose that any of STM32 firmware flashing utilities should suffice.
Few of the most common options are:
- STM32CubeProgrammer for Windows ;
- Stlink for Linux OS .
Releases of SoftRF firmware for S76G SiP can be downloaded from this location.
At this moment, very first release SoftRF-firmware-v1.0-rc7-S76G.bin of the file is available.
The T-Watch S7xG LoRa+GNSS board does not have any of UART interfaces readily available for immediate connection through pads or pins.
In order to go through this issue, you need to use your primary T-Watch baseboard as an adapter.
Below is the Bypass.ino Arduino sketch source code:
#include <Arduino.h>
#include <Wire.h>
#include "axp20x.h"
#define SOC_GPIO_PIN_TWATCH_SEN_SDA 21
#define SOC_GPIO_PIN_TWATCH_SEN_SCL 22
#define SOC_GPIO_PIN_TWATCH_RX 34
#define SOC_GPIO_PIN_TWATCH_TX 33
AXP20X_Class axp;
void setup()
{
Serial.begin(115200);
Wire1.begin(SOC_GPIO_PIN_TWATCH_SEN_SDA , SOC_GPIO_PIN_TWATCH_SEN_SCL);
axp.begin(Wire1, AXP202_SLAVE_ADDRESS);
axp.setLDO3Mode(1);
axp.setPowerOutPut(AXP202_LDO3, AXP202_ON); // S76G (MCU + LoRa)
axp.setLDO4Voltage(AXP202_LDO4_1800MV);
axp.setPowerOutPut(AXP202_LDO4, AXP202_ON); // S76G (Sony GNSS)
Serial1.begin(115200, SERIAL_8E1, SOC_GPIO_PIN_TWATCH_RX, SOC_GPIO_PIN_TWATCH_TX);
}
void loop()
{
while (Serial.available() > 0) {
Serial1.write(Serial.read());
}
while (Serial1.available() > 0) {
Serial.write(Serial1.read());
}
}
Purpose of this sketch is to transfer serial data from S76G pins through ESP32 down to T-Watch USB-C connector and vice versa.
Build the Bypass.ino with Arduino/ESP32 IDE and flash it into your T-Watch.
Once you've flashed both:
- S76G board with SoftRF binary, and
- T-Watch with Bypass.ino sketch
connect everything up (including S76G board GNSS antenna) and plug the T-Watch into a laptop or (mini)PC with use of bundled USB-C<->USB adapter.
Use a TTY terminal emulation software of your preference.
Serial port settings are: 115200, 8N1.
Below are illustrations been taken with minicom utility on a Raspberry Pi host.
Once you see the boot log, put your T-Watch in an area of good GNSS satellites reception, then wait few minutes until it will catch up the satellites.
Take a spare TTGO T-Beam board with SoftRF/ESP32 firmware installed. Power it on and wait until it gets a GNSS fix.
Make sure that the T-Beam operates over the (default) OGN protocol.
The T-Beam should indicate that number of received (Rx) packets is increasing.
Then take a look onto your (mini)PC TTY screen :
You should see appearance of $PFLAA NMEA messages. They indicate reception of inbound radio packets from the T-Beam.
As you may see on the screen above, these messages contain 88BE08 hexadecimal number, which is ID of the T-Beam pictured.