2024-04-29 05:11 AM - edited 2024-04-29 05:13 AM
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.
2024-05-02 02: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.
2024-04-29 05:25 AM
The only solution is actually to use both a genuine ST-LINK and a genuine STM32F103.
Regards
/Peter
2024-04-29 05: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!
2024-04-29 05: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.
2024-04-29 06:05 AM
Maybe this can help you:
https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html#diags-1-6
2024-04-29 06:09 AM
On board it's STM32F103
2024-04-29 06: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.
2024-04-29 06:19 AM - edited 2024-04-29 06:32 AM
Can you show a good picture of the cpu on this board ?
btw
ID: 0x2BA01477 is CS32F103C8T6 by CKS .
2024-04-29 06:26 AM - edited 2024-04-29 06: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:
2024-04-29 06:38 AM