Texas Instruments AWR2243 Linux driver

From RidgeRun Developer Connection
Jump to: navigation, search

Nvidia-preferred-partner-badge-rgb-for-screen.png

RR Contact Us.png



The AWR2243 device is an integrated single-chip FMCW transceiver capable of operation in the 76- to 81-GHz band. The device enables unprecedented levels of integration in an extremely small form factor. AWR2243 is an ideal solution for low-power, self-monitored, ultra-accurate radar systems in the automotive space.

Simple programming model changes can enable a wide variety of sensor implementations (Short, Mid, Long) with the possibility of dynamic reconfiguration for implementing a multimode sensor. Additionally, the device is provided as a complete platform solution including reference hardware design, software drivers, sample configurations, API guide, and user documentation AWR2243 Single-Chip 76- to 81-GHz FMCW Transceiver.

AWR2243 main features

The AWR2243 is a radar sensor with the following features:

  • FMCW transceiver:
    • Integrated PLL, transmitter, receiver, baseband, and ADC
    • 76- to 81-GHz coverage with 5 GHz available bandwidth
    • Four receive channels
    • Three transmit channels
    • Ultra-accurate chirp engine based on Fractional-N PLL
  • Host interface:
    • Control interface with an external processor over SPI or I2C interface
    • Data interface with an external processor over MIPI D-PHY and CSI2 v1.1
    • Interrupts for Fault Reporting
  • Support for output formats: 8-bit, 12-bit, 14-bit raw data
  • Advanced features
    • Embedded self-monitoring with limited Host processor involvement
    • Complex baseband architecture
    • Option of cascading multiple devices to increase channel count
    • Embedded interference detection capability

Applications:

Product

RidgeRun has developed a driver for the Jetson Xavier NX platform with the following support:

  • V4l2 Media controller driver.
  • Output format: RAW8 Bayer RGGB pattern.
  • Support for 2 radar devices.
  • Support for 1 chirp/frame capture, expandable to capture a custom number of chirps/frame and a custom chirp size.
  • CQ (Chirp Quality), CP (Chirp Parameters) Metadata support.
  • Capture with v4l2src.

Currently available for:

  • AWR2243 - Jetson Xavier NX - Jetpack 5.0.2
Xavier NX-radar connections.

Enabling the driver

In order to use this driver, you have to patch and compile the kernel source.

Using Jetpack

  • Once you have the source code, apply the patches to add the support for the AWR2243:
cd $JETPACK/sources/
PATCHES=<path to the provided tarball>
tar -xzf $PATCHES/awr2243-driver-for-tegra-xavier-nx-patches.tar.gz
quilt push -a

Please change the path in PATCHES for the one where you downloaded the tarball with the AWR2243 patches.

Follow the instructions in Build the Kernel, Modules, and DTB section to build the kernel, in step 4 you should enable the driver support as follows:

Device drivers.
Multimedia Support.
Media Ancillary Drivers.
NVIDIA overlay Encoders, decoders, sensors and other helper chips.
AWR2243 radar sensor support.

Then in this menu, you should press space to mark the AWR2243 driver option with <M>, this is to load the driver as a module, which means we will have to enable it manually later on the Jetson board.

Then press Exit at the bottom of the menu repeatedly until you see the Exit menu, press the Yes option and you are ready to compile the sources.

In summary:

-> Device Drivers                                                                                                                        
 -> Multimedia support                                                                                           
   -> Media Ancillary Drivers
      -> NVIDIA overlay Encoders, decoders, sensors and other helper chips
      -> <M> AWR2243 radar sensor support

Once the driver has been enabled on the menuconfig, please continue with the step 5 (Build the Kernel, Modules and DTB), in order to compile the kernel sources with the patch applied.

Now you can flash the board.

Using the driver

After flashing the board with the driver you may need an application using the Texas Instruments API for the AWR2243 to be able to communicate the radar device to the Xavier NX board. Once you have installed and instantiated the driver with sudo modprobe rr_awr2243 you should be able to do tests like the following using your application.

Tests

You can test the data received in the Xavier NX by running tests with v4l2-ctl command. For example, for 1 chirp per frame capture (chirp size=2048 bytes) you may run:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=2048,height=1,pixelformat=RGGB --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw --verbose

This will create a test.raw file containing the AWR2243 radar raw data captured by the driver, i.e:

00000000: 0900 f1ff 0300 f9ff 0600 f7ff 0100 0300  ................
00000010: f7ff feff 0600 0000 feff 0200 0500 f9ff  ................
.
.
.
000007e0: f1ff 0200 f6ff 0300 e9ff feff f5ff 0100  ................
000007f0: ffff 0600 fcff fcff f9ff f9ff f9ff 0100  ................

Performance statistics

Tegrastats in normal operation:

06-21-2023 14:56:57 RAM 1016/14901MB (lfb 3209x4MB) SWAP 0/7451MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48C thermal@47.5C AO@47.5C GPU@47C PMIC@50C
06-21-2023 14:56:58 RAM 1016/14901MB (lfb 3209x4MB) SWAP 0/7451MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47C CPU@48C thermal@47.5C AO@47.5C GPU@46.5C PMIC@50C
06-21-2023 14:56:59 RAM 1016/14901MB (lfb 3209x4MB) SWAP 0/7451MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47C CPU@48C thermal@47.3C AO@47.5C GPU@46.5C PMIC@50C
06-21-2023 14:57:00 RAM 1016/14901MB (lfb 3209x4MB) SWAP 0/7451MB (cached 0MB) CPU [0%@1190,2%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48.5C thermal@47.3C AO@47.5C GPU@47C PMIC@50C

Tegrastats with the above v4l2 command:

06-21-2023 14:57:01 RAM 1018/14901MB (lfb 3208x4MB) SWAP 0/7451MB (cached 0MB) CPU [17%@1190,9%@1190,4%@1190,4%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48.5C thermal@47.15C AO@47.5C GPU@47C PMIC@50C
06-21-2023 14:57:02 RAM 1028/14901MB (lfb 3208x4MB) SWAP 0/7451MB (cached 0MB) CPU [22%@1907,15%@1907,9%@1907,29%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@49C thermal@47.65C AO@47.5C GPU@47C PMIC@50C
06-21-2023 14:57:03 RAM 1045/14901MB (lfb 3207x4MB) SWAP 0/7451MB (cached 0MB) CPU [27%@1190,17%@1190,20%@1190,19%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48.5C thermal@47.65C AO@47.5C GPU@47C PMIC@50C
06-21-2023 14:57:04 RAM 1045/14901MB (lfb 3207x4MB) SWAP 0/7451MB (cached 0MB) CPU [20%@1190,12%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48.5C thermal@47.65C AO@47.5C GPU@47C PMIC@50C

References

[1] Texas Instruments. (2021). AWR2243 Single-Chip 76-to-81GHz Automotive Radar Sensor [Datasheet]. Retrieved from AWR2243 Single-Chip 76- to 81-GHz FMCW Transceiver.


RidgeRun Resources

Quick Start Client Engagement Process RidgeRun Blog Homepage
Technical and Sales Support RidgeRun Online Store RidgeRun Videos Contact Us

OOjs UI icon message-progressive.svg Contact Us

Visit our Main Website for the RidgeRun Products and Online Store. RidgeRun Engineering informations are available in RidgeRun Professional Services, RidgeRun Subscription Model and Client Engagement Process wiki pages. Please email to support@ridgerun.com for technical questions and contactus@ridgerun.com for other queries. Contact details for sponsoring the RidgeRun GStreamer projects are available in Sponsor Projects page. Ridgerun-logo.svg
RR Contact Us.png