Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKS32: Add support for CKS32 micro-controller #757

Merged
merged 1 commit into from
Jan 3, 2019
Merged

CKS32: Add support for CKS32 micro-controller #757

merged 1 commit into from
Jan 3, 2019

Conversation

VictorLamoine
Copy link
Contributor

Fixes #756

I'm pretty sure the name CS32_CORE_ID is not appropriate so tell me what I should use.
I have tested and it works, I can upload the STM32duino bootloader on the CS32F103C8T6 board just fine.

@xor-gate xor-gate added this to the Next milestone Jan 3, 2019
@xor-gate xor-gate merged commit 7651d21 into stlink-org:master Jan 3, 2019
@eugenesia eugenesia mentioned this pull request Jan 13, 2019
6 tasks
@eugenesia
Copy link

eugenesia commented Jan 13, 2019

Fixes #756

I'm pretty sure the name CS32_CORE_ID is not appropriate so tell me what I should use.
I have tested and it works, I can upload the STM32duino bootloader on the CS32F103C8T6 board just fine.

Tested and this works for me too, on two CS32F103C8T6 microcontrollers.

After some digging around I think the CS32 microcontroller is made by China Key System, a company based in Wuxi, China: http://www.cksic.com/en/about/217.html

Here's a Chinese user manual for a development board making use of the CS32 microcontroller, from another of CKS's websites (CKS Cup, an electronics competition for university students) http://www.ckscup.com/upload/yonghushouce.pdf

Someone else on the EevBlog forum encountered a similar issue https://www.eevblog.com/forum/beginners/unexpected-idcode-flashing-bluepill-clone/

I think CS32_CORE_ID is as good a name as any!

@rojer
Copy link
Contributor

rojer commented Feb 11, 2019

@eugenesia this breaks flashing of STM32F2 and F4 - #761 (comment)
please roll back.

xor-gate added a commit that referenced this pull request Feb 12, 2019
ugifractal added a commit to ugifractal/stlink that referenced this pull request Mar 15, 2019
@eugenesia
Copy link

eugenesia commented Jul 27, 2019

It seems that #805 was merged which enables support for the CS32 Blue Pill clone. I just compiled the latest version on the master branch v1.5.1-31-g625f4cd, commit 625f4cd5 and it appears that CS32 MCU support has been re-enabled:

Successful flash to CS32 MCU:

$ st-flash --version
v1.5.1-31-g625f4cd

$ st-info --probe
Found 1 stlink programmers
 serial: 563f6f06513f52481953253f
openocd: "\x56\x3f\x6f\x06\x51\x3f\x52\x48\x19\x53\x25\x3f"
  flash: 0 (pagesize: 1024)
   sram: 20480
 chipid: 0x0410
  descr: F1 Medium-density device

$ st-flash write generic_boot20_pc13.bin 0x8000000
st-flash 1.5.1-31-g625f4cd
2019-07-27T18:43:38 INFO usb.c: -- exit_dfu_mode
2019-07-27T18:43:38 INFO common.c: Loading device parameters....
2019-07-27T18:43:38 INFO common.c: Device connected is: F1 Medium-density device, id 0x20036410
2019-07-27T18:43:38 INFO common.c: SRAM size: 0x5000 bytes (20 KiB), Flash: 0x20000 bytes (128 KiB) in pages of 1024 bytes
2019-07-27T18:43:38 INFO common.c: Attempting to write 21140 (0x5294) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08005000 erased
2019-07-27T18:43:38 INFO common.c: Finished erasing 21 pages of 1024 (0x400) bytes
2019-07-27T18:43:38 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2019-07-27T18:43:38 INFO flash_loader.c: Successfully loaded flash loader in sram
 21/21 pages written
2019-07-27T18:43:39 INFO common.c: Starting verification of write complete
2019-07-27T18:43:39 INFO common.c: Flash written and verified! jolly good!

I encountered other connection issues with the CS32 Blue Pill clone and have documented some fixes on my blog: http://eugenesia.co.uk/2019/07/cs32-blue-pill-clone-connection-problems/

Nightwalker-87 added a commit that referenced this pull request Feb 20, 2020
-> CKS devices with Core ID 0x2ba01477
(Closes #756 #757 #761 #766 #769 #805)
@Nightwalker-87 Nightwalker-87 removed this from the General milestone Feb 21, 2020
@Nightwalker-87 Nightwalker-87 added this to the v1.6.1 milestone Feb 26, 2020
@Nightwalker-87
Copy link
Member

Finally closed by #805.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.