19 decembrie 2020

Xiegu G90 - reflashing Bootloader into Front panel microcontroller

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

 

 

17 comentarii:

Unknown spunea...

Hi Adrian, thanks for that greate manual. I had done all the steps. Now i have the problem that i cann't extacte the bootloader from the old chip, because the STM32 was dead. Is it possible that you send me the bootloader files? My Mail is michael-wagner73@gmx.at 73+55 de OE5AOO Michael

Unknown spunea...

Hello Adrian, I Helmut OE5HWN had the same problem. Thanks to your instructions, the repair could be carried out successfully. Michael OE5AOO exchanged the STM32 for me and installed the bootloader, then the defective Schottkey diode in the PTT line was exchanged. My G90 has been working properly again for a few days.

I am very grateful to you for your instructions on how to repair it.
73 de Helmut, OE5HWN

YO3HJV, Adrian spunea...

Great news Helmut!

SP2G spunea...

Hi Adrian. Can you send bootloader? My mail is siuchas2002@gmail.com
73!

Unknown spunea...

Hello Adrian! Can you send bootloader? r2dwl@mail.ru Thanks!

R2AAB spunea...

Hi Adrian. Thanks for the detailed manual. I have a G90 repair with a similar problem, RX died on Display Unit. Can you send bootloader? dubov.denis@gmail.com Thanks!

SQ9ANK spunea...

Hi.
Thanks for the detailed study.
Can you send me a bootloader? sq9ank@gmail.com
Michal Thanks!

anonimo spunea...

Hello Adrian, thanks for this contribution and for your dedication, could you please send me the bootloader file to my email.
Thank you very much again.
yotamca@hotmail.com

David spunea...

Hello Adrian, amazing and very inspiring for me to try the head unit repair ! Can you send me the bootloader aswell ? My email is dnodar@free.fr

Cheers and 73 !
David

Ian Tobek spunea...

Hello Adrian, big thanks for your research.
Do you have a main unit bootloader?
If yes, can you send it to me to pileupdx@null.net ?
Thanks and 73!

Rae spunea...

Hey Adrian, thanks for all this work! If you have the main unit bootloader, would it be possible for you to send me it at rae@neilo.gd?

Cheers and 73!
Rae, VK2GPU

sq1kui spunea...

Hello Adrian. Thanks for the detailed instruction. I have a G90 repair with a similar problem, the RX died on the Display Unit. Can you send the bootloader? ireneuszt@gmail.com Thanks!

Karol spunea...

Hello Adrian
I broke the G90, the display processor.
I have a processor but no bootloader.
Can you help me.
Charles
sp4inh@gmail.com
Regards

Jari spunea...

Hello Adrian!

Thanks for all help you have done

My G90 is defective too, vfo goes only downwards ping is grounded.. ptt not working.

can you send bootloader tnx hynde67@gmail.com

Jari, OH6TX

por favor, envie o Bootload para meu email: ps7jbv@gmail.com spunea...


please send the Bootload to my email: ps7jbv@gmail.com

por favor, envie o Bootload para meu email: ps7jbv@gmail.com spunea...

PS7JB, João Batista.

por favor, envie o Bootload para meu email: ps7jbv@gmail.com spunea...

Please teach how to bootload Main unit IC GD32F450ZGT6.

Most viewed posts in last 30 days