CH32F103C8T6 China chips

Bootloader for STM32F103 and STM32F4xx micro-controllers
No special driver is required. Support for Windows, Linux and Mac Operating System
Post Reply
jenspogo
Posts: 30
Joined: Mon Feb 24, 2020 10:42 am

CH32F103C8T6 China chips

Post by jenspogo »

Hey guys,

I had some problems using the HID Bootloader. (using ST Link to programm works fine. Serial.println() as well) After flashing the HID Bootloader the board wont be recognized. Also with Boot1 pin HIGH.
What I found out is, that I got some Boards with a fake processor called CH32F103C8T6 from China Key System & Integrated.
Is it possible to use the HID Bootloader with that MCUs?

Greetings,
Jens
mrburnette
Posts: 615
Joined: Thu Dec 19, 2019 1:23 am
Answers: 6

Re: CH32F103C8T6 China chips

Post by mrburnette »

jenspogo
Posts: 30
Joined: Mon Feb 24, 2020 10:42 am

Re: CH32F103C8T6 China chips

Post by jenspogo »

hey,

thank you for your reply and the informations!
But there is still the question about the bootloader right? or do I have to interpret this as a "no"?

Greetings!
ag123
Posts: 1089
Joined: Thu Dec 19, 2019 5:30 am
Answers: 9

Re: CH32F103C8T6 China chips

Post by ag123 »

if it works count yourself lucky, there are many that are simply duds. and worse on the web they advertise as stm32f103 blue pills, many get a whole batch of fakes. i'd guess we'd simply need to buy from more reliable ones, or make our own boards, we can use any of the whole range of mcus and need not be limited to stm32f103
GonzoG
Posts: 121
Joined: Wed Jan 15, 2020 11:30 am
Answers: 10

Re: CH32F103C8T6 China chips

Post by GonzoG »

Those binary files available for download are for STM chips.
But this bootloader should work with with CH32GF103 after some changes in code.
mrburnette
Posts: 615
Joined: Thu Dec 19, 2019 1:23 am
Answers: 6

Re: CH32F103C8T6 China chips

Post by mrburnette »

jenspogo wrote:
Tue Nov 24, 2020 7:17 am
...
But there is still the question about the bootloader right? or do I have to interpret this as a "no"?
I know no more than stated in the Hackaday areticle:
This CH32F103 MCU is produced by a Chinese company called WCH, with the (Chinese-only) datasheets and reference manual both provided for download. At a cursory glance, both the datasheet and manaul show a chip that’s practically identical to the STM32F103, with identical memory mapping and peripheral registers.

Hooking it up to an ST-Link/V2 dongle and connecting to it with OpenOCD results in the same CPUTAPID error as with the CS32F103 MCU when using the STM32F1xx profile file. After making the same change to the stm32f1xx.cfg file as suggested by others, I was able to flash the ‘Blinky’ example from my Nodate STM32 project onto the board without further issues.
As I do not own this clone part, the link provided is the most assistance I can provide.

I have however used another clone successfully:
viewtopic.php?f=21&t=441
blueskysea
Posts: 1
Joined: Mon Nov 30, 2020 6:58 am

Re: CH32F103C8T6 China chips

Post by blueskysea »

hello:
This chip is a new very cheap chip with arm core, it has not been on the market for a long time, so most people do not know it well. I introduce you to several download methods.
1.stlink or other xxlinks download
you needs to ready fot the keil IDE and download a device library----Keil.WCH32F1xx_DFP.1.0.1.pack. Then follow the general stm32 download method. Note that the flash download algorithm is different, and you must choose the one provided by the manufacturer;
You can refer to the picture description in a development board file:
http://www.wch.cn/downloads/file/299.ht ... nEpvPKJDbb


2. USB or serial port download directly
This requires downloading the official software: WCHISPTool
Address:
Note: boot1 jumps to high,this chip has two USB interfaces,if you use usb,then you should choise the PB6 & PB7 ,but not PA11 PA12
http://www.wch.cn/downloads/file/196.ht ... bKZsSI08DL
bronek999
Posts: 1
Joined: Thu Sep 16, 2021 6:32 pm

Re: CH32F103C8T6 China chips

Post by bronek999 »

What about Eclipse CDT and J-Link debugger?

I bought lot of boards CH32F103 and programming firmware by JLink is toooooo slow :(
STM32F103 programmed in 2-3 seconds (50kB firmware) and CH32F103 takes 73 seconds.


SEGGER J-Link GDB Server V6.10l Command Line Version

JLinkARM.dll V6.10l (DLL compiled Nov 7 2016 16:51:01)

-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: STM32F103C8
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware: V8.00
S/N: 58001139
Feature(s): RDI,FlashDL,FlashBP,JFlash
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x20005000)
Read 2 bytes @ address 0x00000000 (Data = 0x5000)
Target interface speed set to 100 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x08000E68)
R0 = 20000100, R1 = 00000000, R2 = 08000000, R3 = 08000135
R4 = 200006BC, R5 = 20000714, R6 = 20000714, R7 = 20003A34
R8 = 021014B1, R9 = 3050A000, R10= 0288A100, R11= 010C9284
R12= 20000630, R13= 20005000, MSP= 20005000, PSP= 99140140
R14(LR) = FFFFFFFF, R15(PC) = 08000E68
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Select auto target interface speed (2000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (Handle on BKPT)
Semihosting I/O set to TELNET Client
Read 4 bytes @ address 0x08000E68 (Data = 0xE0032100)
Read 2 bytes @ address 0x08000E68 (Data = 0x2100)
Downloading 268 bytes @ address 0x08000000 - Verified OK
Downloading 16128 bytes @ address 0x08000110 - Verified OK
Downloading 15888 bytes @ address 0x08004010 - Verified OK
Downloading 14804 bytes @ address 0x08007E20 - Verified OK
Downloading 3660 bytes @ address 0x0800B7F8 - Verified OK
Downloading 8 bytes @ address 0x0800C644 - Verified OK
Downloading 8 bytes @ address 0x0800C64C - Verified OK
Downloading 4 bytes @ address 0x0800C654 - Verified OK
Downloading 2864 bytes @ address 0x0800C658 - Verified OK
Read 4 bytes @ address 0x08000E68 (Data = 0xE0032100)
Read 2 bytes @ address 0x08000E68 (Data = 0x2100)
Read 2 bytes @ address 0x08000F60 (Data = 0xB530)
Comparing flash [....................] Done.
Erasing flash [....................] Done.
Programming flash [.
aryeduino
Posts: 1
Joined: Thu Nov 18, 2021 2:21 am

Re: CH32F103C8T6 China chips

Post by aryeduino »

Hi, I have also got 4 PCS of CH32F103C8T6 (2 PCS USB C and 2 PCS Micro USB)
I want to be able to load the CORRECT Boot loader and get them programed easily from Arduino.
I would be happy if someone can assist with the HEX file that is needed and what are the settings on Arduino top make that happened.

Thanks
Aryeduino
Post Reply

Return to “STM32 HID bootloader”