Example Project Software
示例项目软件
Example firmware 可以使用以下 bootloader flash 到 Main Controller:
- Main Controller Bootloader:
https://server.kk-t.eu/api/v1/share/File?file=iQExternalExampleMain_Bootloader.bin
Flash bootloader 后,连接 App,它会自动 detect fixture,并 suggest firmware update。
也可以 flash 和 debug source code。为了方便使用,我们提供了针对以下 IDE 预配置的 source code:
- STM32CubeIDE (https://www.st.com/en/development-tools/stm32cubeide.html)
- Keil uVision 5 (https://www.keil.com)
可从这里下载 source code:
https://kk-t.com/wp-content/uploads/2026/04/VisionExternalMainExample_2026_4_17.zip
如果解压有问题,请使用 WinRAR unzip。
Vision Controller is Vision Controller
Vision Protocol is Vision Protocol
Vision Command is iQ.Command
Vision Library is iQ Library
该 example 包含以下内容:
- Example Bootloader(为了简单,使用 Single Bank DFU)
- Example Application(On/Off button、控制 9x WS2812 LEDs、读取 battery Gauge)
- Example Bootloader Update(如果 bootloader 有 issue,用于展示如何 change bootloader)
- Vision Library
- Bootloader File Generator(一个 example,用于 package resulting .bin files,并通过 app 发送到 fixture。该 project 使用 application .bin file,并添加包含 signature、file length 和 file CRC 的 header)
Application 和 Bootloader 使用提供的 Vision library 实现 SPI Interface 和 RDM Implementation:
- Vision SPI Library (SPI_V3): 在 documentation 的 Software -> SPI Interface -> Vision SPI Library 中说明
- RDM Vision Library: 在 documentation 的 Software -> RDM -> Vision RDM Library 中说明
- ManagedFlash Library: 简单 flash abstraction
- Button Library: 简单 asynchronous button implementation
Example application 的 code structure 如下:

Example Application Notes:
Program entry main.cs 位于 Core/src。这里执行必要的 hardware configurations。在 main(void) 的 hardware configuration 后,会看到 InitSystem() command。该 command 对初始化 example 及其所有 associated callbacks 非常重要。大部分 code 基于 interrupts 运行。其他 operations 通过 while loop 中的 Task routine 处理。请注意,这只是一个 example,不必完全复制,但它展示了简单实现方式。
Vision Controller is Vision Controller
Vision Protocol is Vision Protocol
Vision Command is iQ.Command
假设所有 hardware-related functions 都已正确配置,VISION SPI library 会以 interrupt-based 方式自动 configure Vision Controller。
在 Main.cs/Main.h 中可以找到所有 hardware-related aspects。所有需要 translate 到 hardware function 的 functions 都记录在这里。例如,用于 communication 的 SPI CS Pin 会在这里映射到 defined GPIO。
在 Application/inc 中的 defines.h 可以找到所有 fixture-specific definitions,例如 RDM Defines 或 fixture name。
所有 settings,例如 Input Source 或 DMX Personality,都会 buffer 在 variables.c 中。如果 essential parameters 通过 associated functions 被修改,program 会 reload vital interfaces,并将 settings 存储到 flash memory。
Application/src 中的 system_implementation.c file 包含 main application code。System 包含以下重要 components:
- Receiving DMX
- Receiving RDM
这些 functions 应从所有可能 input sources 调用,例如 DMX512、WDMX、ARTNET、VISION 等。它们用于正确处理不同 behaviors。