Platform/ECM3532/M3/hw/csp/ecm3532/m3/csp/src/eta_csp_vhfo.c
/***************************************************************************/
/**
 *
 *  EtaCspVhfoInit - Initialize the VHFO if flash INFO page trim data is
 *                   available, use it.
 * @return  eta CSP status
 *
 * WARNING: This function assumes the flash is up and running when called.
 ******************************************************************************/
Initialize the VHFO if flash INFO page trim data is
available, use it.
@return  eta CSP status

This function assumes the flash is up and running when called.
Initialize the VHFO if flash INFO page trim data is available use it . @return eta CSP status This function assumes the flash is up and running when called .
tEtaStatus
EtaCspVhfoInit(void)
{
    uint32_t ui32Value[4];
     Read the VHFO trm values from flash INFO page.
     x4 this is 0-x140
    EtaCspFlashInfoRead(VHFO_TRIM_ADDRESS, ui32Value);
     Check that VHFO trim key value matches 0x9999AA55
    if(ui32Value[VHFO_TRIM_KEY_INDEX] == 0x9999AA55)
    {
         OK then we will use the trim value from flash INFO page.
        REG_RTC_OSC_CSR2.V = ui32Value[VHFO_TRIM_VALUE_INDEX];
    }
     Now turn it on.
    REG_RTC_OSC_CSR2.BF.VHFO_PD_N = 1;
    return(eEtaSuccess);
}
tEtaStatus EtaCspVhfoInit ( void ) { uint32_t ui32Value [ 4 ] ; EtaCspFlashInfoRead ( VHFO_TRIM_ADDRESS , ui32Value ) ; if ( ui32Value [ VHFO_TRIM_KEY_INDEX ] == 0x9999AA55 ) { REG_RTC_OSC_CSR2 . V = ui32Value [ VHFO_TRIM_VALUE_INDEX ] ; } REG_RTC_OSC_CSR2 . BF . VHFO_PD_N = 1 ; return ( eEtaSuccess ) ; }
EtaCspVhfoInit - Initialize the VHFO if flash INFO page trim data is
                   available, use it.
EtaCspVhfoInit - Initialize the VHFO if flash INFO page trim data is available use it .
// // Read the VHFO trm values from flash INFO page. // x4 this is 0-x140 // // // Check that VHFO trim key value matches 0x9999AA55 // // // OK then we will use the trim value from flash INFO page. // // // Now turn it on. //