Post Go back to editing

Difference between AD5940_EnterSleepS() and AfePwrCfg(AFE_HIBERNATE);

Category: Software
Product Number: ADUCM355

Hello,

What is the difference between AD5940_EnterSleepS() and AfePwrCfg(AFE_HIBERNATE) ?

AD5940_EnterSleepS() uses the register REG_AFE_SEQTRGSLP while AfePwrCfg(AFE_HIBERNATE) uses pADI_ALLON->PWRMOD.

Why are there two ways to enter hibernate mode ? What is the difference between these two ways to enter hibernate mode ?

In the examples, both are used:

    M355_PwrModes uses AD5940_EnterSleepS()

    M355_UART_Wakeup and M355_RTC use AfePwrCfg(AFE_HIBERNATE)  

We noticed that when we use  AD5940_EnterSleepS() at the end of a sequence, both analog and digital dice are in low-power mode. 
When not in a sequence (eg in M355_PwrModes example), digital die needs PwrCfg to go to low-power as well:
 case PWRMODE_HIBERNATE:
    {
      AD5940_EnterSleepS();                 //Enter AD5940 into hibernate. Sineosr bias is maintainded by default
      PwrCfg(ENUM_PMG_PWRMOD_HIBERNATE,     // Place digital die in Hibernate
             BITM_PMG_PWRMOD_MONVBATN,
             BITM_PMG_SRAMRET_BNK2EN);
      break;
    }
Can you explain the logic behind all this ?
Thank you.
Best regards.

Edit Notes

Space
[edited by: ViToCov at 11:49 AM (GMT -5) on 26 Nov 2025]
  • AD5940_EnterSleepS() is used in sequencer to trigger Hibernate mode where all except wakeup timer and LPDAC bias are powered off. It does the same as PWRMOD [0:1] setting.

    Direct config of PWRMOD register allows switching to hibernate mode outside sequencer. 

    AfePwrCfg() opens the unused switches and then sets PWRMOD to hibernate mode.