This project is a fork of the TI IWRL6432 mmWave Radar Minimum Rangeproc DPU Implementation repository which was created as part of a university assignment. Goal of this repo is to stream the full 1D radar cube for each frame via SPI in order to achieve higher throughput rates, enabling real-time processing of the data on another device (within certain limitations).
Please note, that there already is an easy way to stream raw ADC data via SPI using the demo project. Please refer to TI's tutorial here.
- Enable SPI data streaming of IWRL6432BOOST 1D Radar Cube (Range-FFT) data
- efficiently extract processed data for streaming to another device or a host computer
- more minimalistic and comprehendable approach than running the full mmwave demo project on the MCU
- stream already FFT processed data instead of ADC data (the FFT is calculated by the Rangeproc DPU during the
framePeriod)
- Compatible with the
mmwave-spi-ftdi-readerPython module for reading the SPI data- offers streaming of the data via a USB-SPI adapter cable (e.g. C232HM-DDHSL-0) to a host computer
- easy to use
- the whole chain (capturing, transferring, parsing) is able to run in real-time up to Radar Cube sizes of approx. 96 KByte
- build your own radar DSP chain: the data read by the module can then be further processed using radar signal processing libraries such as OpenRadar
- No CLI, static configuration only
- only supports static radar frontend configuration in
defines.h, which can be generated by thechirp_config_to_defines.pyscript from a.cfgfile created by the TI mmWave sensing estimator (tab "Advanced Chirp Design and Tuning")
- only supports static radar frontend configuration in
Warning: Please make sure to double-check all your actions with the EVM's user guide and the quick start guide before doing anything. I don't take any responsibility for damaged hardware.
-
Turn on switch 1.1 and 1.6 (turn others off)
- Switch 1.1 is for putting the EVM in debug mode, so we can flash the firmware in CCS Theia in debug mode
- Switch 1.6 is for enabling SPI and the SPI_BUSY GPIO pin aka. LED_SW_GPIO / GPIO_LED_PIN, which is used for synchronyzing the transfer with the host computer the data is streamed to
-
Connect the USB SPI C232HM-DDHSL-0 cable (or any other USB SPI cable, but I only can give reference for the C232HM-DDHSL-0)
Before connecting and powering on, please double check with the TI documentation (section "Steps to Perform Raw ADC Data Streaming on xWRL6432 FCCSP device").
IWRL6432 J2 connector C232HM-DDHSL-0 wire color VCC 3V do not connect MOSI yellow MISO green CS brown CLK orange SPI_BUSY grey GND black
Essentially, the SDK function DPU_RangeProcHWA_control() triggers a new frame and thus, chirping in the radar frontend. The DPU_RangeProcHWA_process() SDK function then processes the ADC data via the rangeproc DPU.
What happens within this code is the following in an endless loop:
- in the
dpcTasktheDPU_RangeProcHWA_process()is run, after it completes, it unblocks thespi_tx_start_semsemaphore. ThedpcTaskthen is blocked by thespi_tx_done_semsemaphore - Once the semaphore is unblocked and the
dpcTaskis blocked, thespiTaskstarts running and transferring the data- the task checks, if one radar cube is larger than
MAX_SPI_TRANSFER_SIZE- if the radar cube exceeds this size, it is split into smaller chunks
- if the full radar cube is smaller, the chunk to be transferred contains the full radar cube
- chunk by chunk is transferred in an own SPI transaction. Before the actual
MCSPI_transfer(), theSPI_BUSYpin is set to low, indicating to the host that data can be read - after the chunk transfer completes, the
SPI_BUSYpin is set to high again - after the transfer is completed, it unblocks the
spi_tx_done_semand therefore thedpcTaskis unblocked
- the task checks, if one radar cube is larger than
/minimal_rangeproc_impl/src/ |
|
|---|---|
main.c |
Initializes hardware, configures the radar sensor, sets up DPUs, and starts FreeRTOS. |
factory_cal.c |
Restores and applies factory calibration data from flash memory. |
mem_pool.c |
Implements memory pool management functions and data structures. |
mmwave_basic.c |
Handles mmWave sensor initialization, configuration, and control. |
mmwave_control_config.c |
Configures chirp and profile settings for TI mmWave radar. |
rangeproc_dpc.c |
Implements the Range Processing DPU (FFT, object detection, SPI transmission). |
spi_transmit.c |
Manages SPI transmission of radar cube data, synchronized via semaphores. |
/minimal_rangeproc_impl/include/ |
|
|---|---|
system.h |
Holds most global handles and configs. |
defines.h |
Defines chirp parameters (antenna settings, chirp configurations, timing). Configurations can be generated using the mmWave Sensing Estimator and the chirp_config_to_defines.py script. |