|
AM273x MCU+ SDK
08.03.00
|
|
The HWA driver provides APIs to configure, trigger and obtain results from the hardware accelerator
Features Supported
- All HWA operating modes: FFT, CFAR, compression/decompression and local maxima
- API to program common HWA registers, HWA param sets
- API to program pre/post processing blocks and core computational units
- API to get output statistics and histogram outputs
- Interrupt and polling mode of operations - param done, processing done
- Manual or DMA trigger for data copy from/to HWA memories
SysConfig Features
- Note
- It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
- HWA instances selection
- Init/Deinit API integration with SYSCFG
Features NOT Supported
Important Usage Guidelines
- The HWA Driver needs to be initialized once across the System. This is done using the HWA_init. None of the HWA API can be used without invoking this API. Note: This API is integrated into Sysconfig and can be skipped by user if Sysconfig is used for integrating HWA
- Once the HWA Driver has been initialized; the HWA Driver instance can be opened using the HWA_open. The HWA_open can be called multiple times from different context to obtain a valid HWA handle. However, only the first call to HWA_open will perform the hardware initialization. Other subsequent calls will just return the already open handle.
Example Usage
Include the below file to access the APIs
Instance Open Example
uint32_t paramIdx = 0U;
gHwaHandle =
HWA_open(0, NULL, &status);
memset(&commonCfg, 0, sizeof(commonCfg));
memset(¶mCfg , 0, sizeof(paramCfg));
Instance Close Example
Instance Processing Example
int32_t status;
uint32_t dmaCh = 0U;
API
APIs for HWA
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 be...
int32_t HWA_reset(HWA_Handle handle)
Function to reset the internal state machine of the HWA.
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.
uint16_t paramStopIdx
Definition: hwa/v0/hwa.h:822
#define HWA_COMMONCONFIG_MASK_LFSRSEED
Definition: hwa/v0/hwa.h:481
#define HWA_COMMONCONFIG_MASK_TWIDDITHERENABLE
Definition: hwa/v0/hwa.h:480
HWA_Handle HWA_open(uint32_t index, HWA_OpenConfig *hwaCfg, int32_t *errCode)
Function to initialize HWA specified by the particular index value.
uint16_t numLoops
Definition: hwa/v0/hwa.h:815
uint8_t twidDitherEnable
Definition: hwa/v0/hwa.h:853
int32_t HWA_close(HWA_Handle handle)
Function to close a HWA peripheral specified by the HWA handle.
uint8_t triggerMode
Definition: hwa/v0/hwa.h:1673
int32_t HWA_configCommon(HWA_Handle handle, HWA_CommonConfig *commonConfig)
Function to set the common HWA configuration parameters needed for the next operations/iterations/par...
struct HWA_CommonConfig::@0 fftConfig
#define SystemP_SUCCESS
Return status when the API execution was successful.
Definition: SystemP.h:56
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.
#define HWA_COMMONCONFIG_MASK_STATEMACHINE_CFG
Definition: hwa/v0/hwa.h:476
#define HWA_ACCELMODE_FFT
Definition: hwa/v0/hwa.h:340
HWA Common Config.
Definition: hwa/v0/hwa.h:811
HWA Paramset Config.
Definition: hwa/v0/hwa.h:1672
uint16_t paramStartIdx
Definition: hwa/v0/hwa.h:819
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:159
#define HWA_TRIG_MODE_DMA
Definition: hwa/v0/hwa.h:309
uint32_t lfsrSeed
Definition: hwa/v0/hwa.h:858
uint64_t configMask
Definition: hwa/v0/hwa.h:812
uint8_t accelMode
Definition: hwa/v0/hwa.h:1681