GD32 unable to download program - Page 1
Forum section: electronics / general

author: blueskull
author_rank: Unknown
timestamp: August 11, 2020, 04:32:24 pm
content: As the title suggested, I was not able to enter ISP mode of a GD32 MCU.Details:IC: GD32F350G8U6 in QFN28 package (not an STM clone, so no relevant STM documents to refer to)ISP port: UART1 (manual states both UART0@PA9/10 and UART1@PA14/15 should work)UART bridge: CP2102NConnection: CP2102 TXD/RXD/RTS/DTR-->GD32 RXD1/TXD1/RST/BOOT0, with RST pulled up, BOOT0 pulled downSoftware: GD official ISP tool+Win10 2004+VMWare 15+Ubuntu 20.04Software settings: 9600/57600/115200 all tested, RTS low to reset, DTR high to enter ISP, 1s timeoutObservations:1. 3.3V is available from CP2102N's internal regulator, enough to power both chips according to DS.2. High-low-high toggling is observed on both RST and BOOT0, so USB communication is working.3. CP2102N TXD line is high (I didn't probe it with a scope, DMM shows high).4. GD32 TXD1 is high-Z, which is weird. It is supposed to be high regardless entering ISP or not due to default pull up as SWD pin. Before entering ISP, it is resistively pulled up, after entering ISP, it should be driven high.5. I didn't try with UART0, but I cal already see UART0 TXD is high, so it should have entered ISP mode properly, just not responding on UART1.6. Before sending the first enter-ISP pulse sequence, all pins are high-Z except for SWD pins (expected).7. I tried to move all parts to another PCB to rule out soldering issues, and I swapped MCU to rule out cooked chips (I soldered the first chip with way too high temperature).Now I'm totally confused. Does this GD32 not support UART1 ISP? Both the TRM and DS suggest otherwise.

author: thm_w
author_rank: Super Contributor
timestamp: August 12, 2020, 12:51:55 am
content: Do you have access to SWD and checked that it will already program OK with that?I would scope first to make sure its sending the right voltage level/byte just in case. Then maybe if that looks ok, but its still not sending ACK (0x79), test UART0.There is a note in the datasheet but shouldn't be related.. because autobaud in bootloader should be implemented with a timer:Quotehttps://www.gigadevice.com/microcontroller/gd32f350g8u6/https://www.st.com/resource/en/application_note/cd00264342-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

author: crosswick
author_rank: Newbie
timestamp: August 29, 2021, 10:20:06 am
content: Have you seen on page 32 of the GD32F3x0 User Manual that BOOT1 needs to be low to enter the correct boot mode?Also, this design (SHA 2017 badge) uses MMBT2222A transistors to control the relevant pins on an ESP32:https://github.com/SHA2017-badge/PCB/blob/master/sha2017_rev1_0_1_schematic.pdf

author: Bassman59
author_rank: Super Contributor
timestamp: August 30, 2021, 03:39:30 pm
content: Quote from: crosswick on August 29, 2021, 10:20:06 amThe person who started this thread is no longer with us.

author: crosswick
author_rank: Newbie
timestamp: August 30, 2021, 07:41:27 pm
content: Ah, I see, thanks.On this topic (could start a new one if preferred): I'm currently looking into using the circuit on the last page of this schematic in order to combine a CH340C and GD32E103 on the same board, with the GD32 normally starting from Main Flash Memory:https://github.com/FYSETC/FYSETC-Cheetah/blob/master/hardware/1.2/Cheetah_Board%20V12b%20SCH.pdfIf anyone would like to comment on this, I'd be very interested. It seems the same for STM32.

author: thm_w
author_rank: Super Contributor
timestamp: August 31, 2021, 09:34:43 pm
content: Quote from: crosswick on August 29, 2021, 10:20:06 amBskull actually responded with his solution to this issue but I can't recall it exactly.. something about a driver issue with the official GD software not setting RTS/whatever on the CP2102. Sadly response was deleted as mentioned above.There is no BOOT1 on this IC.I would recommend simulating that FYSETC circuit and seeing if it makes sense to you how it operates. It should be the same as STM32.Some oddities though:- why is the RESET connection even there? I don't see it doing anything.