LuatOS AIR32F103C8T6 USB C STM32 Compatible Devpmetment Board User Guide
- June 15, 2024
- Luatos
Table of Contents
AIR32 BLUEPILL USER GUIDE
SUPPORT
If you require assistance, please feel free to contact us at tamshunservice@gmail.com.
OVERVIEW
Air32F103 is a series of microcontrollers with the first model being the Air32F103CBT6. Its peripherals and hardware design are compatible with some of the mainstream F103 models in the market. It has a maximum frequency of 256MHz, with 96KB of RAM and 128KB of flash memory. Each IO can be configured with independent internal pull-up and pull-down resistors.
AIR32F103 CHIP COMPARISO
PINOUT DEFINITION
AIR32F103 BLUEPILL PCB
https://wiki.luatos.com/_static/bom/BluePill.html
SCHEMATIC
Please click the following link for reference.
https://cdn.openluat-
luatcommunity.openluat.com/attachment/20220605164915340_AIR32CBT6.pdf
DEVELOPMENT ENVIRONMENT CONFIGURATION
Note: The following development system is Windows by default.
Preparation
- Install MDK5.
- Download and install the SDK of AIR32F103.
Install the Support Package
Find the latest pack file in the AIR_Jlink_Keil folder, double click to
install it.
New Construction
Click Project->New μVision Project in the menu bar
Create folder and project name, path according to your actual choice
Select AIR32F103CBT6 under Generic in the device list.
Add the startup file, check the CORE under CMSIS and Startup under Device to automatically configure the startup file.
Add peripheral library support, for example, add GPIO library, check the GPIO component after you can see the following will prompt the lack of other components, according to the prompt to check, you can also check all.
After checking the missing dependencies according to the prompt, the prompt is removed and the project is created by clicking OK.
Add library function definitions.
Test Code
Create a new file by clicking on the “New File” button in the upper-left
corner. Right-click and save it as “main.c”. Add a main function to the file
with the following code:
int main(void)
{
while(1);
}
Click on the compile button to test whether the code can be compiled
successfully.
DOWNLOAD AND BURN
The Air32F103 development board comes with the DAPLINK firmware as the default
(unlike the BluePill development board, which has no firmware by default).
This allows the board to be used directly as a debugger for another device
during debugging and programming. Here, we will introduce how to use DAPLINK,
which can also be applied to other debuggers.
For the AIR32F103 development board with the DAPLINK firmware, PB13 is
connected to the SWDCLK of the device being debugged, PB14 is connected to the
SWDIO of the device being debugged, and PB0 is connected to the reset pin.
PIN | Function |
---|---|
PB13 | SWD_CLK (Externally Controlled) |
PB14 | SWD_DIO (Externally Controlled) |
PB0 | RST (Reset) Pin (Externally Controlled) |
PA2 | TX of Virtual Serial Port |
PA3 | RX of Virtual Serial Port |
The overall connection diagram is shown in the following figure:
Click on the project configuration magic wand, go to the Debug tab, select CMSIS-DAP Debugger in the dropdown list, and click on Settings.
To check if the device is connected properly, you can see the device in the SW Device list if it is connected properly. You can adjust the clock speed to improve efficiency.
Click on the Flash Download tab, where you can see that our support package has already added the download algorithm for us by default. You can select the ‘Reset and Run’ option, so that the code will reset and run automatically after each download, without the need to press the reset button manually.
After the configuration is completed, you can click on the burn button to download and burn the code to the device directly.