After inspecting the Main unit of a brand new Xiegu G90 transceiver for some mods with the Front panel removed, the radio got into a fatal failure.
Symphtomes:
After separating the Front panel from the Main unit and
reconnect it, the front panel shows: "Comm Lost" in red and no feedback
from the panel to the Main unit was possible.
Hardware investigations showed 0 (zero) Ohm (Shortcircuit) between
the Main unit (Tx UART) to Front Panel (Rx UART). Removing the Front panel, the
shortcircuit was still present on DB9 pin#3. After breaking apart the Front
panel case, the DB9 pin # 3 was traced directly to PA10 – USART 1 Rx on
STM32F103RCT6 (LQFP64) microcontroller.
A higher current than usual was observed on the Power supply
ammeter (around 100mA increase over the usual consumpition) and the chipset was
hotter than usual.
A small cut was made on the PCB right near the uC to confirm
the problem is on the chipset itself and that was confirmed by measuring it
with a DMM the resistance between Pin # 43 and Pins#18, 31, 47, 63.
A replacement STM32F103 was ordered from Reichelt.
1.
Some
pre-requisites;
a.
Digital Multimeter
b.
Fine tip tweezers
c.
Various type of screwdrivers
d.
Magnifying
glasses and microscope
e.
Hot air soldering/desoldering station
f.
Fine tip soldering iron
2.
Must have:
a.
Desoldering braid
b.
Soldering flux
c.
4 pin male header straight in line
d.
ST-Link V.2. A clone will do the job very well.
e.
Some Dupont wires (female-to-female ones)
f.
A PC with 1 free USB 2.0 port.
g.
Antistatic wrist strap band.
3.
Software needed:
a.
STM32 ST-Link Utility - STSW-LINK007
b.
STM32 Cube Programmer
I will not insist in dismantling the Front panel; it
involves a lot of small screw and need a lot of attention to get to the bare
PCB.
ATTENTION:
Please observe the ESD protection measures and wear the
antistatic wrist strap; connect it to the GND of the Front panel PCB and use an
ESD protected soldering iron.
There are some
connectors there; the ones with flexible ribbon work by lifting the darker
clips with the tip of the tweezer on both sides of the ribbon. Do not insert
the tweezer between the ribbon and the locker!
The wired connector for the BAND UP/DOWN and MODE UP/DOWN
has to be pulled from the PCB connector. Be gently with it!
Please, be carefull with the LCD and REMOVE IT before you
start the work on changing the STM32F103! Put it in a small bag and forget
about it untill you finished the job.
Use proper screwdrivers and keep track of the screw you
removed.
I will not enter into
details on how to work with LQFP SMDs but, when you are removing the STM32F103 use plenty of Flux.
Clean the
PCB pads. Inspect them with a microscope or good magnifier for problems.
Carefully place the
new STM32F103 on the PCB paying attention to the pin numbering.
Clean the PCB with isopropillic alcohool. Better if you have
an ultrasonic cleaning bay.
Now, it is time to take care about the connection to the
ST-Link.
Near the RJ45 microphone connector there is a marked place
for 4 pins in a single row. That is the SWD connector and there you must place
a proper connector. I used a male connector but can me a female one.
Looking from the back of the PCB (opposide to the rotary
encoders) and with the RJ45 connector on the right side, the 4 pins are on the
lower right side and, from the left to the right they are: Vcc (3.3 V), SWDIO, SWCLK and GND.
In the first stage,
we will use the voltage supplied by the ST-LINK SWD (3.3V).
The Front panel is
not connected to the Main unit!
Step 1: Install the STM32 ST-Link Utility - STSW-LINK007 (https://www.st.com/en/development-tools/stsw-link007.html). Follow the instructions for registering the account on the ST webpage.
Start the program; Connect the ST-Link to the PC. Select ST_LINK > Firmware update.
Close the program.
Step 2: Install the
STM32 Cube Programmer (https://www.st.com/en/development-tools/stm32cubeprog.html#get-software).
Run it.
Step 3: Disconnect
the ST-Link from the PC then reconnect ST-Link to PC.
Step 4: Connect
DuPont female-to-female wires to GND, SWDIO, SWCLK and 3.3v on the ST-Link and
then to the SWD pins on the PCB.
Step 5: CHECK AGAIN THE WIRING!
Step 6: On the
STM32Cube Programmer, read the STM32F103 to check the connection. You should see a lot of FFFF's (here is an already programmed STM chip).
Step 7: On the STM32Cube Programmer, load the Bootloader .bin.
BROWSE to select the file>
Check for the START address for writing the BL. Should be 0x0800000.
Select "Verify programming".
"Start programming"The bootloader should be now programmed into the microcontroller.
Step 8: DISCONNECT THE ST-LINK SWD!
This ends the first stage.
After this, carefully connect the DB9 connector to the Front panel.
Connect the Main unit to a power supply with 13.4 V.
Connect the DB9 cable to both Main unit and Front panel unit and proceed to normal FW update procedure as described on the Xiegu website (1.74 final).
Special thanks to Simon SA7SSE!
Thanks Konrad Beckman for SWD pinout: https://twitter.com/kbeckmann/status/1286574402268798977
and for G90 tools to extract the firmware: https://github.com/OpenHamradioFirmware/G90Tools
Maybe you want to see my findings about the hardware of this radio: https://github.com/yo3hjv/XIEGU-G90/wiki
A nice lecture about good practice in ESD protection:
https://www.st.com/resource/en/application_note/cd00004479-emc-design-guide-for-stm8-stm32-and-legacy-mcus-stmicroelectronics.pdf
The former and the new STM32 chip:
The happy G90 with replaced LEDs:
Adrian YO3HJV @ December, 2020