Bluepill(STM32f103) Compiler error FIXED

Hi All

I was looking to get started using SimpleFOC with a Bluepill board. Unfortunately I hit a compiler error that I don’t quite understand. I have the latest version of the SimpleFOC library(2.3.3), Arduino IDE(2.3.2), and STMduino(2.8.1). When selecting the bluepill sample from the SimpleFOC library and using Generic STM32F1 series for the board I get the following compiler error.(examples/hardware_specific_examples/Bluepill_examples/encoder/bluepill_position_control/bluepill_position_control.ino)


I’m not very experienced with errors such as this but it seems that TIM4 is missing?
I thought that the recommended blue pill board was STM32F103C8 from the SimpleFOC supported hardware page. I tried taking a look at the pinout page to learn more about the timer issue but I did not find what I was looking for. This page(F103C8T_F103CB(T-U) Pinout | STM32 Pinouts) seems to state that the F103C8 does in fact have TIM4. But this page(F103C4T_F103C6(T-U) Pinout | STM32 Pinouts) does not have TIM4. Both belong to the STM32F1 series.
Selecting the STM32G0 series of boards does not give a compiler error. If that is the case then how would I differentiate between the two during compiling? Thanks in advance.

Which MCU did you select?

P{lease post pic of the setup and especially the MCU hi-rez close-up.

Cheers,
Valentine

Hi Valentine

Specifically I chose the STM32F103C6T6 model. It was simply the first thing I found while searching for blue pill on Amazon. However I also failed to notice the difference between the F103C6T6 and the STM32F103C8.

SOLVED: I just realized that the Arduino IDE does have a specific section for selecting the exact chip that is being used. This solves my immediate complier error. However the SimpleFOC library will still not compile for chipsets that are missing TIM4.

Thanks for reporting this, I’ll look into it right away.
Would you be in to make a github issue?