The Warp firmware is intended to be a demonstration and meassurement environment for testing the Warp hardware.
It provides facilities that we use to perform tests on the hardware such as activating the different programmable voltage regulator output voltages (16 different supply voltage levels), activating the programmable I2C pull-ups to different values (65536 different settings), changing the I2C and SPI bit rate, changing the Cortex-M0 clock frequency, and so on. Having a menu interface allows us to perform various experiments without having to re-compile and load firmware to the system for each experiment.
The Warp firmware is a tool for experimentation. You can also use it as a baseline for building real applications by modifying it to remove the menu-driven functionality and linking in only the sensor drivers you need.
The core of the firmware is in warp-kl03-ksdk1.1-boot.c
. The drivers for the individual sensors are in devXXX.c
for sensor XXX
. For example,
devADXL362.c
for the ADXL362 3-axis accelerometer. The section below briefly describes all the source files in this directory.
This is the CMake configuration file. Edit this to change the default size of the stack and heap.
This is the implementation of the SEGGER Real-Time Terminal interface. Do not modify.
Configuration file for SEGGER Real-Time Terminal interface. You can increase the size of BUFFER_SIZE_UP
to reduce text in the menu being trimmed.
Implementation of the SEGGER Real-Time Terminal interface formatted I/O routines. Do not modify.
Driver for Analog devices ADXL362.
Driver for AMG8834.
Driver for AS7262.
Driver for AS7263.
Header file with definitions used by both devAS7262.*
and devAS7263.*
.
Driver for BME680.
Driver for BMX055.
Driver for CCS811.
Driver forHDC1000 .
Driver for IS25WP128.
Driver for ISL23415.
Driver for L3GD20H.
Driver for LPS25H.
Driver for MAG3110.
Driver for MMA8451Q.
Driver for PAN1326.
Driver for SI4705.
Driver for SI7021.
Driver for TCS34725.
Definition of I/O pin configurations using the KSDK gpio_output_pin_user_config_t
structure.
Definition of I/O pin mappings and aliases for different I/O pins to symbolic names relevant to the Warp hardware design, via GPIO_MAKE_PIN()
.
Initialization assembler.
The core of the implementation. This puts together the processor initialization with a menu interface that triggers the individual sensor drivers based on commands entered at the menu.
You can modify warp-kl03-ksdk1.1-boot.c
to achieve a custom firmware implementation using the following steps:
-
Remove the definitions for all the
WarpI2CDeviceState
andWarpSPIDeviceState
structures for the sensors you are not using. -
Remove the function
repeatRegisterReadForDeviceAndAddress()
since that references all the sensors in the full Warp platform. -
Remove
activateAllLowPowerSensorModes()
andpowerupAllSensors()
since those assume they have access to all the sensors on the Warp platform. -
Modify
main()
to replace the menu (see thewhile (1)
loop) with the specific operations you want the hardware to perform after initialization.
You can inspect the baseline firmware to see what functions are called when you enter commands at the menu. You can then use the underlying functionality that is already implemented to implement your own custom tasks.
Implements functionality related to enabling the different low-power modes of the KL03.
Constant and data structure definitions.