STM32F103CBT6 Microcontroller Features, Application and STM32F103CBT6 vs CKS32F103C8T6

10 April 2024


Ⅰ. Description of STM32F103CBT6

Ⅱ. Low-power modes of STM32F103CBT6

Ⅲ. Functional features of STM32F103CBT6

Ⅳ. Application fields of STM32F103CBT6

Ⅴ. GPIO attributes and configuration process of STM32F103CBT6

Ⅵ. How to program and debug STM32F103CBT6?

Ⅶ. What is the difference between STM32F103CBT6 and CKS32F103C8T6?



The STM32F103CBT6 is a powerful microcontroller manufactured by STMicroelectronics. It is based on the ARM Cortex-M3 core and is widely used in various IoT devices and embedded systems. Its rich peripherals and high performance make it one of the preferred chips for engineers and developers. In this article, we will learn the details of STM32F103CBT6.



Ⅰ. Description of STM32F103CBT6


cd5888fe05de824e909312da2a39ad07.png


STM32F103CBT6 is a powerful microcontroller (MCU) developed by STMicroelectronics. This microcontroller belongs to the medium-density performance series. It is based on the ARM Cortex-M3 32-bit core and comes in a 48-pin LQFP package. STM32F103CBT6 integrates a high-performance RISC core with a running frequency of up to 72MHz. It is also equipped with high-speed embedded memory and a variety of enhanced I/O and peripherals, which are connected through two APB buses. In addition, STM32F103CBT6 also has timers, 12-bit analog-to-digital converters, PWM timers, and standard and advanced communication interfaces. These functions enable it to perform well in a variety of applications. Therefore, STM32F103CBT6 is widely used in embedded system development, including smart home, industrial automation, automotive electronics and other fields.


Alternatives and equivalents:

STM32F103CBT7

STM32F103CBT6TR

STM32F103CBT7TR



Ⅱ. Low-power modes of STM32F103CBT6


The STM32F103CBT6 performance line supports three low-power modes to achieve the best compromise between low-power consumption, short startup time and available wakeup sources:


1. Standby mode

The standby mode is used to achieve the lowest power consumption. The internal voltage regulator is switched off so that the entire 1.8 V domain is powered off. The PLL, the HSI RC and the HSE crystal oscillators are also switched off. After entering standby mode , SRAM and register contents are lost except for registers in the backup domain and standby circuitry. The device exits standby mode when an external reset (NRST pin), an IWDG reset, a rising edge occurs on the WKUP pin, or an RTC alarm.


2. Sleep mode

In sleep mode, only the CPU is stopped. All peripherals continue to operate and can wake up the CPU when an interrupt or event occurs.


3. Stop mode

The stop mode achieves the lowest power consumption while retaining the content of SRAM and registers. All clocks in the 1.8 V domain are stopped, the PLL, the HSI RC and the HSE crystal oscillators are disabled. The voltage regulator can also be put either in normal or in low-power mode. The device can be woken up from stop mode by any of the EXTI line. The EXTI line source can be one of the 16 external lines, the PVD output, the RTC alarm or the USB wakeup.



Ⅲ. Functional features of STM32F103CBT6


1. Multiple packaging types: STM32F103CBT6 provides different packaging types, such as LQFP, LFBGA, etc., to adapt to different application needs.

2. Large-capacity flash memory: STM32F103CBT6 is equipped with 128KB of flash memory, which can be used to store program code and data.

3. High performance: STM32F103CBT6 uses a 72MHz operating frequency, which can provide fast data processing and efficient execution speed.

4. Low power consumption mode: STM32F103CBT6 supports a variety of low power consumption modes, including sleep mode, standby mode and shutdown mode, which can effectively extend battery life.

5. Multiple memory types: In addition to flash memory, this microcontroller also has 20 KB of static random access memory (SRAM) and 2 KB of EEPROM for fast data reading, writing and storage.

6. Rich peripherals: STM32F103CBT6 has multiple general-purpose input and output pins, analog-to-digital converter (ADC), timer, serial communication interface (such as SPI and I2C), universal asynchronous receiver/transmitter (UART) and other rich peripherals, which can easily connect and communicate with external devices.



Ⅳ. Application fields of STM32F103CBT6


First of all, the STM32F103CBT6 microcontroller is also widely used in smart homes and consumer electronics. It can be used in the control center of smart home systems to realize networking and remote control of home devices. At the same time, STM32F103CBT6 can also be used in various consumer electronics products, such as smart watches, smartphones and smart speakers, providing low power consumption and high performance solutions.


Secondly, the STM32F103CBT6 microcontroller has a wide range of applications in the field of industrial automation. It can be used with various sensors and actuators to monitor and control industrial processes. Through timers and communication interfaces, STM32F103CBT6 can achieve precise time control and data transmission, improving the efficiency and reliability of industrial equipment.


In addition, STM32F103CBT6 also has important applications in the field of automotive electronics. It can be used in automotive electronic control units (ECUs) and in-car entertainment systems. Due to its high performance and stability, STM32F103CBT6 can realize intelligent control and multimedia functions of vehicles, improving driving experience and safety.



Ⅴ. GPIO attributes and configuration process of STM32F103CBT6


1. GPIO attributes


GPIO (General Purpose Input/Output) is a pin used for general-purpose input and output in embedded systems. For the STM32F103CBT6 microcontroller and its standard library, we usually need to pay attention to the following main attributes when configuring GPIO:


(1) Pin

Pins are the physical interface of GPIO and they are connected to the pins of the microcontroller. Developers need to select pins for specific tasks and ensure that they meet the electrical connection requirements of the application.


(2) Mode

GPIO pins can be configured as inputs or outputs, and each mode has different sub-modes. The following are common GPIO modes:

• Alternate function mode: allows GPIO pins to have other functions, such as serial communication, timer input, etc.

• Output mode: used to control external devices and can be configured as push-pull output or open-drain output.

• Input mode: used to read external signals and can be configured as floating input, pull-up input or pull-down input.


(3) Speed

The speed refers to the switching speed of the GPIO pin, that is, the conversion speed from low level to high level or from high level to low level. STM32 usually offers different operating speed options such as low speed, medium speed and high speed. Selecting the appropriate operating speed depends on the needs of the application and the performance of the circuit.


2. GPIO attribute configuration process


In the STM32F103CBT6 microcontroller, correct configuration of the GPIO pins is a key step to ensure the normal operation of the embedded system. The following is a brief process, including configuring GPIO properties, initializing GPIO, and enabling GPIO clock.


6e7e2f03973da8ee011a74998f522015.png


(1) Configure GPIO attributes: First, we should select the appropriate GPIO pin according to the needs of the application. We consider electrical connections and functional requirements, select pins as inputs or outputs, and determine operating speeds and modes. The working speed can be selected from low speed, medium speed or high speed, and the mode includes input, output and possible multiplexing mode.


(2) Initialize GPIO: After selecting the pin and configuring the attributes, we initialize the GPIO through the corresponding register settings and standard library function calls. This step includes configuring the pin's input or output mode, operating speed, pull-up or pull-down and other properties. With proper initialization, ensure that the GPIO operates as expected.


(3) Turn on the GPIO clock: Before configuring the GPIO, we need to ensure that the corresponding GPIO clock is turned on. By enabling the GPIO clock, the system can correctly configure and control the GPIO pins. This is usually achieved through the corresponding clock control register, ensuring that the clock is synchronized with the GPIO function.



Ⅵ. How to program and debug STM32F103CBT6?


The following lists the steps to program and debug STM32F103CBT6:

1. Select a development environment: Choose an integrated development environment (IDE) that suits your development needs, such as STM32CubeIDE, Keil MDK, IAR Embedded Workbench, and so on. These IDEs usually provide functions such as coding, compiling, debugging and burning.

2. Writing code: Use C/C++ to write your embedded software program. We can use the Standard Peripheral Library or Cube HAL library provided by STM32 to access the peripherals and functions of STM32F103CBT6.

3. Configure the project: Create a new project in the development environment and configure the project to fit the STM32F103CBT6 chip model and hardware settings. During the configuration process, we need to select the correct chip model, peripherals, GPIOs and configure the clock source.

4. Compile the code: In the Integrated Development Environment (IDE), we can utilize the provided compiler to compile the written code into executable binary files. These binary files are usually in hex or bin format and they contain machine instructions that can be run on the STM32F103CBT6 chip.

5. Connect to debugger: We usually use the SWD (Serial Wire Debug) interface or JTAG interface to connect the STM32F103CBT6 chip to a debugger or emulator on the development computer.

6. Burn program: Using the burn tool provided in the development environment, we can download the compiled binary file to the STM32F103CBT6 chip. This process is usually called Flashing.

7. Debugging the program: Using the debugging tools in the development environment, such as a debugger or emulator, we can easily connect to the target device, i.e. the STM32F103CBT6 chip. After connecting, the debugging tool will allow us to set breakpoints in order to pause the execution of the program when it reaches a specific position. In addition, we can observe the values of variables to understand the state of the program at runtime. With the single-step execution function, we can trace the execution process of the program step by step to locate the problem more accurately.

8. Test the function: In the debugging process, we need to test the function of the program in detail and make necessary adjustments and optimizations according to the test results to ensure that the program can work properly.

9. Deploy to the target system: After completing the debugging, we need to solder the STM32F103CBT6 chip to the target system, and then carry out system testing and verification. This step aims to ensure that the function and performance of the whole system can meet the established requirements.



Ⅶ. What is the difference between STM32F103CBT6 and CKS32F103C8T6?


Although STM32F103CBT6 and CKS32F103C8T6 both belong to the STM32F1 series of microcontrollers, there may indeed be differences in some technical specifications and performance. STM32F103CBT6 is a product produced by STMicroelectronics. It uses the ARM Cortex-M3 core, has 32-bit processing capabilities, and is equipped with rich peripheral resources. This makes the STM32F103CBT6 ideally suited for a wide range of embedded applications. The CKS32F103C8T6 is a microcontroller produced by CKS. It is also based on the ARM Cortex-M3 core and has 32-bit processing capabilities and rich peripheral resources. It is suitable for various embedded application scenarios. Although both belong to the STM32F1 series, since different manufacturers may customize and adjust the same series of products, STM32F103CBT6 and CKS32F103C8T6 may differ in some specific technical specifications and performance parameters. Therefore, when selecting and using these two microcontrollers, we need to carefully compare their technical specifications and performance characteristics according to specific application requirements and scenarios to choose the most suitable model.




Frequently Asked Questions


1. What is the STM32F103CBT6?


The STM32F103CBT6 is a microcontroller from STMicroelectronics, belonging to the STM32F1 series. It features an ARM Cortex-M3 core and is commonly used in various embedded applications.


2. What is a microcontroller used for?


Microcontroller is a compressed micro computer manufactured to control the functions of embedded systems in office machines, robots, home appliances, motor vehicles, and a number of other gadgets. A microcontroller is comprises components like – memory, peripherals and most importantly a processor.


3. What is the replacement and equivalent of STM32F103CBT6?


You can replace the STM32F103CBT6 with STM32F103CBT7, STM32F103CBT6TR or STM32F103CBT7TR.