English | Русский | Docs: Getting Started | Context7 Docs
Production-grade HAL and drivers for ArteryTek AT32F403A / AT32F407 (ARM Cortex-M4F) — GPIO, USART, SPI, I2C, ADC, DMA, TMR, CRM, Flash, FreeRTOS, USB FS, Segger RTT, LoRa SX126x/LLCC68, CayenneLPP. STM32-compatible, CMSIS, CMake, ARM GCC. Bilingual EN/RU.
Keywords for search:
at32,at32f403a,at32f407,arterytek,artery tek,cortex-m4,cortex-m4f,stm32 compatible,stm32f4,hal,cmsis,embedded,mcu,microcontroller,arm gcc,freertos,lora,sx126x,llcc68,usb fs,segger rtt,gpio,usart,uart,spi,i2c,adc,dma,hal driver,bare metal
- 51 peripheral drivers + CMSIS + startup + linker scripts — flash and run
- STM32-compatible API — migrate STM32F4 code to AT32 with minimal changes
- Batteries included: FreeRTOS (769 files), USB FS (CDC), Segger RTT, CayenneLPP, LoRa
- Proven in field: powers TAFCO LoRaWAN sensor network (end-device + gateway + bootloader)
- Context7-optimized docs: 1,985 working examples + errata (41 issues) at
at32f403a-407-docs
- AT32F403A — primary (AT32F403ACGT7 / AT32F403ACGU7, 1 MB Flash, 224 KB RAM, 240 MHz)
- AT32F407 — secondary, same Cortex-M4F + FPU
Both: ARM Cortex-M4F + FPU, STM32F4-compatible peripheral set.
- CMSIS — core definitions, startup, system init
- Drivers — 51 files: GPIO, UART/USART, I2C, SPI, ADC, DMA, TMR, CRM, Flash
- Linker Scripts —
ldscripts/for AT32F403AxG (preboot / boot / app) - SVD — System View Description for debug
- Startup —
startup_at32f403a_407.s
- FreeRTOS (769 files) — Heap_1..5, GCC_ARM_CM4F,
FreeRTOSConfig.h— used in lite-gateway - USB Stack (42 files) — CDC Virtual COM, WinUSB, FS 2.0
- Segger RTT (14 files) — zero-UART debug via J-Link
- UART/USART —
UartDrv/UartApi/UartStrBuf, DMA + ring buffer, 115200 default - CayenneLPP — LoRaWAN TLV (temp/voltage/GPS/accel)
- UnitControl — power, state machine, config persistence
- Timers / GPIO / ADC / I2C / SPI / WDT / RTC
See also: Library/ArteryCore/ (ArteryCore HAL), Library/Lora/, Library/TafcoCrypt/.
# CMake — add to your firmware
set(SHARED_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../AT32F4-Drivers)
include(${SHARED_LIB_PATH}/cmake_shared.cmake)
include(${SHARED_LIB_PATH}/Library/CayenneLPP/lpp.cmake)# Definitions
-DAT32F403ACGT7 -DUSE_STDPERIPH_DRIVER -DREGION_RU_864 -DSX126X
# or -DUSE_LLCC68Include paths auto-added: AT32F403A/cmsis/cm4/device_support/, AT32F403A/drivers/inc/, Library/.
#include "UartApi.h"
usart_init_type cfg = { .usart = USART1, .baudrate = 115200,
.data_bit = USART_DATA_8BITS, .stop_bit = USART_STOP_1_BIT, .parity = USART_PARITY_NONE };
UartService::Init(&cfg);#include <FreeRTOS.h>
#include <task.h>
void myTask(void*) { for(;;) vTaskDelay(pdMS_TO_TICKS(100)); }
xTaskCreate(myTask, "myTask", 256, nullptr, 1, nullptr);More: Docs/Getting_Started.md · example
- Getting Started:
Docs/Getting_Started.md| RU - Context7 AI docs (1,985 examples): https://context7.com/xyphrodite/at32f403a-407-docs
- Project Context:
ProjectContext.md - Protocols:
Library/Terminal/PROTOCOLS.md - Errata (41 issues):
at32f403a-407-docs(Context7 + YAML taxonomy)
This repo is indexed for AI assistants:
- Context7 libraryId:
/xyphrodite/at32f403a-407-docs(firmware library + errata, 1,985 examples) - Add to your prompt:
use library /xyphrodite/at32f403a-407-docsor/xyphrodite/at32f4-drivers llms.txtat root lists all entry points for ingestion
UnitControlWave disabled in LBS.
- Flash ~100–200 KB, RAM ~20–50 KB + FreeRTOS heap, stack 2 KB (bare) / per-task
- Toolchain:
arm-none-eabi-gcc, C11, C++20,-O2/-Og
Per-file copyright (ArteryTek CMSIS/drivers, MIT FreeRTOS, Segger RTT). See headers.
For TAFCO LoRaWAN integration see parent repo XYphrodite/TAFCO-Lora-projects (if public) and Docs/.