cancel
Showing results for 
Search instead for 
Did you mean: 

IAR 8.50.9 on a Blue Pill board (STM32F103C8) gives "Fatal Error: The selected device Does not match the target device"

BGor.1
Associate II

Good day, everyone.

I'm trying to learn the tools for programming the STM devices.

I've purchased a BluePill development board on AliExpress. The chip on it says STM32F103C8, but when I use the CubeMX, it replies the CPUID is 0x2ba01477.

I've been trying to flash this particular chip using an IAR workbench (ver. 8.50.9), but I keep getting the above message.

I'm doing a simple code, blinking the PC13 once per 1M cycles.

Can anyone help me with this issue?

I'll happily share any info related.

6 REPLIES 6

Hello

first go to MENU->project-> options and check the connected device

0693W000007CRlBQAW.jpgUse STLink utility from here

Upgrade firware of stlink to the latest version from within utility

use utility to check the type of mcu.

Hi, Vangelis Fortounas, thanks for answering!

My IAR project is set to compile for STM32F103C8:

I've upgraded my ST-Link utility from 4.5.5 to the latest 4.6.0 and then checked my ST-LINK V2.0 dongle's version. It was the latest: "V2.J37.S7".

I've reflashed it just in case.

The board seem to have the chip in question:

Can I do anything to make it work with IAR?

> The chip on it says STM32F103C8, but when I use the CubeMX, it replies the CPUID is 0x2ba01477.

It's not an STM32, but a counterfeit.

https://www.eevblog.com/forum/microcontrollers/cheap-bluepill-very-likely-it-has-fake-stm32-right/

JW

I just observed the id in my Keil's debug tab and did some search in Ref Manuals

0x2BA01477 is the DEVID for SW_DP of Cortex M4 as per 32F407VE RM0090

0x1BA01477 is the DEVID for SW_DP of Cortex M4 as per 32L4xxx RM0351

0x1BA01477 is the DEVID for SW_DP of Cortex M3 as per 32F10x RM0008

The same DEVID for F10x and for L4xxx?

Or should it be the same for true ST chips and counterfeit chips are made with different DEVID?

Yeap, I saw this post earlier.

Looks like you're right, I got the remarked CKS chip instead of STM..

Do you know of a way to make IAR work with this chip?