What is the STM32F103C8T6 Microcontroller and How Does It Work?

20 December 2023


Ⅰ. STM32F103C8T6 overview

Ⅱ. What are the features of STM32F103C8T6?

Ⅲ. Programming of STM32F103C8T6

Ⅳ. STM32F103C8T6 price

Ⅴ. What is the difference between STM32F103C8T6 and CH32F103C8T6?

Ⅵ. Decoupling circuit of STM32F103C8T6

Ⅶ. Several working modes of STM32F103C8T6 microcontroller



STM32F103C8T6 is an ARM Cortex-M3 core microcontroller. It has the advantages of high performance, low power consumption and strong scalability, and is widely used in various embedded applications. Today we will introduce relevant information about this chip.



Ⅰ. STM32F103C8T6 overview


a9bf8582c4f933dc5dd94c6baf1fbe21.png


The STM32F103C8T6 is a 32-bit microcontroller based on the Cortex-M3 core manufactured by STMicroelectronics. Its hardware comes in LQFP48 package and tray packaging. The program memory has a capacity of 64 kilobytes, and its speed is 75 hertz. The STM32F103C8T6 device operates from 2.0 V to 3.6 V. It is available over the -40°C to +85°C temperature range and the -40°C to +105°C extended temperature range. It supports multiple communication protocols and buses such as CAN, USB, Ethernet, etc., and can easily communicate with other devices. In addition, it supports a variety of timers and counters, as well as various analog and digital conversion functions, which can be used to implement complex control algorithms.


Alternatives and equivalents:

STM32F103C8T6TR

STM32F103C8T7TR



Ⅱ. What are the features of STM32F103C8T6?


• It features seven distinct timers tailored to various analog signal sampling rates.


• Phase-locked loop (PLL) clocks achieve stability by phasing the output and input signals.


• Three different boot options (via user flash or system memory or SRAM) via USART1 reassembly of flash memory.


• A windowed watchdog timer for observing signal reception and transmission errors


• Cyclic Redundancy Check (CRC) to monitor data corruption


• JTAG (Joint Test Action Group) serial protocol for debugging and testing microcontroller units



Ⅲ. Programming of STM32F103C8T6


First, we need to create a development environment suitable for STM32F103C8T6 programming. The following are some commonly used development tools and software.


ST-Link/V2


ST-Link/V2 is a debugging and programming tool provided by STMicroelectronics. It can communicate with STM32F103C8T6 through the SWD interface and supports debugging and burning programs.


STM32CubeMX


STM32CubeMX is a graphical configuration tool provided by STMicroelectronics for generating initialization code and configuring peripherals. It can help us quickly set pin mapping, clock configuration and other peripheral parameters.


Keil MDK


Keil MDK is an integrated development environment (IDE) specifically used for the development of ARM microcontrollers. It provides powerful editing, debugging and compilation functions, and is compatible with STM32F103C8T6.


After installing the above tools, we can start programming the STM32F103C8T6. There are currently two ways to program the STM32F103C8T6 development board, namely the STLink USB dongle or an external USB or serial converter. While there are many compiler options and IDEs available for writing program and flash code to the STM32F10C8T6 Blue Pill, these are the two most popular and easy-to-use compilers. In addition, Kiel/CubeMX and STLink software are also used to compile and upload programs, which is done through a single-wire debugging interface. This interface is designed specifically for ARM cores and is used for transfer and memory access.



Ⅳ. STM32F103C8T6 price


The following is the price reference for STM32F103C8T6 from MOUSER ELECTRONICS.


4aafbc682ac717c0c8e6955f339e2bda.png



Ⅴ. What is the difference between STM32F103C8T6 and CH32F103C8T6?


STM32F103C8T6 and CH32F103C8T6 are both microprocessors. They have the following differences.


1. Brand: The STM32F103C8T6 is manufactured by STMicroelectronics, while the CH32F103C8T6 is manufactured by Tao Yun Microelectronics, a Chinese company.


2. Voltage: In terms of voltage, both support a voltage range of 1.8V to 3.6V, but the CH32F103C8T6 transistor has a wider input voltage range, from -0.5V to 5.5V.


3. Clock frequency: The clock frequency of STM32F103C8T6 can reach 72MHz, while the clock frequency of CH32F103C8T6 can only reach 48MHz. This shows that the processing speed of STM32F103C8T6 is much higher than that of CH32F103C8T6.


4. Price: Since CH32F103C8T6 is manufactured by a Chinese company, the price is much lower than STM32F103C8T6. This is also a key advantage for it to enter the market.


5. Storage: Both the STM32F103C8T6 and the CH32F103C8T6 have the same flash memory size of 64KB. However, in terms of memory, there is a big difference between the STM32F103C8T6 and the CH32F103C8T6. the STM32F103C8T6 has a SRAM memory of 20KB, while the CH32F103C8T6 has an SRAM memory of only 10KB. this means that the STM32F103C8T6 can handle large amounts of data more smoothly without lagging. This means that the STM32F103C8T6 can handle large amounts of data more smoothly without lagging.


6. Application: In scenarios with higher performance requirements, such as automatic control equipment, medical equipment and other fields, STM32F103C8T6 will perform better. For ordinary embedded applications, such as smart homes, smart door locks, etc., CH32F103C8T6 is also a good choice because of its low price, high reliability, low power consumption, and complete functions.



Ⅵ. Decoupling circuit of STM32F103C8T6


The schematic design is as follows.


45eaed579c4494b116bae7e15e5b4118.png


Placing a 104 (0.1μF) capacitor on the power supply pin effectively suppresses power supply noise. Simply put, this is like "decoupling" the power supply noise. "Power - capacitor - ground" the closer the distance between the three, the better the decoupling effect. In practice, we can use capacitors of the same material. Even if the capacitance is reduced to one-tenth of the original, the decoupling effect will not change significantly. For high-frequency decoupling, we recommend the use of the same package form of the device, the capacitance value of 0.01μF, 0.1μF or 1μF can be selected. In addition, the chip (SMD) package capacitors compared to the perforated package better, because the perforated capacitor pin equivalent inductance is larger, which will affect the decoupling effect.



Ⅶ. Several working modes of STM32F103C8T6 microcontroller


STM32F103C8T6 has four working modes, namely operation mode, sleep mode, stop mode and standby mode.


1. Operation mode


When the STM32F103C8T6 is reset after power-on, it is in operation mode. In this case, the microcontroller automatically runs the program. When we don't need the core to run, we can choose to put the chip into three modes: sleep, stop and standby.


2. Sleep mode


When the STM32F103C8T6 is running, the core will stop the internal clock and program execution when it encounters a wait for interrupt (WFE) or wait for event (WFI) instruction. Although the Cortex-M3 stopped working, its peripherals continued to work. Until a peripheral generates an event or interrupt, the core will be awakened and exit sleep mode. In sleep mode, it only turns off the core clock, but its on-chip peripherals and the peripherals of the Cortex-M3 core still operate as usual.


3. Stop mode


If the user sets the SLEEPDEEP bit in the Cortex_PCR of the Cortex-M3 processor, and then clears the PDDS (Power Down Deep Sleep) bit in the STM32 PCR, the STM32F103C8T6 stop mode setting is completed.


When the shutdown mode is set, the CPU will stop working once it encounters a WFI or WFE instruction, and HSI and HSE will also enter the shutdown state, but the Flash and SRAM will continue to maintain power supply. Therefore, all working states of STM32F103C8T6 are still retained at this time. Stop mode, like sleep mode, can also be woken up by peripheral interrupts. However, in stop mode, the clocks of all devices are disabled except for the external interrupt control unit. STM32 can only wake up the device in the shutdown state by triggering an external interrupt by generating a level edge on the GPIO pin. It should be noted that the external interrupt channel is not only connected to the GPIO, but also connected to the alarm event of the RTC clock. In addition, the counting clock of the RTC does not come from the device bus of the STM32F103C8T6 (but directly from the LSI or LSE), so we can also use the RTC module to wake up the STM32F103C8T6 from the shutdown state regularly.


4. Standby mode


If we set the SLEEP bit in the STM32F103C8T6 power control register, and then set the PDDS bit in STM32_PCR, the microcontroller will enter standby mode. To wake up from standby mode, there are many ways, including RTC alarm event, NRST external pin reset, reset signal generated by the independent watchdog (IWDG), and using the rising edge generated by the PA0 pin to wake up the microcontroller. When entering standby mode, all SRAM data, Cortex-M3 processor registers and STM32F103C8T6 register contents will be cleared, and the effect is equivalent to a hardware reset.




Frequently Asked Questions


1. What is STM32F103C8T6?


The STM32F103C8T6 is a medium density performance line, ARM Cortex-M3 32bit microcontroller in 48 pin LQFP package. It incorporates high performance RISC core with 72MHz operating frequency, high speed embedded memories, extensive range of enhanced I/Os and peripherals connected to two APB buses.


2. What is the flash page size of STM32F103C8T6?


The STM32F103C8T6 has only 64kB according to the STM device specs. The very popular Bluepill Board contains a MCU marked “STM32F103C8T6”, with many units having 128kB of Flash.


3. What is the architecture of STM32F103C8T6?


The STM32F103C8T6 is a medium density performance line, ARM Cortex-M3 32bit microcontroller in 48 pin LQFP package. It incorporates high performance RISC core with 72MHz operating frequency, high speed embedded memories, extensive range of enhanced I/Os and peripherals connected to two APB buses.


4. What is the difference between GD32F103C8T6 and STM32F103C8T6?


Almost all the specifications and details of both the microcontrollers are the same with same flash size, RAM, processor core, and pinouts. The most significant difference is that the GD32F103C8T6 has more operating frequency with 108 MHz as compared to the 72 MHz of STM32F103C8T6.