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... | |
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... | |
void HWA_init | ( | void | ) |
Function to initialize the HWA module.
void HWA_deinit | ( | void | ) |
Function to deinitialize the HWA module.
HWA_Handle HWA_open | ( | uint32_t | index, |
HWA_OpenConfig * | hwaCfg, | ||
int32_t * | errCode | ||
) |
Function to initialize HWA specified by the particular index value.
index | HWA instance number |
hwaCfg | pointer 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. |
int32_t HWA_close | ( | HWA_Handle | handle | ) |
Function to close a HWA peripheral specified by the HWA handle.
handle | A HWA_Handle returned from HWA_open() |
int32_t HWA_reset | ( | HWA_Handle | handle | ) |
Function to reset the internal state machine of the HWA.
handle | A HWA_Handle returned from HWA_open() |
DSSHWACCRegs* HWA_getCommonCtrlAddr | ( | HWA_Handle | handle | ) |
Function to returns the HWA common control base address.
handle | A HWA_Handle returned from HWA_open() |
DSSHWACCPARAMRegs* HWA_getParamSetAddr | ( | HWA_Handle | handle, |
uint8_t | paramsetIdx | ||
) |
Function to returns the HWA paramSet base address.
handle | A HWA_Handle returned from HWA_open() |
paramsetIdx | A valid paramSet index for which the base address is returned. |
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.
handle | A HWA_Handle returned from HWA_open() |
commonConfig | HWA Common Config Parameters |
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.
handle | A HWA_Handle returned from HWA_open() |
paramsetIdx | A valid paramSet index for which the paramConfig is provided. |
paramConfig | HWA 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 |
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()
handle | A HWA_Handle returned from HWA_open() |
dmaTriggerSrc | Same as HWA_ParamConfig::dmaTriggerSrc 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 |
int32_t HWA_getCfarPeakCntRegAddress | ( | HWA_Handle | handle, |
uint32_t * | peakCntAddr | ||
) |
Function to get the address of CFAR Peak Count register.
handle | A HWA_Handle returned from HWA_open() |
peakCntAddr | [out]This parameter is set by the driver with the address of FFTPEAKCNT register which contains the number of CFAR detections. |
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.
handle | A HWA_Handle returned from HWA_open() |
ramType | Use defines HWA_RAM_TYPE |
data | data pointer that needs to be copied to RAM |
dataSize | Size of data to be copied in size of bytes |
startIdx | start index (in terms of bytes) within RAM where data needs to be copied |
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.
handle | A HWA_Handle returned from HWA_open() |
paramsetIdx | A valid paramSet index for which the intrConfig is provided. |
intrConfig | HWA Interrupt Config Parameters |
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.
handle | A HWA_Handle returned from HWA_open() |
callbackFn | user defined callback function to be called when this interrupt is generated |
callbackArg | user defined callback arg for the callback function |
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.
handle | A HWA_Handle returned from HWA_open() |
paramsetIdx | A valid paramSet index for which the interrupt is to be disabled |
interruptTypeFlag | Flag to indicate if CPU and/or DMA interrupts are to be disabled |
int32_t HWA_disableDoneInterrupt | ( | HWA_Handle | handle | ) |
Function to disable the CPU interrupt after all programmed paramSets have been completed.
handle | A HWA_Handle returned from HWA_open() |
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.
handle | A HWA_Handle returned from HWA_open() |
flagEnDis | Enable/Disable Flag: 0-disable, 1-enable |
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.
handle | A HWA_Handle returned from HWA_open() |
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.
handle | A HWA_Handle returned from HWA_open() |
idx | DMA channel number for whom software should simulate the trigger |
int32_t HWA_setSourceAddress | ( | HWA_Handle | handle, |
uint16_t | paramIdx, | ||
uint32_t | sourceAddress | ||
) |
Function to set the source address for one paramset.
handle | A HWA_Handle returned from HWA_open() |
paramIdx | the paramset index |
sourceAddress | source address |
int32_t HWA_readStatsReg | ( | HWA_Handle | handle, |
HWA_Stats * | pStats, | ||
uint8_t | numIter | ||
) |
Function to read the 4 sets of 'MAX' statistics register.
handle | A HWA_Handle returned from HWA_open() |
pStats | pointer to a memory of type HWA_Stats where value of all the Max and statistics Registers would be copied |
numIter | number 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); |
int32_t HWA_readCFARPeakCountReg | ( | HWA_Handle | handle, |
uint8_t * | pbuf, | ||
uint8_t | size | ||
) |
Function to read the PEAKCNT register.
handle | A HWA_Handle returned from HWA_open() |
pbuf | pointer to a memory where value of the PEAKCNT Registers would be copied |
size | size (in bytes) of the pbuf register provided. It should be atleast 2 bytes. |
int32_t HWA_readDebugReg | ( | HWA_Handle | handle, |
HWA_DebugStats * | pStats | ||
) |
Function to read the debug registers (paramcurr, loopcou, acc_trig_in_stat)
handle | A HWA_Handle returned from HWA_open() |
pStats | pointer to a memory of type HWA_debugStats where value of the RDSTATUS and HWACCREG12 Registers would be copied |
int32_t HWA_clearDebugReg | ( | HWA_Handle | handle | ) |
Function to clear the debug registers (acc_trig_in_clr)
handle | A HWA_Handle returned from HWA_open() |
int32_t HWA_getHWAMemInfo | ( | HWA_Handle | handle, |
HWA_MemInfo * | memInfo | ||
) |
Function to get HWA processing Memory information including address, size and number of banks.
handle | A HWA_Handle returned from HWA_open() |
memInfo | Pointer to save HWA processing memory information |
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.
handle | A HWA_Handle returned from HWA_open() |
edmaChanId | EDMA channell id |
hwaDestChan | Pointer to save destination channel index |
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.
handle | A HWA_Handle returned from HWA_open() |
hwaDMAdestChan | Destination channle id set in a paramset |
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.
handle | A HWA_Handle returned from HWA_open() |
pbuf | pointer 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 |
startIdx | The estimated DC results for the first RX channel Idx, must be less than 11. |
size | The number of Rx channels needed to be read. It should be less than 12. |
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.
handle | A HWA_Handle returned from HWA_open() |
accBuf | pointer to the accumulator result buffer for MAG or MAGDIFF |
type | see HWA_INTERFERENCE_THRESHOLD_TYPE macro for the either MAG or MAGDIFF accumulator . |
startIdx | The first accumulator channel needs to be read, must be less than 11. |
size | The number of channels needed to be read. It should be less than 12. |
int32_t HWA_readDCAccReg | ( | HWA_Handle | handle, |
cmplx64ImRe_t * | accbuf, | ||
uint8_t | startIdx, | ||
uint8_t | size | ||
) |
Function to read the DC estimation accumulator register,.
handle | A HWA_Handle returned from HWA_open() |
accbuf | pointer to a memory for accumulator results. |
startIdx | The first accumulator channel needs to be read, must be less than 11. |
size | The number of channels needed to be read. It should be less than 12. |
int32_t HWA_readInterfChirpCountReg | ( | HWA_Handle | handle, |
uint16_t * | numInterfSamplesChirp | ||
) |
Function to read the number of samples that exceeded the threshold in a chirp.
handle | A HWA_Handle returned from HWA_open() |
numInterfSamplesChirp | number of samples that exceeded the interference threshold in a chirp |
int32_t HWA_readInterfFrameCountReg | ( | HWA_Handle | handle, |
uint32_t * | numInterfSamplesFrame | ||
) |
Function to read the number of samples that exceeded the threshold in a frame.
handle | A HWA_Handle returned from HWA_open() |
numInterfSamplesFrame | number of samples exceeded the interference threshold in a frame |
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.
handle | A HWA_Handle returned from HWA_open() |
pbuf | pointer to a memory where the register values are copied into |
startIdx | The first channel index needs to be read, must be less than 11. |
size | The number of channels needed to be read. It should be less than 12. |
type | see HWA_INTERFERENCE_THRESHOLD_TYPE for correct values |