Skip to content

What This Section Covers ​

“System Control” is a category in the Ai-M6x (BL616/BL618) development tutorials that gathers the basic abilities for making the chip behave as you want, storing data, and debugging problems. Unlike lighting an LED or driving a UART, these features control the chip itself: how logs are printed, how data is stored, how to sleep for low power, how to reboot, and how to locate a crash.

Each feature has its own page with a uniform structure: Concepts First → Example Overview → Operation Steps → Code Execution Flow → APIs Used → Complete Code → FAQ. If you are new to this category, read this overview first, then open the page you need.

Feature List ​

FeaturePageWhat it does (one line)SDK example
blog Logblog LogPrints runtime status to the serial port with F/E/W/I/D/T levels and tag filtering — the foundation of debuggingexamples/bflog/barebone_sync
Flash OperationsFlash OperationsErases, writes, and read-back verifies internal Flash data areas for non-volatile dataexamples/peripherals/flash/flash_read_write
Sleep ModeSleep ModeEnters PDS deep sleep and wakes every 1 second via the RTC timer — the core of low-power designsexamples/pmu/bl616/pds_rtc
Software TimerSoftware TimerUses FreeRTOS software timers as “alarm clocks” that run a callback on expiry, without occupying a hardware timerSelf-authored (FreeRTOS xTimerCreate)
Software RebootSoftware RebootActively resets the system via reset APIs for config-reload or post-OTA restartSelf-authored (bl_sys_reset_system() etc.)
Power-Off SavingPower-Off SavingStores key-value pairs (Wi-Fi credentials, device config, etc.) in Flash with EasyFlash — survives power lossexamples/easyflash
Partition TablePartition TableReads and prints the Flash partition table to see which address each region (FW, PSM, OTA, ...) usesexamples/partition
Log Debug & AssertLog Debug & AssertPrints variables/arrays/hexdumps with DBG macros and checks “this must hold” with asserts to catch logic errors fastexamples/log_dbg_assert
Crash DebuggingCrash DebuggingForces a crash, saves the coredump to Flash, and reconstructs the call stack offline to locate the crashexamples/crash

How to Choose ​

Environment Setup ​

All pages share the same build/flash flow; the prerequisite is a working SDK environment:

Build with make CHIP=bl616 BOARD=bl616dk (the Ai-M62's BL616 and Ai-M61's BL618 are the same series, so both use bl616), flash with make flash CHIP=bl616 COMX=/dev/ttyUSB0 (use COMx on Windows), and set the serial baud rate to 2000000.

Have questions?

For any other questions, visit the unified Q&A and discussion board: Ai-Thinker Discussions

Released under the MIT License. Build Time 2026-09-30 17:31:25