James Reynolds / AD594x Driver
Embed: (wiki syntax)

« Back to documentation index

AFE_Control_Functions

AFE_Control_Functions
[AFE_Control]

The top-level control functions for whole AFE perspective. More...

Functions

void AD5940_Initialize (void)
 Initialize AD5940.
void AD5940_AFECtrlS (uint32_t AfeCtrlSet, BoolFlag State)
 Control most AFE digital and analog block within one register access.
AD5940Err AD5940_LPModeCtrlS (uint32_t EnSet)
 When LP mode is enabled, some functions are under control of LPMODECON, rather than original registers.
void AD5940_AFEPwrBW (uint32_t AfePwr, uint32_t AfeBw)
 Set AFE power mode and system bandwidth include HSDAC, Excitation-buffer, HSTIA and ADC etc.
void AD5940_REFCfgS (AFERefCfg_Type *pBufCfg)
 Configure reference buffer include 1.8V/1.1V high/low power buffers.

Detailed Description

The top-level control functions for whole AFE perspective.

This function set is used to control the whole AFE block by block. It's a top-level configuration. It's convenient when do initialization work with the functions called BLOCK**Cfg**. You can tune the parameters at run-time using more detailed functions from each block. rather than top-level functions where you need to configure all parameters.


Function Documentation

void AD5940_AFECtrlS ( uint32_t  AfeCtrlSet,
BoolFlag  State 
)

Control most AFE digital and analog block within one register access.

Parameters:
AfeCtrlSet,:A set of blocks that will be controlled select it from AFECTRL_Const Below is two examples to use it.

  • AFECTRL_HPREFPWR: Control high power reference(bandgap).
  • AFECTRL_WG|AFECTRL_ADCPWR: The OR'ed control set. Control Waveform generator and ADC power.
State,:Enable or disable selected control set signal. Select from

  • bFALSE: Disable or power down selected block(s).
  • bTRUE: Enable all selected block(s).
Returns:
return none.

Definition at line 1170 of file ad5940.c.

void AD5940_AFEPwrBW ( uint32_t  AfePwr,
uint32_t  AfeBw 
)

Set AFE power mode and system bandwidth include HSDAC, Excitation-buffer, HSTIA and ADC etc.

Parameters:
AfePwr: {AFEPWR_LP, AFEPWR_HP} Select parameters from AFEPWR_Const

  • AFEPWR_LP: Set AFE to low power mode
  • AFEPWR_HP: Set AFE to High speed mode to support 200kHz.
AfeBw: {AFEBW_AUTOSET, AFEBW_50KHZ, AFEBW_100KHZ, AFEBW_250KHZ}

  • AFEBW_AUTOSET: Set the bandwidth automatically based on WGFCW frequency word.
  • AFEBW_50KHZ: Set system bandwidth to 50kHz.
  • AFEBW_100KHZ: Set system bandwidth to 100kHz.
  • AFEBW_250KHZ: Set system bandwidth to 250kHz.
Returns:
return none.

Definition at line 1279 of file ad5940.c.

void AD5940_Initialize ( void   )

Initialize AD5940.

This function must be called whenever there is reset(Software Reset or Hardware reset or Power up) happened. This function is used to put AD5940 to correct state.

Returns:
return None

Definition at line 1094 of file ad5940.c.

AD5940Err AD5940_LPModeCtrlS ( uint32_t  EnSet )

When LP mode is enabled, some functions are under control of LPMODECON, rather than original registers.

Warning:
LPMODE is key protected, this function only takes effect after AD5940_LPModeEnS(bTRUE) For LP mode, use one register to control most AFE digital and analog block.

The parameter means the blocks. The selected block will be enabled. All others will be disabled. The method to enable/disable blocks are defined by register LPMODECON, either by clearing or setting bits.

Parameters:
EnSet,:A set of blocks that will be enabled. Select it from LPMODECTRL_Const. All others not selected in EnSet will be disabled.

  • LPMODECTRL_ALDOPWR|LPMODECTRL_HFOSCEN: Turn on ALDO and HFOSC, disable all others.
  • LPMODECTRL_ALL: Enable all blocks.
Returns:
return none.

Definition at line 1216 of file ad5940.c.

void AD5940_REFCfgS ( AFERefCfg_Type *  pBufCfg )

Configure reference buffer include 1.8V/1.1V high/low power buffers.

Parameters:
pBufCfg:Pointer to buffer configure structure;
Returns:
return none.

Definition at line 1293 of file ad5940.c.