![]() |
TI-radar AWR1843 C674x DSP core
1
|
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <xdc/std.h>
#include <xdc/cfg/global.h>
#include <xdc/runtime/IHeap.h>
#include <xdc/runtime/System.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/Memory.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Event.h>
#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/heaps/HeapBuf.h>
#include <ti/sysbios/heaps/HeapMem.h>
#include <ti/sysbios/family/c64p/Cache.h>
#include <ti/sysbios/family/c64p/Hwi.h>
#include <ti/sysbios/family/c64p/EventCombiner.h>
#include <ti/sysbios/utils/Load.h>
#include <ti/common/sys_common.h>
#include <ti/common/mmwave_sdk_version.h>
#include <ti/utils/cycleprofiler/cycle_profiler.h>
#include <ti/drivers/mailbox/mailbox.h>
#include <ti/drivers/adcbuf/ADCBuf.h>
#include <ti/drivers/esm/esm.h>
#include <ti/drivers/pinmux/pinmux.h>
#include <ti/drivers/soc/soc.h>
#include "common/mmWave_XSS.h"
#include "dss_data_path.h"
#include "EKF_XYZ_Interface.h"
#include "common/mmw_messages.h"
#include "common/app_cfg.h"
#include <cpy_tbl.h>
Go to the source code of this file.
Data Structures | |
struct | DSS2MSS_HSRAM |
Macros | |
#define | SOC_XWR18XX_DSS_HSRAM_SIZE 0x8000U /* Size: 32KB */ |
DSS stores the application output and DSS2MSS ISR information (for fast exception signalling) in HSRAM. More... | |
#define | DATAPATH_DET_PAYLOAD_SIZE (SOC_XWR18XX_DSS_HSRAM_SIZE - sizeof(uint8_t)) |
#define | MMW_NUM_ANGLE_BINS 64 |
More... | |
#define | SPEED_OF_LIGHT_IN_METERS_PER_SEC (3.0e8) |
#define | SPEED_OF_LIGHT_IN_METERS_PER_USEC (3.0e2) |
Typedefs | |
typedef struct DSS2MSS_HSRAM | DSS2MSS_HSRAM_t |
Functions | |
static void | DSS_mmWaveInitTASK (UArg arg0, UArg arg1) |
static void | DSS_mmWaveCtrlTask (UArg arg0, UArg arg1) |
static void | DSS_chirpIntCallback (uintptr_t arg) |
static void | DSS_frameStartIntCallback (uintptr_t arg) |
static int32_t | DSS_DataPathConfigAdcBuf () |
void | DSS_dataPathConfigPopulate (DSS_DataPathObj *obj) |
void | DSS_populateUSRR (DSS_DataPathObj *obj, uint16_t subframeIndx) |
void | DSS_dBScanConfigBuffers (DSS_DataPathObj *obj) |
static void | DSS_edmaBlockCopy (EDMA_Handle handle, uint32_t loadAddr, uint32_t runAddr, uint16_t size) |
static void | DSS_copyTable (EDMA_Handle handle, COPY_TABLE *tp) |
int32_t | DSS_DataPathInit (void) |
static int32_t | DSS_SendProcessOutputToMSS (uint8_t *ptrHsmBuffer, uint32_t outputBufSize, DSS_DataPathObj *obj) |
static void | DSS_DataPathOutputLogging (DSS_DataPathObj *dataPathObj) |
static void | mboxIn_uartOut_TASK () |
void | mboxCallbackFxn_MSS_ch0 (Mbox_Handle handle, Mailbox_Type peer) |
void | DSP_sleep (void) |
uint16_t | convertSNRdBtoThreshold (uint16_t numInteg, float ThresholdIndB, uint16_t bitwidth) |
static int32_t | DSS_mboxWrite (mmWaveMSG *message) |
void | _MmwDemo_dssAssert (int32_t expression, const char *file, int32_t line) |
int32_t | main (void) |
void | rxGainPhaseParam_Init (DSS_DataPathObj *obj) |
Variables | |
DSS2MSS_HSRAM_t | gHSRAM |
far COPY_TABLE | _MmwDemo_fastCode_L1PSRAM_copy_table |
MCB | gMCB |
Global Variable for tracking information required by the design. More... | |
volatile cycleLog_t | gCycleLog |
#define DATAPATH_DET_PAYLOAD_SIZE (SOC_XWR18XX_DSS_HSRAM_SIZE - sizeof(uint8_t)) |
Definition at line 78 of file dss_main.c.
#define MMW_NUM_ANGLE_BINS 64 |
#define SOC_XWR18XX_DSS_HSRAM_SIZE 0x8000U /* Size: 32KB */ |
DSS stores the application output and DSS2MSS ISR information (for fast exception signalling) in HSRAM.
Definition at line 75 of file dss_main.c.
#define SPEED_OF_LIGHT_IN_METERS_PER_SEC (3.0e8) |
Definition at line 90 of file dss_main.c.
#define SPEED_OF_LIGHT_IN_METERS_PER_USEC (3.0e2) |
Definition at line 91 of file dss_main.c.
typedef struct DSS2MSS_HSRAM DSS2MSS_HSRAM_t |
void _MmwDemo_dssAssert | ( | int32_t | expression, |
const char * | file, | ||
int32_t | line | ||
) |
Description
Sends DSS assert information to MSS
Not | Applicable. |
Definition at line 302 of file dss_main.c.
uint16_t convertSNRdBtoThreshold | ( | uint16_t | numInteg, |
float | ThresholdIndB, | ||
uint16_t | bitwidth | ||
) |
Description
Converts an SNR (in dB) to an SNR Threshold that the CFAR algo can use.
[in] | number | of integrations in the detection matrix Typically the number of virtual antennas |
[in] | Threshold | in dB (float) |
Threshold | for CFAR algorithm. |
Definition at line 1267 of file dss_main.c.
void DSP_sleep | ( | void | ) |
Description
Function to sleep the DSP using IDLE instruction. When DSP has no work left to do, the BIOS will be in Idle thread and will call this function. The DSP will wake-up on any interrupt (e.g chirp interrupt).
Not | Applicable. |
Definition at line 288 of file dss_main.c.
|
static |
Description
This is the callback function registered with the ADC Driver which is invoked when a chirp is available. This is executed in the ISR context.
[in] | arg | Application registered argument |
Not | Applicable. |
Definition at line 158 of file dss_main.c.
|
static |
Description
Performs linker generated copy table copy using EDMA. Currently this is used to page in fast code from L3 to L1PSRAM.
[in] | handle | EDMA handle |
[in] | tp | Pointer to copy table |
Not | Applicable. |
Definition at line 1147 of file dss_main.c.
|
static |
Description
Function to configure ADCBUF driver based on CLI inputs.
[out] | numRxChannels | Number of receive channels. |
Not | Applicable. |
Definition at line 1048 of file dss_main.c.
void DSS_dataPathConfigPopulate | ( | DSS_DataPathObj * | obj | ) |
Description
populates the data path object array with the MRR configuration.
[in] | obj | pointer to the data path object. |
Not | Applicable. |
Definition at line 613 of file dss_main.c.
int32_t DSS_DataPathInit | ( | void | ) |
|
static |
Description
Function to send data path detection output.
Not | Applicable. |
Definition at line 995 of file dss_main.c.
void DSS_dBScanConfigBuffers | ( | DSS_DataPathObj * | obj | ) |
Description
Configures the dBScan buffers.
[in] | data | path Object |
Not | applicable. |
Definition at line 1284 of file dss_main.c.
|
static |
Description
Performs simple block copy using EDMA. Used for the purpose of copying linker table for L3 to L1PSRAM copy. memcpy cannot be used because there is no data bus access to L1PSRAM.
[in] | handle | EDMA handle |
[in] | loadAddr | load address |
[in] | runAddr | run address |
[in] | size | size in bytes |
Not | Applicable. |
Definition at line 1185 of file dss_main.c.
|
static |
Description
This is the callback function registered when a frame is triggered. This is executed in the ISR context.
[in] | arg | Application registered argument |
Not | Applicable. |
Definition at line 177 of file dss_main.c.
|
static |
Description
Function to send a message to peer through Mailbox virtural channel
[in] | message | Pointer to the Capture demo message. |
Definition at line 640 of file dss_main.c.
|
static |
Description
This is the task which provides an execution context for the mmWave control module.
[in] | arg0 | Argument0 with which the task was created |
[in] | arg1 | Argument1 with which the task was created |
Not | Applicable. |
Definition at line 199 of file dss_main.c.
|
static |
Description
DSS Initialization Task which initializes the various components in the DSS subsystem.
[in] | arg0 | Argument0 with which the task was created |
[in] | arg1 | Argument1 with which the task was created |
Not | Applicable. |
Definition at line 472 of file dss_main.c.
void DSS_populateUSRR | ( | DSS_DataPathObj * | obj, |
uint16_t | subframeIndx | ||
) |
Description
Populates the configuration for the USRR point cloud subframe.
[in] | data | path Object |
Not | applicable. |
Q format of the output x/y/z coordinates
CFAR configuration in Doppler direction
CFAR configuration in Range direction
min and max range configuration
Multi object beam forming configuration
DC Range antenna signature calibration configuration.
CFAR thresholds are varied as a function of range
peakVal thresholds are varied as a function of range (meant to remove cases of clutter being detected too when we drive the car.) Thresholds were derived from experiments.
Configuring the dbSCan for car like objects. These numbers are derived from field tests
Configuring the 'parking assist' occupancy detect.
Definition at line 1316 of file dss_main.c.
|
static |
Description
Function to send detected objects to MSS logger.
[in] | ptrOutputBuffer | Pointer to the output buffer |
[in] | outputBufSize | Size of the output buffer |
[in] | obj | Handle to the Data Path Object |
=0 | Success <0 Failed |
Definition at line 766 of file dss_main.c.
int32_t main | ( | void | ) |
Description
Entry point into the DSS MRR TI Design
Not | Applicable. |
Definition at line 331 of file dss_main.c.
void mboxCallbackFxn_MSS_ch0 | ( | Mbox_Handle | handle, |
Mailbox_Type | peer | ||
) |
Description
This function is a callback function that invoked when a message is received from the peer.
[in] | handle | Handle to the Mailbox on which data was received |
[in] | peer | Peer from which data was received |
Not | Applicable. |
Definition at line 741 of file dss_main.c.
|
static |
Description
The Task is used to handle the mmw demo messages received from Mailbox virtual channel.
[in] | arg0 | arg0 of the Task. Not used |
[in] | arg1 | arg1 of the Task. Not used |
Not | Applicable. |
Definition at line 667 of file dss_main.c.
void rxGainPhaseParam_Init | ( | DSS_DataPathObj * | obj | ) |
Definition at line 393 of file dss_main.c.
References MAX_VEL_ENH_PROCESSING, POINT_CLOUD_PROCESSING, DSS_DataPathObj_t::processingPath, and DSS_DataPathObj_t::rxChPhaseComp.
far COPY_TABLE _MmwDemo_fastCode_L1PSRAM_copy_table |
volatile cycleLog_t gCycleLog |
Definition at line 99 of file dss_main.c.
Referenced by MmwDemo_processChirp().
DSS2MSS_HSRAM_t gHSRAM |
Definition at line 86 of file dss_main.c.
MCB gMCB |
Global Variable for tracking information required by the design.
Definition at line 97 of file dss_main.c.