xWRL6432 MMWAVE-L-SDK  05.04.00.01
hwa/v0/hwa.h File Reference

Introduction

HWA driver interface for HWA2.0.

Go to the source code of this file.

Data Structures

struct  HWA_Attrs
 HWA H/W Parameters. More...
 
struct  HWA_RAMAttrs
 HWA RAM Parameters. More...
 
struct  HWA_SrcDMAConfig
 Source trigger DMA parameters. More...
 
struct  HWA_CommonConfig
 HWA Common Config. More...
 
struct  HWA_SourceConfig
 HWA Paramset Config for Input Formatter/Source block. More...
 
struct  HWA_DestConfig
 HWA Paramset Config for Output Formatter/Destination block. More...
 
struct  HWA_AccelModeFFT
 HWA Paramset Config for FFT block. More...
 
struct  HWA_AccelModeCompress
 HWA Paramset Config for Compression/Decompression block. More...
 
struct  HWA_ComplexMultiply
 HWA Paramset Config for ComplexMultiply block. More...
 
struct  HWA_PreProcessing
 HWA Paramset Config for pre-processing block. More...
 
struct  HWA_AccelModeCFAR
 HWA Paramset Config for CFAR block. More...
 
struct  HWA_ParamConfig
 HWA Paramset Config. More...
 
struct  HWA_InterruptConfig
 HWA Interrupt Config. More...
 
struct  HWA_Stats
 HWA Statistics from the STATISTICS block. More...
 
struct  HWA_DebugStats
 HWA Debug statistics. More...
 
struct  HWA_MemInfo
 HWA Local memory Information. More...
 
struct  HWA_InterruptPriority
 HWA interrupt priority for HWA background thread done, ALT thread done, paramset done interrupt 1 and paramset done 2 interrupt. More...
 
struct  HWA_OpenConfig
 HWA configuration structure, which describes the configuration information, needed for hwa handle open. More...
 
struct  HWA_InterruptCtx
 HWA Interrupt context structure for paramset done interrupt. More...
 
struct  HWA_DoneInterruptCtx
 HWA Interrupt context structure for done interrupt. More...
 
struct  HWA_Object
 HWA driver internal Config. More...
 

Macros

#define HWA_RAM_WINDOW_SIZE_IN_BYTES   1024*4
 
#define HWADRV_ADDR_TRANSLATE_CPU_TO_HWA(x)   (uint32_t)((uint32_t)(x) & 0x000FFFFFU)
 transfer the CPU address to HWA address More...
 
#define HWA_ERRNO_BASE   (-2800)
 HWA driver error base. More...
 
#define HWA_EINVAL   (HWA_ERRNO_BASE-1)
 Error Code: Invalid argument. More...
 
#define HWA_ENOINIT   (HWA_ERRNO_BASE-2)
 Error Code: Operation cannot be done as HWA_init is not done. More...
 
#define HWA_EOUTOFRANGE   (HWA_ERRNO_BASE-3)
 Error Code: input argument out of range. More...
 
#define HWA_EOUTOFMEM   (HWA_ERRNO_BASE-4)
 Error Code: out of memory. More...
 
#define HWA_ENOTSUPP   (HWA_ERRNO_BASE-5)
 Error Code: feature not supported. More...
 
#define HWA_EINUSE   (HWA_ERRNO_BASE-6)
 Error Code: channel or resource in use. More...
 
#define HWA_ENOTALIGNED   (HWA_ERRNO_BASE-7)
 Error Code: address is not aligned to the expected boundary. More...
 
#define HWA_EINVAL_COMMON_REGISTER_PARAMSET   (HWA_ERRNO_BASE-8)
 Error Code: Invalid argument: paramset Start/Stop Idx and numLoops in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_PARAMSET_ALT   (HWA_ERRNO_BASE-9)
 Error Code: Invalid argument: paramset Start/Stop Idx and numLoops for context switching in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_FFTCONFIG   (HWA_ERRNO_BASE-10)
 Error Code: Invalid argument: for FFT config in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_DCEST   (HWA_ERRNO_BASE-11)
 Error Code: Invalid argument: for DC estimation in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_CFAR   (HWA_ERRNO_BASE-12)
 Error Code: Invalid argument: for CFAR config in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_INTERFERENCE   (HWA_ERRNO_BASE-13)
 Error Code: Invalid argument: for interference localization/mitigation in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_COMPLEXMULT   (HWA_ERRNO_BASE-14)
 Error Code: Invalid argument: for complex multiply in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_CHANCOMB   (HWA_ERRNO_BASE-15)
 Error Code: Invalid argument: for channel combine in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_ZEROINSERT   (HWA_ERRNO_BASE-16)
 Error Code: Invalid argument: for zero insert in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_ADVSTAT   (HWA_ERRNO_BASE-17)
 Error Code: Invalid argument: for advanced statistics in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_COMPRESS   (HWA_ERRNO_BASE-18)
 Error Code: Invalid argument: for compress/decompression in common register. More...
 
#define HWA_EINVAL_COMMON_REGISTER_LOCALMAXIMUM   (HWA_ERRNO_BASE-19)
 Error Code: Invalid argument: for local maximum in common register. More...
 
#define HWA_EINVAL_PARAMSET_GENERALCONFIG   (HWA_ERRNO_BASE - 20)
 Error Code: Invalid argument: general config in paramset
More...
 
#define HWA_EINVAL_PARAMSET_SOURCE   (HWA_ERRNO_BASE - 21)
 Error Code: Invalid argument: source(input formatter) in paramset. More...
 
#define HWA_EINVAL_PARAMSET_DEST   (HWA_ERRNO_BASE - 22)
 Error Code: Invalid argument: destination(output formatter) in paramset. More...
 
#define HWA_EINVAL_PARAMSET_SRCDST_ADDRESS   (HWA_ERRNO_BASE - 23)
 Error Code: Invalid argument: src and dst address in paramset. More...
 
#define HWA_EINVAL_PARAMSET_FFTMODE_GENERALCONFIG   (HWA_ERRNO_BASE - 24)
 Error Code: Invalid argument: FFT mode: general config in paramset. More...
 
#define HWA_EINVAL_PARAMSET_FFTMODE_SIZE   (HWA_ERRNO_BASE - 25)
 Error Code: Invalid argument: FFT mode: FFT size in paramset. More...
 
#define HWA_EINVAL_PARAMSET_FFTMODE_POSTPROC   (HWA_ERRNO_BASE - 26)
 Error Code: Invalid argument: FFT mode: post processing in paramset. More...
 
#define HWA_EINVAL_PARAMSET_FFTMODE_PREPROC   (HWA_ERRNO_BASE - 27)
 Error Code: Invalid argument: FFT mode: pre-processing in paramset. More...
 
#define HWA_EINVAL_PARAMSET_FFTMODE_PREPROC_INTERF   (HWA_ERRNO_BASE - 28)
 Error Code: Invalid argument: FFT mode: pre-processing interference localization/statistics/mitigation in paramset. More...
 
#define HWA_EINVAL_PARAMSET_FFTMODE_PREPROC_COMPLEXMULT   (HWA_ERRNO_BASE - 29)
 Error Code: Invalid argument: FFT mode: pre-processing complex multiply block in paramset. More...
 
#define HWA_EINVAL_PARAMSET_CFARMODE_GENERALCONFIG   (HWA_ERRNO_BASE - 30)
 Error Code: Invalid argument: CFAR mode: general configuration in paramset. More...
 
#define HWA_EINVAL_PARAMSET_CFARMODE_OSCONFIG   (HWA_ERRNO_BASE - 31)
 Error Code: Invalid argument: CFAR mode: CFAR-OS configuration in paramset. More...
 
#define HWA_EINVAL_PARAMSET_CFARMODE_CACONFIG   (HWA_ERRNO_BASE - 32)
 Error Code: Invalid argument: CFAR mode: CFAR-CA configuration in paramset. More...
 
#define HWA_EINVAL_PARAMSET_COMPRESSMODE   (HWA_ERRNO_BASE - 33)
 Error Code: Invalid argument: compress/decompress mode: compress/decompress configuration in paramset. More...
 
#define HWA_EINVAL_PARAMSET_LOCALMAXMODE   (HWA_ERRNO_BASE - 34)
 Error Code: Invalid argument: local maxima mode: local maxima configuration in paramset. More...
 
#define HWA_PARAMSET_POLLINGNOTALLOWED   (HWA_ERRNO_BASE - 35)
 Error Code: if paramset interrupt is enabled, polling should be disabled. More...
 
#define HWA_NUM_RXCHANNELS   (12U)
 Number of RX channels in pre-processing block. More...
 
#define HWA_NUM_INTERFMITG_WINARRAY   (5U)
 Number of programmable array of window parameters in interference mitigation block. More...
 
#define HWA_BPMPATTERN_LENGTH_INWORDS   (8U)
 The length of BPM Pattern sequence in words. More...
 
#define HWA_CHANCOMB_LENGTH_INWORDS   (8U)
 The length of channel combining vector in words. More...
 
#define HWA_ZEROINSERT_LENGTH_INWORDS   (8U)
 The length of zero insert mask in words. More...
 
#define HWA_NUM_RAMS   (3U)
 The number of RAM types in HWA. More...
 
#define HWA_MAXNUM_LOOPS   (4095U)
 The maximum number of loops in HWA. More...
 
#define HWA_CMP_K_ARR_LEN   (8U)
 The length of EGE compression/decompression K-paramseters array. More...
 
#define HWA_DONE_INTERRUPT_PRIORITY   (HwiP_MAX_PRIORITY - 1)
 Default HWA background thread done interrupt priority. More...
 
#define HWA_PARAMSETDONE_INTERRUPT1_PRIORITY   (HwiP_MAX_PRIORITY - 1)
 Default HWA paramset done interrupt 1 priority. More...
 
#define HWA_PARAMSETDONE_INTERRUPT2_PRIORITY   (HwiP_MAX_PRIORITY - 1)
 Default HWA paramset done interrupt 2 priority. More...
 
#define HWA_FEATURE_BIT_ENABLE   ((uint8_t)1U)
 
#define HWA_FEATURE_BIT_DISABLE   ((uint8_t)0U)
 
#define HWA_SAMPLES_WIDTH_16BIT   ((uint8_t)0U)
 
#define HWA_SAMPLES_WIDTH_32BIT   ((uint8_t)1U)
 
#define HWA_SAMPLES_FORMAT_COMPLEX   ((uint8_t)0U)
 
#define HWA_SAMPLES_FORMAT_REAL   ((uint8_t)1U)
 
#define HWA_SAMPLES_UNSIGNED   ((uint8_t)0U)
 
#define HWA_SAMPLES_SIGNED   ((uint8_t)1U)
 
#define HWA_FFT_WINDOW_NONSYMMETRIC   ((uint8_t)0U)
 
#define HWA_FFT_WINDOW_SYMMETRIC   ((uint8_t)1U)
 
#define HWA_FFT_WINDOW_INTERPOLATE_MODE_NONE   ((uint8_t)0U)
 
#define HWA_FFT_WINDOW_INTERPOLATE_MODE_4K   ((uint8_t)1U)
 
#define HWA_FFT_WINDOW_INTERPOLATE_MODE_2K   ((uint8_t)2U)
 
#define HWA_FFT_MODE_MAGNITUDE_LOG2_DISABLED   ((uint8_t)0U)
 
#define HWA_FFT_MODE_MAGNITUDE_ONLY_ENABLED   ((uint8_t)2U)
 
#define HWA_FFT_MODE_MAGNITUDE_LOG2_ENABLED   ((uint8_t)3U)
 
#define HWA_FFT_MODE_OUTPUT_DEFAULT   ((uint8_t)0U)
 
#define HWA_FFT_MODE_OUTPUT_MAX_STATS   ((uint8_t)2U)
 
#define HWA_FFT_MODE_OUTPUT_SUM_STATS   ((uint8_t)3U)
 
#define HWA_NOISE_AVG_MODE_CFAR_CA   ((uint8_t)0U)
 
#define HWA_NOISE_AVG_MODE_CFAR_CAGO   ((uint8_t)1U)
 
#define HWA_NOISE_AVG_MODE_CFAR_CASO   ((uint8_t)2U)
 
#define HWA_NOISE_AVG_MODE_CFAR_OS   ((uint8_t)3U)
 
#define HWA_TRIG_MODE_IMMEDIATE   ((uint8_t)0U)
 
#define HWA_TRIG_MODE_SOFTWARE   ((uint8_t)1U)
 
#define HWA_TRIG_MODE_RESERVED1   ((uint8_t)2U)
 
#define HWA_TRIG_MODE_DMA   ((uint8_t)3U)
 
#define HWA_TRIG_MODE_HARDWARE   ((uint8_t)4U)
 
#define HWA_TRIG_MODE_RESERVED2   ((uint8_t)5U)
 
#define HWA_TRIG_MODE_RESERVED3   ((uint8_t)6U)
 
#define HWA_TRIG_MODE_M4CONTROL   ((uint8_t)7U)
 
#define HWA_ACCELMODE_FFT   ((uint8_t)0U)
 
#define HWA_ACCELMODE_CFAR   ((uint8_t)1U)
 
#define HWA_ACCELMODE_COMPRESS   ((uint8_t)2U)
 
#define HWA_ACCELMODE_NONE   ((uint8_t)7U)
 
#define HWA_CFAR_OPER_MODE_LOG_INPUT_REAL   0U
 
#define HWA_CFAR_OPER_MODE_LOG_INPUT_COMPLEX   1U
 
#define HWA_CFAR_OPER_MODE_MAG_INPUT_REAL   2U
 
#define HWA_CFAR_OPER_MODE_MAG_INPUT_COMPLEX   3U
 
#define HWA_CFAR_OPER_MODE_MAG_SQR_INPUT_REAL   4U
 
#define HWA_CFAR_OPER_MODE_MAG_SQR_INPUT_COMPLEX   5U
 
#define HWA_CFAR_OUTPUT_MODE_I_nAVG_ALL_Q_CUT   ((uint8_t)0U)
 
#define HWA_CFAR_OUTPUT_MODE_I_nAVG_ALL_Q_DET_FLAG   ((uint8_t)1U)
 
#define HWA_CFAR_OUTPUT_MODE_I_PEAK_IDX_Q_NEIGHBOR_NOISE_VAL   ((uint8_t)2U)
 
#define HWA_CFAR_OUTPUT_MODE_I_PEAK_IDX_Q_CUT   ((uint8_t)3U)
 
#define HWA_CMP_DCMP_COMPRESS   ((uint8_t)0U)
 
#define HWA_CMP_DCMP_DECOMPRESS   ((uint8_t)1U)
 
#define HWA_CMP_K_ARR_LEN   (8U)
 The length of EGE compression/decompression K-paramseters array. More...
 
#define HWA_COMPRESS_METHOD_EGE   ((uint8_t)0U)
 
#define HWA_COMPRESS_METHOD_BFP   ((uint8_t)1U)
 
#define HWA_COMPRESS_PATHSELECT_BOTHPASSES   ((uint8_t)3U)
 
#define HWA_RAM_TYPE_WINDOW_RAM   ((uint8_t)0U)
 
#define HWA_RAM_TYPE_INTERNAL_RAM   ((uint8_t)1U)
 
#define HWA_INTERFERENCE_ENABLE   ((uint8_t)1U)
 
#define HWA_INTERFERENCE_DISABLE   ((uint8_t)0U)
 
#define HWA_INTERFERENCE_THRESH_MODE_MAG_OR_MAGDIFF   ((uint8_t)0U)
 
#define HWA_INTERFERENCE_THRESH_MODE_MAG   ((uint8_t)1U)
 
#define HWA_INTERFERENCE_THRESH_MODE_MAGDIFF   ((uint8_t)2U)
 
#define HWA_INTERFERENCE_THRESH_MODE_MAG_AND_MAGDIFF   ((uint8_t)3U)
 
#define HWA_INTERFERENCE_THRESH_SELECT_USER_DEFINED   ((uint8_t)0U)
 
#define HWA_INTERFERENCE_THRESH_SELECT_BUILTIN_SUM_STATS   ((uint8_t)1U)
 
#define HWA_INTERFERENCE_THRESH_SELECT_BUILTIN   ((uint8_t)2U)
 
#define HWA_INTERFERENCE_STATS_RESET_HOLD   ((uint8_t)0U)
 
#define HWA_INTERFERENCE_STATS_RESET_FREE_RUNNING   ((uint8_t)1U)
 
#define HWA_INTERFERENCE_STATS_RESET_PER_CHIRP   ((uint8_t)2U)
 
#define HWA_INTERFERENCE_STATS_RESET_PER_FRAME   ((uint8_t)3U)
 
#define HWA_ACCUMULATORREG_TYPE_DC   ((uint8_t)0U)
 
#define HWA_ACCUMULATORREG_TYPE_INTERF_MAG   ((uint8_t)1U)
 
#define HWA_ACCUMULATORREG_TYPE_INTERF_MAGDIFF   ((uint8_t)2U)
 
#define HWA_ACCUMULATORREG_TYPE_INTERF   ((uint8_t)3U)
 
#define HWA_INTERFERENCE_THRESHOLD_TYPE_MAG   ((uint8_t)0U)
 
#define HWA_INTERFERENCE_THRESHOLD_TYPE_MAGDIFF   ((uint8_t)1U)
 
#define HWA_PARAMDONE_INTERRUPT_TYPE_CPU   ((uint8_t)1U)
 
#define HWA_PARAMDONE_INTERRUPT_TYPE_DMA   ((uint8_t)2U)
 
#define HWA_COMMONCONFIG_MASK_NUMLOOPS   0x00000001
 
#define HWA_COMMONCONFIG_MASK_PARAMSTARTIDX   0x00000002
 
#define HWA_COMMONCONFIG_MASK_PARAMSTOPIDX   0x00000004
 
#define HWA_COMMONCONFIG_MASK_FFT1DENABLE   0x00000008
 
#define HWA_COMMONCONFIG_MASK_BPMRATE   0x00000010
 
#define HWA_COMMONCONFIG_MASK_BPMPATTERN   0x00000020
 
#define HWA_COMMONCONFIG_MASK_INTERFERENCETHRESHOLD   0x00000040
 
#define HWA_COMMONCONFIG_MASK_TWIDDITHERENABLE   0x00000080
 
#define HWA_COMMONCONFIG_MASK_LFSRSEED   0x00000100
 
#define HWA_COMMONCONFIG_MASK_FFTSUMDIV   0x00000200
 
#define HWA_COMMONCONFIG_MASK_CFARTHRESHOLDSCALE   0x00000400
 
#define HWA_COMMONCONFIG_MASK_I_CMULT_SCALE   0x00000800
 
#define HWA_COMMONCONFIG_MASK_Q_CMULT_SCALE   0x00001000
 
#define HWA_COMMONCONFIG_MASK_DCEST_SCALESHIFT   0x00002000
 
#define HWA_COMMONCONFIG_MASK_DCSUB_SWVAL   0x00004000
 
#define HWA_COMMONCONFIG_MASK_INTERFMAG_THRESHOLD   0x00008000
 
#define HWA_COMMONCONFIG_MASK_INTERFMAGDIFF_THRESHOLD   0x00010000
 
#define HWA_COMMONCONFIG_MASK_INTERFSUM_MAG   0x00020000
 
#define HWA_COMMONCONFIG_MASK_INTERFSUM_MAGDIFF   0x00040000
 
#define HWA_COMMONCONFIG_MASK_EGECOMRESS_KPARAM   0x000080000
 
#define HWA_COMPLEX_MULTIPLY_MODE_DISABLE   ((uint8_t)0U) /** 0-disable */
 
#define HWA_COMPLEX_MULTIPLY_MODE_FREQ_SHIFTER   ((uint8_t)1U) /** 1-Freq Shifter mode, see \ref HWA_ComplexMultiply::freqShiftTwiddleIncr */
 
#define HWA_COMPLEX_MULTIPLY_MODE_SLOW_DFT   ((uint8_t)2U) /** 2-slow DFT mode, see \ref HWA_CommonConfig::modeCfg::slowDFT::startFreq */
 
#define HWA_COMPLEX_MULTIPLY_MODE_FFT_STITCHING   ((uint8_t)3U) /** 3-FFT stitching mode, see \ref HWA_CommonConfig::modeCfg::FFTstitching::twiddlePattern and HWA_CommonConfig::modeCfg::FFTstitching::winInterpolateMode */
 
#define HWA_COMPLEX_MULTIPLY_MODE_MAG_SQUARED   ((uint8_t)4U) /** 4-Magnitude Squared mode */
 
#define HWA_COMPLEX_MULTIPLY_MODE_SCALAR_MULT   ((uint8_t)5U) /** 5-Scalar Multiplication mode, see \ref HWA_CommonConfig::modeCfg::scalerMultiply::scaleCmultScaleEn */
 
#define HWA_COMPLEX_MULTIPLY_MODE_VECTOR_MULT   ((uint8_t)6U) /** 6-Vector Multiplication mode, see \ref HWA_CommonConfig::modeCfg::vectorMultiplyMode1::cmultScaleEn and HWA_CommonConfig::modeCfg::vectorMultiplyMode1::ramAddrOffset */
 
#define HWA_COMPLEX_MULTIPLY_MODE_VECTOR_MULT_2   ((uint8_t)7U) /** 7-Vector Multiplication mode 2, see \ref HWA_CommonConfig::modeCfg::vectorMultiplyMode2::ramAddrOffset */
 
#define HWA_DCEST_INTERFSUM_RESET_MODE_NOUPDATE   ((uint8_t)0U) /** Hold the internal accumulators without updating */
 
#define HWA_DCEST_INTERFSUM_RESET_MODE_SOFTWARERESET   ((uint8_t)1U) /** free-running without automatic reset, software can reset the accumulators by writing to either DC_EST_RESET_SW register for DC accumulator, or INTF_STATUS_RESET_SW for interference statistics */
 
#define HWA_DCEST_INTERFSUM_RESET_MODE_PARAMRESET   ((uint8_t)2U) /** Reset the internal accumulators at the start of parameter set (i.e per chirp accumulation) */
 
#define HWA_DCEST_INTERFSUM_RESET_MODE_PARAMRESET_ZEROLPCONT   ((uint8_t)3U) /** Reset the internal accumulators at the start of parameter set only if loop counter is 0 (i.e per frame accumulation) */
 
#define HWA_DCSUB_SELECT_DCSW   ((uint8_t)0U) /** DC subtracted value comes from user defined through DC_I_SW[12] and DC_Q_SW[12] register */
 
#define HWA_DCSUB_SELECT_DCEST   ((uint8_t)1U) /** DC subtracted value comes from built-in DC estimation hardware, DC_EST_I_VAL[12] and DC_EST_I_VAL[12] registers */
 
#define HWA_FFT_STITCHING_TWID_PATTERN_2K   ((uint8_t)0U) /** 2K fft stitching twid factor pattern */
 
#define HWA_FFT_STITCHING_TWID_PATTERN_4K   ((uint8_t)1U) /** 4K fft stitching twid factor pattern */
 

Typedefs

typedef void * HWA_Handle
 A handle that is returned from a HWA_open() call. More...
 
typedef void(* HWA_ParamDone_IntHandlerFuncPTR) (uint32_t paramSet, void *arg)
 HWA Interrupt callback function after every paramset completion. More...
 
typedef void(* HWA_Done_IntHandlerFuncPTR) (void *arg)
 HWA Interrupt callback function after all paramsets completion. More...
 

Functions

void HWA_init (void)
 Function to initialize the HWA module. More...
 
void HWA_deinit (void)
 Function to deinitialize the HWA module. More...
 
HWA_Handle HWA_open (uint32_t index, HWA_OpenConfig *hwaCfg, int32_t *errCode)
 Function to initialize HWA specified by the particular index value. More...
 
int32_t HWA_close (HWA_Handle handle)
 Function to close a HWA peripheral specified by the HWA handle. More...
 
int32_t HWA_reset (HWA_Handle handle)
 Function to reset the internal state machine of the HWA. More...
 
DSSHWACCRegs * HWA_getCommonCtrlAddr (HWA_Handle handle)
 Function to returns the HWA common control base address. More...
 
DSSHWACCPARAMRegs * HWA_getParamSetAddr (HWA_Handle handle, uint8_t paramsetIdx)
 Function to returns the HWA paramSet base address. More...
 
int32_t HWA_configCommon (HWA_Handle handle, HWA_CommonConfig *commonConfig)
 Function to set the common HWA configuration parameters needed for the next operations/iterations/paramsets of HWA. More...
 
int32_t HWA_configParamSet (HWA_Handle handle, uint8_t paramsetIdx, HWA_ParamConfig *paramConfig, HWA_SrcDMAConfig *dmaConfig)
 Function to set the HWA configuration parameters for a given paramSet. More...
 
int32_t HWA_getDMAconfig (HWA_Handle handle, uint8_t dmaTriggerSrc, HWA_SrcDMAConfig *dmaConfig)
 Function to get the config to program the DMA for a given DMA Trigger channel. Application should use the returned config to program the DMA so that it can then in turn trigger the paramset. Application should make sure that the channel provided here in dmaTriggerSrc should match the HWA_ParamConfig::dmaTriggerSrc passed to HWA_configParamSet() More...
 
int32_t HWA_getCfarPeakCntRegAddress (HWA_Handle handle, uint32_t *peakCntAddr)
 Function to get the address of CFAR Peak Count register. More...
 
int32_t HWA_configRam (HWA_Handle handle, uint8_t ramType, uint8_t *data, uint32_t dataSize, uint32_t startIdx)
 Function to set the HWA RAM : HWA_RAM_TYPE_WINDOW_RAM, HWA_RAM_TYPE_VECTORMULTIPLY_RAM, HWA_RAM_TYPE_LUT_FREQ_DEROTATE_RAM or HWA_RAM_TYPE_SHUFFLE_RAM. More...
 
int32_t HWA_enableParamSetInterrupt (HWA_Handle handle, uint8_t paramsetIdx, HWA_InterruptConfig *intrConfig)
 Function to enable the CPU and/or DMA interrupt after a paramSet completion. The CPU interrupt for every paramset completion may not be supported on all devices - see HWA_Attrs::isConcurrentAccessAllowed. More...
 
int32_t HWA_enableDoneInterrupt (HWA_Handle handle, HWA_Done_IntHandlerFuncPTR callbackFn, void *callbackArg)
 Function to enable the CPU interrupt after all programmed paramSets have been completed in the background or ALT thread. More...
 
int32_t HWA_disableParamSetInterrupt (HWA_Handle handle, uint8_t paramsetIdx, uint8_t interruptTypeFlag)
 Function to disable the CPU and/or DMA interrupt after a paramSet completion. More...
 
int32_t HWA_disableDoneInterrupt (HWA_Handle handle)
 Function to disable the CPU interrupt after all programmed paramSets have been completed. More...
 
int32_t HWA_enable (HWA_Handle handle, uint8_t flagEnDis)
 Function to enable the state machine of the HWA. This should be called after paramset and RAM have been programmed. More...
 
int32_t HWA_setSoftwareTrigger (HWA_Handle handle)
 Function to manually trigger the execution of the state machine via software, the software trigger through either FW2HWA_TRIG_0 or FW2HWA_TRIG_1 register if the trigger is set to HWA_TRIG_MODE_SOFTWARE from DSP, trigger is done through FW2HWA_TRIG_0 if the trigger is set to HWA_TRIG_MODE_M4CONTROL from M4, trigger is done through FW2HWA_TRIG_1. More...
 
int32_t HWA_setDMA2ACCManualTrig (HWA_Handle handle, uint8_t idx)
 Function to manually trigger the execution of the state machine waiting on DMA via software. More...
 
int32_t HWA_setSourceAddress (HWA_Handle handle, uint16_t paramIdx, uint32_t sourceAddress)
 Function to set the source address for one paramset. More...
 
int32_t HWA_readStatsReg (HWA_Handle handle, HWA_Stats *pStats, uint8_t numIter)
 Function to read the 4 sets of 'MAX' statistics register. More...
 
int32_t HWA_readCFARPeakCountReg (HWA_Handle handle, uint8_t *pbuf, uint8_t size)
 Function to read the PEAKCNT register. More...
 
int32_t HWA_readDebugReg (HWA_Handle handle, HWA_DebugStats *pStats)
 Function to read the debug registers (paramcurr, loopcou, acc_trig_in_stat) More...
 
int32_t HWA_clearDebugReg (HWA_Handle handle)
 Function to clear the debug registers (acc_trig_in_clr) More...
 
int32_t HWA_getHWAMemInfo (HWA_Handle handle, HWA_MemInfo *memInfo)
 Function to get HWA processing Memory information including address, size and number of banks. More...
 
int32_t HWA_getDMAChanIndex (HWA_Handle handle, uint8_t edmaChanId, uint8_t *hwaDestChan)
 Function to get the dma destination index with a given EDMA channel number This function assumes the EDMA channel number is from the first EDMA instance. More...
 
int32_t HWA_getEDMAChanId (HWA_Handle handle, uint8_t hwaDMAdestChan)
 Function to get the edma EDMA channel number from a given HWA paramset destination channel. This function assumes the EDMA channel number is from the first EDMA instance. More...
 
int32_t HWA_readDCEstimateReg (HWA_Handle handle, cmplx32ImRe_t *pbuf, uint8_t startIdx, uint8_t size)
 Function to read the DC_EST_I/Q register. More...
 
int32_t HWA_readIntfAccReg (HWA_Handle handle, uint64_t *accBuf, uint8_t type, uint8_t startIdx, uint8_t size)
 Function to read the interference threshold MAG or MAGDIFF Accumulator register. More...
 
int32_t HWA_readDCAccReg (HWA_Handle handle, cmplx64ImRe_t *accbuf, uint8_t startIdx, uint8_t size)
 Function to read the DC estimation accumulator register,. More...
 
int32_t HWA_readInterfChirpCountReg (HWA_Handle handle, uint16_t *numInterfSamplesChirp)
 Function to read the number of samples that exceeded the threshold in a chirp. More...
 
int32_t HWA_readInterfFrameCountReg (HWA_Handle handle, uint32_t *numInterfSamplesFrame)
 Function to read the number of samples that exceeded the threshold in a frame. More...
 
int32_t HWA_readInterfThreshReg (HWA_Handle handle, uint32_t *pbuf, uint8_t startIdx, uint8_t size, uint8_t type)
 Function to read the interference statistics INTF_LOC_THRESH_MAG_VAL or INTF_LOC_THRESH_MAG_VAL registers. More...
 

Variables

HWA_Attrs gHwaAttrs []
 Externally defined driver configuration array. More...
 
HWA_RAMAttrs gHwaRamCfg [HWA_NUM_RAMS]
 Externally defined driver RAM configuration array. More...
 
HWA_Object gHwaObject []
 Externally defined driver object. More...
 
HWA_ObjectgHwaObjectPtr []
 Externally defined driver object pointer. More...
 
uint32_t gHwaConfigNum
 Externally defined driver configuration array size. More...
 

Macro Definition Documentation

◆ HWA_RAM_WINDOW_SIZE_IN_BYTES

#define HWA_RAM_WINDOW_SIZE_IN_BYTES   1024*4

Internal or Window RAM size in bytes. See HWA_configRam

◆ HWADRV_ADDR_TRANSLATE_CPU_TO_HWA

#define HWADRV_ADDR_TRANSLATE_CPU_TO_HWA (   x)    (uint32_t)((uint32_t)(x) & 0x000FFFFFU)

transfer the CPU address to HWA address

◆ HWA_NUM_RXCHANNELS

#define HWA_NUM_RXCHANNELS   (12U)

Number of RX channels in pre-processing block.

◆ HWA_NUM_INTERFMITG_WINARRAY

#define HWA_NUM_INTERFMITG_WINARRAY   (5U)

Number of programmable array of window parameters in interference mitigation block.

◆ HWA_BPMPATTERN_LENGTH_INWORDS

#define HWA_BPMPATTERN_LENGTH_INWORDS   (8U)

The length of BPM Pattern sequence in words.

◆ HWA_CHANCOMB_LENGTH_INWORDS

#define HWA_CHANCOMB_LENGTH_INWORDS   (8U)

The length of channel combining vector in words.

◆ HWA_ZEROINSERT_LENGTH_INWORDS

#define HWA_ZEROINSERT_LENGTH_INWORDS   (8U)

The length of zero insert mask in words.

◆ HWA_NUM_RAMS

#define HWA_NUM_RAMS   (3U)

The number of RAM types in HWA.

◆ HWA_MAXNUM_LOOPS

#define HWA_MAXNUM_LOOPS   (4095U)

The maximum number of loops in HWA.

Variable Documentation

◆ gHwaAttrs

HWA_Attrs gHwaAttrs[]
extern

Externally defined driver configuration array.

◆ gHwaRamCfg

HWA_RAMAttrs gHwaRamCfg[HWA_NUM_RAMS]
extern

Externally defined driver RAM configuration array.

◆ gHwaObject

HWA_Object gHwaObject[]
extern

Externally defined driver object.

◆ gHwaObjectPtr

HWA_Object* gHwaObjectPtr[]
extern

Externally defined driver object pointer.

◆ gHwaConfigNum

uint32_t gHwaConfigNum
extern

Externally defined driver configuration array size.