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-04-29 06:47 AM - edited 2024-04-29 07:28 AM
Ok, its labeled STM... , but see an real STM :
https://www.richis-lab.de/STM32_02.htm
ed. -- and real CKS :
https://www.richis-lab.de/STM32_03.htm
and a re-labeled :
https://www.richis-lab.de/STM32_04.htm
+ other :
https://www.richis-lab.de/STM32.htm
...seems you have a re-labeled, if ID: 0x2BA01477 is CS32F103C8T6 by CKS .
2024-04-29 07:11 AM
At least the counterfeiter has omitted the ST logo.
2024-04-30 12:57 AM
Now that I have bought a genuine STM32 board, still it shows the wrong Chip ID in keil. I want to confirm, whether there is some issue in keil Configuration or the issue is with the board?
2024-04-30 01:06 AM
What kind of board did you buy?
Do you have a photo of it?
2024-04-30 01:13 AM
2024-04-30 01:18 AM
This is one of these so-called Blue Pills.
The probability that you will find such a Blue Pill with a genuine STM32F103 has been close to zero for years. Forget the Blue Pills and buy a NUCLEO, e.g. the NUCLEO-F103RB, they are (so far) only available as genuine variants.
2024-04-30 01:23 AM - edited 2024-04-30 01:26 AM
So check connection with Stm32CubeProgrammer,
maybe set :
and show screenshot (what it telling about target ) -then we see.
btw
chip on new BluePill looks "good" , original . (But only connection telling the truth ! )
2024-04-30 01:24 AM
I am using ST-Link debugger for programming it.
2024-04-30 01:47 AM
Ok,
but for more , good info you need to do it this way, as i wrote -> check connection with Stm32CubeProgrammer ...
btw
st-link utility is old , deprecated ... so use Stm32CubeProgrammer .
2024-04-30 01:47 AM
My gut feeling is that there is some issue in Keil project configuration. Can you help me with that?