AM273x MCU+ SDK  08.05.00
HWA Driver External Functions

Introduction

The section has a list of all the exported API which the applications need to invoke in order to use the driver.

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...
 
int32_t HWA_initializeRAM (HWA_Handle handle, uint32_t ramMemBankMask)
 Function to initialize RAM memory banks in 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::triggerSrc passed to HWA_configParamSet() 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...
 
uint32_t HWA_getRamAddress (uint8_t ramType)
 Function to get the RAM starting address for one specified RAM type. More...
 
int32_t HWA_readRam (HWA_Handle handle, uint8_t ramType, uint8_t *data, uint32_t dataSize, uint32_t startIdx)
 Function to read the HWA 2D statistics output RAM, including HWA_RAM_TYPE_2DSTAT_ITER_VAL, HWA_RAM_TYPE_2DSTAT_ITER_IDX, HWA_RAM_TYPE_2DSTAT_SAMPLE_VAL, HWA_RAM_TYPE_2DSTAT_SAMPLE_IDX or HWA_RAM_TYPE_HISTOGRAM_RAM, except the HWA_RAM_TYPE_HIST_THRESH_RAM. More...
 
int32_t HWA_readHistThresholdRam (HWA_Handle handle, HWA_CdfThreshold *cdfThresholdResult, uint8_t numSampleIndices, uint8_t startSampleIdx)
 Function to read the HWA HWA_RAM_TYPE_HIST_THRESH_RAM 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_paramSetDonePolling (HWA_Handle handle, uint8_t numParamSets, uint8_t *paramsetsArray)
 Function to poll the PARAM_DONE_SET_STATUS_0 and PARAM_DONE_SET_STATUS_1 registers to check if the specified paramsets are finished. More...
 
int32_t HWA_singleParamSetDonePolling (HWA_Handle handle, uint8_t paramsetIndex)
 Function to poll the PARAM_DONE_SET_STATUS_0 or PARAM_DONE_SET_STATUS_1 registers to check if one single specified paramset is finished. More...
 
int32_t HWA_enableDoneInterrupt (HWA_Handle handle, uint8_t threadIdx, 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, uint8_t threadIdx)
 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_enableContextSwitch (HWA_Handle handle, uint8_t flagEnDis)
 Function to enable or disable the context switching in hwa. 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_setContextswitchSoftwareTrigger (HWA_Handle handle)
 Function to manually trigger the execution of the state machine via software in context switch, the software trigger through CS_FW2ACC_TRIG register. More...
 
int32_t HWA_setContextswitchDMAManualTrigger (HWA_Handle handle, uint8_t idx)
 Function to manually trigger the execution of the state machine via DMA trigger in context switch. More...
 
int32_t HWA_softwareResetAccumulators (HWA_Handle handle, uint8_t accumulatortype)
 Function for sofware to reset the DC accumulators or interference statistics accumulators. More...
 
int32_t HWA_softwareResetRecursiveWinKvalue (HWA_Handle handle)
 Function resets the paramset counter used in recurise windowing mode with REC_WIN_MODE_SEL is set to 1. More...
 
int32_t HWA_softwareResetTwidIncrDeltaFrac (HWA_Handle handle)
 Function resets the execution counter if complex multiply is configured as frequency shifter mode with frequency increment (mode 10) 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_readClipStatus (HWA_Handle handle, uint16_t *clipStatusResult, uint8_t type)
 Function to read the Clip Status registers. More...
 
int32_t HWA_clearClipStatus (HWA_Handle handle, uint8_t type)
 Function to clear the Clip Status registers. 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...
 
int32_t HWA_controlPeripheralSuspendMode (HWA_Handle handle, uint8_t flagEnDis)
 Function to control the suspend mode of the peripheral when the controlling processor (where this driver is instantiated) is halted. More...
 
int32_t HWA_configureSingleStep (HWA_Handle handle, uint8_t flagEnDis)
 Function to enable/disable single-stepping approach which pauses the HWA execution after each param-set. More...
 
int32_t HWA_triggerSingleStep (HWA_Handle handle)
 Function to Trigger single-step. This triggers state machine to execute one parameter-set at a time and wait for the next single step trigger. More...
 

Function Documentation

◆ HWA_init()

void HWA_init ( void  )

Function to initialize the HWA module.

Precondition
This function must be called once per system and before any other HWA driver APIs. It resets the HWA H/W instances in the system.

◆ HWA_deinit()

void HWA_deinit ( void  )

Function to deinitialize the HWA module.

◆ HWA_open()

HWA_Handle HWA_open ( uint32_t  index,
HWA_OpenConfig hwaCfg,
int32_t *  errCode 
)

Function to initialize HWA specified by the particular index value.

Precondition
HWA_init() has been called
Parameters
indexHWA instance number
hwaCfgpointer to HWA configuration, it is only applied to the processors, which support the hardware interrupt priority, e.g R5F. for other processors, set it to NULL. For the processors, which support the hardware interrupt priority, setting to NULL uses the default interrupt priorities, otherwise, the interrupt priorities are provided through hwaCfg.
errCode[out] valid errorCode if NULL handle returned.
Returns
A HWA_Handle upon success. NULL if an error occurs.
See also
HWA_init()
HWA_close()

◆ HWA_close()

int32_t HWA_close ( HWA_Handle  handle)

Function to close a HWA peripheral specified by the HWA handle.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_reset()

int32_t HWA_reset ( HWA_Handle  handle)

Function to reset the internal state machine of the HWA.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_initializeRAM()

int32_t HWA_initializeRAM ( HWA_Handle  handle,
uint32_t  ramMemBankMask 
)

Function to initialize RAM memory banks in HWA.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
ramMemBankMaskBit mask to specify HWA MEM BANK, see HWA_APP_MEMINIT_CFG for correct values HWA_APP_MEMINIT_PARAM_RAM HWA_APP_MEMINIT_WINDOW_RAM HWA_APP_MEMINIT_PER_SAMPLE_MAX_VAL_EVEN_RAM HWA_APP_MEMINIT_PER_SAMPLE_MAX_VAL_ODD_RAM HWA_APP_MEMINIT_PER_ITER_MAX_VAL_RAM HWA_APP_MEMINIT_HIST_EVEN_RAM HWA_APP_MEMINIT_HIST_ODD_RAM HWA_APP_MEMINIT_MEMBANK_ALL
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_getCommonCtrlAddr()

DSSHWACCRegs* HWA_getCommonCtrlAddr ( HWA_Handle  handle)

Function to returns the HWA common control base address.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
Common control base address upon success else NULL on failure
See also
HWA_open()

◆ HWA_getParamSetAddr()

DSSHWACCPARAMRegs* HWA_getParamSetAddr ( HWA_Handle  handle,
uint8_t  paramsetIdx 
)

Function to returns the HWA paramSet base address.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
paramsetIdxA valid paramSet index for which the base address is returned.
Returns
Param set address upon success else NULL on failure
See also
HWA_open()

◆ HWA_configCommon()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
commonConfigHWA Common Config Parameters
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_configParamSet()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
paramsetIdxA valid paramSet index for which the paramConfig is provided.
paramConfigHWA ParamSet Config Parameters
dmaConfig[out] This parameter is set by the driver with values that user should use to program the source trigger DMA. user should provide a valid buffer here if the triggerMode is set to DMA in paramConfig
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_getDMAconfig()

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::triggerSrc passed to HWA_configParamSet()

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
dmaTriggerSrcSame as HWA_ParamConfig::triggerSrc of the paramset for whom this DMA is getting configured
dmaConfig[out]This parameter is set by the driver with values that user should use to program the source trigger DMA. user should provide a valid buffer here if the triggerMode is set to DMA in paramConfig
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_configRam()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
ramTypeUse defines HWA_RAM_TYPE
datadata pointer that needs to be copied to RAM
dataSizeSize of data to be copied in size of bytes
startIdxstart index (in terms of bytes) within RAM where data needs to be copied
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_getRamAddress()

uint32_t HWA_getRamAddress ( uint8_t  ramType)

Function to get the RAM starting address for one specified RAM type.

Parameters
ramTypethe RAM type see HWA_RAM_TYPE for correct RAM types defined in HWA
Returns
the RAM starting address, or NULL if error occurs
See also
HWA_open()

◆ HWA_readRam()

int32_t HWA_readRam ( HWA_Handle  handle,
uint8_t  ramType,
uint8_t *  data,
uint32_t  dataSize,
uint32_t  startIdx 
)

Function to read the HWA 2D statistics output RAM, including HWA_RAM_TYPE_2DSTAT_ITER_VAL, HWA_RAM_TYPE_2DSTAT_ITER_IDX, HWA_RAM_TYPE_2DSTAT_SAMPLE_VAL, HWA_RAM_TYPE_2DSTAT_SAMPLE_IDX or HWA_RAM_TYPE_HISTOGRAM_RAM, except the HWA_RAM_TYPE_HIST_THRESH_RAM.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
ramTypeUse defines HWA_RAM_TYPE, except HWA_RAM_TYPE_HIST_THRESH_RAM
datadata pointer that needs to be copied to RAM
dataSizeSize of data to be copied in size of bytes
startIdxstart index (in terms of bytes) within RAM where data needs to be copied
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_readHistThresholdRam()

int32_t HWA_readHistThresholdRam ( HWA_Handle  handle,
HWA_CdfThreshold cdfThresholdResult,
uint8_t  numSampleIndices,
uint8_t  startSampleIdx 
)

Function to read the HWA HWA_RAM_TYPE_HIST_THRESH_RAM RAM.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
cdfThresholdResultbuffer the CDF threshold results see HWA_CdfThreshold,
numSampleIndicesthe number of sample indices, which needs to be read out.
startSampleIdxthe start sample indice
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_enableParamSetInterrupt()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
paramsetIdxA valid paramSet index for which the intrConfig is provided.
intrConfigHWA Interrupt Config Parameters
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_paramSetDonePolling()

int32_t HWA_paramSetDonePolling ( HWA_Handle  handle,
uint8_t  numParamSets,
uint8_t *  paramsetsArray 
)

Function to poll the PARAM_DONE_SET_STATUS_0 and PARAM_DONE_SET_STATUS_1 registers to check if the specified paramsets are finished.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
numParamSetsnumber of paramsets need to poll.
paramsetsArraythe specified paramset array
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_singleParamSetDonePolling()

int32_t HWA_singleParamSetDonePolling ( HWA_Handle  handle,
uint8_t  paramsetIndex 
)

Function to poll the PARAM_DONE_SET_STATUS_0 or PARAM_DONE_SET_STATUS_1 registers to check if one single specified paramset is finished.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
paramsetIndexthe specified paramset index
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_enableDoneInterrupt()

int32_t HWA_enableDoneInterrupt ( HWA_Handle  handle,
uint8_t  threadIdx,
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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
threadIdxthe thread Idx, see HWA_THREAD for the correct value
callbackFnuser defined callback function to be called when this interrupt is generated
callbackArguser defined callback arg for the callback function
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_disableParamSetInterrupt()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
paramsetIdxA valid paramSet index for which the interrupt is to be disabled
interruptTypeFlagFlag to indicate if CPU and/or DMA interrupts are to be disabled
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_disableDoneInterrupt()

int32_t HWA_disableDoneInterrupt ( HWA_Handle  handle,
uint8_t  threadIdx 
)

Function to disable the CPU interrupt after all programmed paramSets have been completed.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
threadIdxthe thread Idx, see HWA_THREAD for the correct value
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_enable()

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.

Precondition
HWA_open() HWA_ConfigCommon() HWA_ConfigParamSet HWA_ConfigRam has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
flagEnDisEnable/Disable Flag: 0-disable, 1-enable
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_enableContextSwitch()

int32_t HWA_enableContextSwitch ( HWA_Handle  handle,
uint8_t  flagEnDis 
)

Function to enable or disable the context switching in hwa.

Precondition
HWA_open() HWA_ConfigCommon() HWA_ConfigParamSet HWA_ConfigRam and HWA_enable has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
flagEnDisEnable/Disable Flag: 0-disable, 1-enable
Returns
0 upon success. error code if an error occurs.
See also
HWA_enableContextSwitch()

◆ HWA_setSoftwareTrigger()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_setContextswitchSoftwareTrigger()

int32_t HWA_setContextswitchSoftwareTrigger ( HWA_Handle  handle)

Function to manually trigger the execution of the state machine via software in context switch, the software trigger through CS_FW2ACC_TRIG register.

Precondition
HWA_open() and HWA_enableContextSwitch() have been called.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_setContextswitchDMAManualTrigger()

int32_t HWA_setContextswitchDMAManualTrigger ( HWA_Handle  handle,
uint8_t  idx 
)

Function to manually trigger the execution of the state machine via DMA trigger in context switch.

Precondition
HWA_open() and HWA_enableContextSwitch() have been called.
Parameters
handleA HWA_Handle returned from HWA_open()
idxDMA channel number for whom software should simulate the trigger
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_softwareResetAccumulators()

int32_t HWA_softwareResetAccumulators ( HWA_Handle  handle,
uint8_t  accumulatortype 
)

Function for sofware to reset the DC accumulators or interference statistics accumulators.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
accumulatortypesee maros HWA_ACCUMULATORREG_TYPE, takes value either HWA_ACCUMULATORREG_TYPE_DC or HWA_ACCUMULATORREG_TYPE_INTERF
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_softwareResetRecursiveWinKvalue()

int32_t HWA_softwareResetRecursiveWinKvalue ( HWA_Handle  handle)

Function resets the paramset counter used in recurise windowing mode with REC_WIN_MODE_SEL is set to 1.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_softwareResetTwidIncrDeltaFrac()

int32_t HWA_softwareResetTwidIncrDeltaFrac ( HWA_Handle  handle)

Function resets the execution counter if complex multiply is configured as frequency shifter mode with frequency increment (mode 10)

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_setDMA2ACCManualTrig()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
idxDMA channel number for whom software should simulate the trigger
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_setSourceAddress()

int32_t HWA_setSourceAddress ( HWA_Handle  handle,
uint16_t  paramIdx,
uint32_t  sourceAddress 
)

Function to set the source address for one paramset.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
paramIdxthe paramset index
sourceAddresssource address
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_readClipStatus()

int32_t HWA_readClipStatus ( HWA_Handle  handle,
uint16_t *  clipStatusResult,
uint8_t  type 
)

Function to read the Clip Status registers.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
clipStatusResultthe clip status result if it is HWA_CLIPREG_TYPE_DCACC, the 12 lsb are the clip status of bot I / Q of DC acculuators 0 to 11 if it is HWA_CLIPREG_TYPE_DCEST, the 12 lsb are the clip sttus of DC estimatsion(both I / Q combined) if it is HWA_CLIPREG_TYPE_DCSUB, the last lsb is the DC subtraction clip status if it is HWA_CLIPREG_TYPE_INTFSTATS_MAGACC or HWA_CLIPREG_TYPE_INTFSTATS_MAGDIFFACC, the 12 lsb are the interference magnitude or magnitude diff accumulator clip status if it is HWA_CLIPREG_TYPE_INTFSTATS_MAGSUM or HWA_CLIPREG_TYPE_INTFSTATS_MAGDIFFSUM, the 1 bit in lsb is the interference magnitude sum or magnitude diff sum clip status if it is HWA_CLIPREG_TYPE_INTFSTATS_MAGTHRESHOLD or HWA_CLIPREG_TYPE_INTFSTATS_MAGDIFFTHRESHOLD, the 12 lsb are the interference magnitude difference threshold clip status if it is HWA_CLIPREG_TYPE_TWIDINCR_DELTAFRAC, the last 1 lsb is the clip status for TWID_INCR_DELTA_FRAC accumulator if it is HWA_CLIPREG_TYPE_CHANCOMB, the last lsb is the clip status of the channel combination if it is HWA_CLIPREG_TYPE_FFT, the last 13 lsb indicates any saturation / clipping for each FFT butterfly stages if it is HWA_CLIPREG_TYPE_INPUTFORMAT or HWA_CLIPREG_TYPE_OUTPUTFORMAT, the alst lsb is the clip stauts for input or output formatter
typesee HWA_CLIPREG_TYPE macro for correct clip register values .
Returns
0 upon success.error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_clearClipStatus()

int32_t HWA_clearClipStatus ( HWA_Handle  handle,
uint8_t  type 
)

Function to clear the Clip Status registers.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
typesee HWA_CLIPREG_TYPE macro for correct clip register values .
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_readStatsReg()

int32_t HWA_readStatsReg ( HWA_Handle  handle,
HWA_Stats pStats,
uint8_t  numIter 
)

Function to read the 4 sets of 'MAX' statistics register.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
pStatspointer to a memory of type HWA_Stats where value of all the Max and statistics Registers would be copied
numIternumber of iterations to read. Value 1-4 should be provided. User is expected to provide enough space for the pStats to hold 'numIter' worth of HWA_Stats Ex: HWA_Stats appHWAStats[3]; HWA_readStatsReg(appHWAhandle,appHWAStats,3);
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_readCFARPeakCountReg()

int32_t HWA_readCFARPeakCountReg ( HWA_Handle  handle,
uint8_t *  pbuf,
uint8_t  size 
)

Function to read the PEAKCNT register.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
pbufpointer to a memory where value of the PEAKCNT Registers would be copied
sizesize (in bytes) of the pbuf register provided. It should be atleast 2 bytes.
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_readDebugReg()

int32_t HWA_readDebugReg ( HWA_Handle  handle,
HWA_DebugStats pStats 
)

Function to read the debug registers (paramcurr, loopcou, acc_trig_in_stat)

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
pStatspointer to a memory of type HWA_debugStats where value of the RDSTATUS and HWACCREG12 Registers would be copied
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_clearDebugReg()

int32_t HWA_clearDebugReg ( HWA_Handle  handle)

Function to clear the debug registers (acc_trig_in_clr)

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_getHWAMemInfo()

int32_t HWA_getHWAMemInfo ( HWA_Handle  handle,
HWA_MemInfo memInfo 
)

Function to get HWA processing Memory information including address, size and number of banks.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
memInfoPointer to save HWA processing memory information
Returns
0 upon success. error code if an error occurs.
See also
HWA_open()

◆ HWA_getDMAChanIndex()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
edmaChanIdEDMA channell id
hwaDestChanPointer to save destination channel index
Returns
=0 Success <0 Error code if an error occurs.
See also
HWA_open()

◆ HWA_getEDMAChanId()

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.

Precondition
HWA_open() has been called.
Parameters
handleA HWA_Handle returned from HWA_open()
hwaDMAdestChanDestination channle id set in a paramset
Returns
>=0 Upon success, EDMA channel number <0 Error code if an error occurs.
See also
HWA_open()

◆ HWA_readDCEstimateReg()

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.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
pbufpointer to a memory where value of the DC_EST_I/Q Registers would be copied, even element is I value, and odd element is Q value
startIdxThe estimated DC results for the first RX channel Idx, must be less than 11.
sizeThe number of Rx channels needed to be read. It should be less than 12.
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_readIntfAccReg()

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.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
accBufpointer to the accumulator result buffer for MAG or MAGDIFF
typesee HWA_INTERFERENCE_THRESHOLD_TYPE macro for the either MAG or MAGDIFF accumulator .
startIdxThe first accumulator channel needs to be read, must be less than 11.
sizeThe number of channels needed to be read. It should be less than 12.
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_readDCAccReg()

int32_t HWA_readDCAccReg ( HWA_Handle  handle,
cmplx64ImRe_t *  accbuf,
uint8_t  startIdx,
uint8_t  size 
)

Function to read the DC estimation accumulator register,.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
accbufpointer to a memory for accumulator results.
startIdxThe first accumulator channel needs to be read, must be less than 11.
sizeThe number of channels needed to be read. It should be less than 12.
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_readInterfChirpCountReg()

int32_t HWA_readInterfChirpCountReg ( HWA_Handle  handle,
uint16_t *  numInterfSamplesChirp 
)

Function to read the number of samples that exceeded the threshold in a chirp.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
numInterfSamplesChirpnumber of samples that exceeded the interference threshold in a chirp
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_readInterfFrameCountReg()

int32_t HWA_readInterfFrameCountReg ( HWA_Handle  handle,
uint32_t *  numInterfSamplesFrame 
)

Function to read the number of samples that exceeded the threshold in a frame.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
numInterfSamplesFramenumber of samples exceeded the interference threshold in a frame
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_readInterfThreshReg()

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.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
pbufpointer to a memory where the register values are copied into
startIdxThe first channel index needs to be read, must be less than 11.
sizeThe number of channels needed to be read. It should be less than 12.
typesee HWA_INTERFERENCE_THRESHOLD_TYPE for correct values
Returns
0 upon success. error code if an error occurs.
See also
HWA_open(), HWA_Attrs::isConcurrentAccessAllowed

◆ HWA_controlPeripheralSuspendMode()

int32_t HWA_controlPeripheralSuspendMode ( HWA_Handle  handle,
uint8_t  flagEnDis 
)

Function to control the suspend mode of the peripheral when the controlling processor (where this driver is instantiated) is halted.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
flagEnDis0- HWA is not suspended and continues to run in the background even when controlling processor is halted 1- HWA is suspended/halted when controlling processor is halted
Returns
0 upon success. error code if an error occurs.

◆ HWA_configureSingleStep()

int32_t HWA_configureSingleStep ( HWA_Handle  handle,
uint8_t  flagEnDis 
)

Function to enable/disable single-stepping approach which pauses the HWA execution after each param-set.

Precondition
HWA_open() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
flagEnDis0- Disables single stepping approach 1- Enabled single stepping approach
Returns
0 upon success. error code if an error occurs.

◆ HWA_triggerSingleStep()

int32_t HWA_triggerSingleStep ( HWA_Handle  handle)

Function to Trigger single-step. This triggers state machine to execute one parameter-set at a time and wait for the next single step trigger.

Precondition
HWA_open(), HWA_configureSingleStep() has been called and HWA is not executing paramsets.
Parameters
handleA HWA_Handle returned from HWA_open()
Returns
0 upon success. error code if an error occurs.