/* Disable the core and memory buck converters. 
This function disables the core and memory buck converters. */
void am_hal_pwrctrl_bucks_disable(void)
/* Disable the core and memory buck converters. 
This function disables the core and memory buck converters. */
void am_hal_pwrctrl_bucks_disable(void)
{
    if ( AM_BFR(PWRCTRL, POWERSTATUS, COREBUCKON) == 0  &&
         AM_BFR(PWRCTRL, POWERSTATUS, MEMBUCKON) == 0)
    {
        return;
    }
    if ( isRev_ADC()  &&
         (AM_REG(PWRCTRL, DEVICEEN) == AM_REG_PWRCTRL_DEVICEEN_ADC_EN) )
    {
            AM_REG(PWRCTRL, SUPPLYSRC) &=
                (AM_REG_PWRCTRL_SUPPLYSRC_SWITCH_LDO_IN_SLEEP_EN    |
                 AM_REG_PWRCTRL_SUPPLYSRC_MEMBUCKEN_EN);
    }
    else
    {
        AM_BFW(PWRCTRL, SUPPLYSRC, COREBUCKEN, 0);
        AM_BFW(PWRCTRL, SUPPLYSRC, MEMBUCKEN, 0);
    }
    am_hal_flash_delay(AM_HAL_PWRCTRL_BUCKDIS_DELAYCYCLES / 3);
}