Blue pill (STM32F1) programs OK via Arduino IDE but not Keil. Chip ID:0x2BA01477
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 5:11 AM - last edited on ‎2024-11-26 1:28 AM by Andrew Neil
I am trying to program STM32 Blue pill board using Keil, and it gives the following error: "Connection refused due to device mismatch; Device connected to debug unit is different from device selected for project target STMicroelectronics STM32F103C8." I am using ST-Link debugger for programming as it does not have on-board ST-debugger. The issue is that it reads chip ID:0x2BA01477, which, I have read on other forums, is the ID read when your board uses clone instead of real STM32F103C8T6. Still, I want to program it using Keil. When I program the same setup using Arduino IDE, it is gets programmed in a perfectly fine way. Is there any other way to resolve this error in Keil using the same board or there is no other option left but to replace the board?
Solved! Go to Solution.
- Labels:
-
STM32F1 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-02 2:20 AM
@IMumt.1 wrote:I agree to your suggestion
I think it might also have been suggested by others ... ?
:thinking_face:
@IMumt.1 wrote:I have borrowed a Nucleo board, from my friend, for experimentation.
Excellent choice!
:thumbs_up::clapping_hands:
Now please mark the solution.
PS
I don't think you ever answered this question:
@Andrew Neil wrote:
@IMumt.1 wrote:When I program the same setup using Arduino IDE, it is gets programmed in a perfectly fine way.
Is that using an ST-Link (or any other SWD programmer), or the Arduino serial bootloader ?
If you were using the Arduino serial bootloader, that would explain why the Arduino IDE could program successfully.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 5:25 AM
The only solution is actually to use both a genuine ST-LINK and a genuine STM32F103.
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 5:41 AM
@IMumt.1 wrote:When I program the same setup using Arduino IDE, it is gets programmed in a perfectly fine way.
Is that using an ST-Link (or any other SWD programmer), or the Arduino serial bootloader ?
@IMumt.1 wrote:The issue is that it reads chip ID:0x2BA01477, which, I have read on other forums, is the ID read when your board uses clone instead of real STM32F103C8T6.
Yes, it is highly likely that these "Pill" boards will use fake/clone chips - that's why they're cheap!
Did the "other forums" not offer any suggestions in how to get around this?
Maybe Keil has an option to support them, or to ignore the device ID? You'd have to ask Keil about that.
Clearly, ST aren't going to be keen to support fakes/clones here on their forum!
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 5:50 AM
Maybe you can work with Keil , if you select the chip, thats real on Blue pill board .
If GD32F103C8 , you should set this as target...just look, what you have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 6:05 AM
Maybe this can help you:
https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html#diags-1-6
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 6:09 AM
On board it's STM32F103
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 6:15 AM
@IMumt.1 ...whereby the marking with this text says absolutely nothing about whether it is an original or a fake. For STM32F103 in particular, third-party labelling is ground off/etched off and a fake marking is applied. You can only recognise this with tools that measure into the STM32F103, such as those mentioned by @Andrew Neil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 6:19 AM - edited ‎2024-04-29 6:32 AM
Can you show a good picture of the cpu on this board ?
btw
ID: 0x2BA01477 is CS32F103C8T6 by CKS .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 6:26 AM - edited ‎2024-04-29 6:26 AM
@IMumt.1 wrote:On board it's STM32F103
Well, of course it does!! :face_with_tears_of_joy::grinning_face_with_sweat: :face_with_tears_of_joy::grinning_face_with_sweat: :face_with_tears_of_joy::grinning_face_with_sweat: :face_with_tears_of_joy::grinning_face_with_sweat: :face_with_tears_of_joy::grinning_face_with_sweat:
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-29 6:38 AM
