2.3.16 PHY_TrxSleep Function

C

PHY_Retval_t PHY_TrxSleep(PHY_SleepMode_t mode)

Summary

Sets the transceiver to sleep

Description

This function sets the transceiver to sleep or deep sleep state.

Precondition

PHY_Init() should have been called before calling this function

Parameters

ParamDescription
modeDefines sleep mode of transceiver SLEEP or DEEP_SLEEP

Returns

PHY_BUSY - The transceiver is busy in TX or RX

PHY_SUCCESS - The transceiver is put to sleep

PHY_TRX_ASLEEP - The transceiver is already asleep

Example

PHY_SleepMode_t sleepMode = SLEEP_MODE_1;
bool trxSleepStatus = false;

if (PHY_SUCCESS == PHY_TrxSleep(sleepMode))
{
    trxSleepStatus = true;
}

Remarks

When TRX is put into DeepSleep, the TRX registers are reset and it will hold default values, PIB values are getting written by PHY layer when Wakeup function is called.User has to reconfigure the configuration parameters (PHY_ConfigParam_t) which are set by application. This procedure is not needed for SLEEP mode as the TRX register values are retained.