James Reynolds / AD594x Driver
Embed: (wiki syntax)

« Back to documentation index

MISC_Block_Functions

MISC_Block_Functions
[MISC_Block]

Modules

 Interrupt_Controller_Functions
 GPIO_Block_Functions
 

Interrupt_Controller_Functions.


 LPMode_Block_Functions
 

GPIO_Block_Functions.


Functions

void AD5940_CLKCfg (CLKCfg_Type *pClkCfg)
 Configure AD5940 clock.
void AD5940_HFOSC32MHzCtrl (BoolFlag Mode32MHz)
 Configure Internal HFOSC to output 32MHz or 16MHz.
void AD5940_HPModeEn (BoolFlag Enable)
 Enable high power mode for high frequency EIS.
void AD5940_SleepKeyCtrlS (uint32_t SlpKey)
 LPMode_Block_Functions.
void AD5940_EnterSleepS (void)
 Put AFE to hibernate.
void AD5940_ShutDownS (void)
 Turn off LP-Loop and put AFE to hibernate mode;.
uint32_t AD5940_WakeUp (int32_t TryCount)
 Try to wakeup AD5940 by read register.
uint32_t AD5940_GetADIID (void)
 Read ADIID register, the value for current version is AD5940_ADIID.
uint32_t AD5940_GetChipID (void)
 Read CHIPID register, the value for current version is 0x5501.
AD5940Err AD5940_SoftRst (void)
 Reset AD5940 by register.
void AD5940_HWReset (void)
 Reset AD5940 with RESET pin.

Function Documentation

void AD5940_CLKCfg ( CLKCfg_Type pClkCfg )

Configure AD5940 clock.

Parameters:
pClkCfg,:Pointer to configuration structure.
Returns:
return none.

Definition at line 2499 of file ad5940.c.

void AD5940_EnterSleepS ( void   )

Put AFE to hibernate.

This will only take effect when SLP_KEY has been unlocked. Use function AD5940_SleepKeyCtrlS to enter correct key.

Returns:
return none.

Definition at line 2921 of file ad5940.c.

uint32_t AD5940_GetADIID ( void   )

Read ADIID register, the value for current version is AD5940_ADIID.

Returns:
return none.

Definition at line 2974 of file ad5940.c.

uint32_t AD5940_GetChipID ( void   )

Read CHIPID register, the value for current version is 0x5501.

Returns:
return none.

Definition at line 2983 of file ad5940.c.

void AD5940_HFOSC32MHzCtrl ( BoolFlag  Mode32MHz )

Configure Internal HFOSC to output 32MHz or 16MHz.

Parameters:
Mode32MHz: {bTRUE, bFALSE}

  • bTRUE: HFOSC 32MHz mode.
  • bFALSE: HFOSC 16MHz mode.
Returns:
return none.

Definition at line 2564 of file ad5940.c.

void AD5940_HPModeEn ( BoolFlag  Enable )

Enable high power mode for high frequency EIS.

Parameters:
Mode32MHz: {bTRUE, bFALSE}

  • bTRUE: HFOSC 32MHz mode.
  • bFALSE: HFOSC 16MHz mode.
Returns:
return none.

Definition at line 2599 of file ad5940.c.

void AD5940_HWReset ( void   )

Reset AD5940 with RESET pin.

Note:
This will call function AD5940_RstClr which locates in file XXXPort.C
Returns:
return none.

Definition at line 3007 of file ad5940.c.

void AD5940_ShutDownS ( void   )

Turn off LP-Loop and put AFE to hibernate mode;.

By function AD5940_EnterSleepS, we can put most blocks to hibernate mode except LP block. This function will shut down LP block and then enter sleep mode.

Returns:
return none.

Definition at line 2933 of file ad5940.c.

void AD5940_SleepKeyCtrlS ( uint32_t  SlpKey )

LPMode_Block_Functions.

Enter sleep mode key to unlock it or enter incorrect key to lock it. \ Once key is unlocked, it will always be effect until manually lock it

Parameters:
SlpKey: {SLPKEY_UNLOCK, SLPKEY_LOCK}

  • SLPKEY_UNLOCK Unlock Key so we can enter sleep(or called hibernate) mode.
  • SLPKEY_LOCK Lock key so AD5940 is prohibited to enter sleep mode.
Returns:
return none.

Definition at line 2911 of file ad5940.c.

AD5940Err AD5940_SoftRst ( void   )

Reset AD5940 by register.

Note:
AD5940 must be in active state so we can access registers. If AD5940 system clock is too low, we consider to use hardware reset, or we need to make sure register write is successfully.
Returns:
return none.

Definition at line 2994 of file ad5940.c.

uint32_t AD5940_WakeUp ( int32_t  TryCount )

Try to wakeup AD5940 by read register.

Any SPI operation can wakeup AD5940. AD5940_Initialize must be called to enable this function.

Parameters:
TryCountSpecify how many times we will read register. Zero or negative number means always waiting here.
Returns:
How many times register is read. If returned value is bigger than TryCount, it means wakeup failed.

Definition at line 2953 of file ad5940.c.