Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of fsl_phy_mcr20a by
Phy.h File Reference
Go to the source code of this file.
Functions | |
void | PhyHwInit (void) |
Initialize the 802.15.4 Radio registers. | |
void | PhyAbort (void) |
Aborts the current sequence and force the radio to IDLE. | |
phyStatus_t | PhyPdDataRequest (pdDataReq_t *pTxPacket, volatile phyRxParams_t *pRxParams, volatile phyTxParams_t *pTxParams) |
This function will start a TX sequence. The packet will be sent OTA. | |
phyStatus_t | PhyPlmeRxRequest (phySlottedMode_t phyRxMode, phyRxParams_t *pRxParams) |
This function will start a RX sequence. | |
phyStatus_t | PhyPlmeCcaEdRequest (phyCCAType_t ccaParam, phyContCCAMode_t cccaMode) |
This function will start a CCA / CCCA sequence. | |
phyStatus_t | PhyPlmeSetCurrentChannelRequest (uint8_t channel, uint8_t pan) |
This function will set the channel number for the specified PAN. | |
uint8_t | PhyPlmeGetCurrentChannelRequest (uint8_t pan) |
This function will return the current channel for a specified PAN. | |
phyStatus_t | PhyPlmeSetPwrLevelRequest (uint8_t pwrStep) |
This function will set the radio Tx power. | |
phyStatus_t | PhyPlmeSetPwrState (uint8_t state) |
Change the XCVR power state. | |
phyStatus_t | PhyPlmeSetPIBRequest (phyPibId_t pibId, uint64_t pibValue, uint8_t phyRegistrySet, instanceId_t instanceId) |
This function will set the value of PHY PIBs. | |
phyStatus_t | PhyPlmeGetPIBRequest (phyPibId_t pibId, uint64_t *pibValue, uint8_t phyRegistrySet, instanceId_t instanceId) |
This function will return the value of PHY PIBs. | |
uint32_t | PhyTimeGetEventTimeout (void) |
Return the timeout value for the current sequence. | |
void | PhyTimeDisableEventTimeout (void) |
Disables the sequence timeout. | |
void | PhyTimeDisableEventTrigger (void) |
Disable the time trigger for a sequence. | |
void | PhyTimeSetWakeUpTime (uint32_t *pWakeUpTime) |
Set TMR4 timeout value. | |
void | PhyTimeInitEventTimer (uint32_t *pAbsTime) |
Initialize the Event Timer. | |
bool_t | PhyTimeIsWakeUpTimeExpired (void) |
Check if TMR4 IRQ occured, and aknowledge it. | |
void | PhyTimeDisableWaitTimeout (void) |
Disable the TMR1 timeout. | |
void | PHY_InstallIsr (void) |
This function installs the PHY ISR. | |
void | PHY_InterruptHandler (void) |
PHY ISR. | |
void | PhyIsrPassRxParams (volatile phyRxParams_t *pRxParam) |
Sets the location of the Rx parameters. | |
void | PhyIsrPassTaskParams (instanceId_t instanceId) |
Sets the current PHY instance waiting for an IRQ. | |
void | PhyIsrTimeoutCleanup (void) |
Clear and mask PHY IRQ, disable timeout, set sequence to Idle. | |
void | PhyIsrSeqCleanup (void) |
Clear and mask PHY IRQ, set sequence to Idle. | |
uint8_t | PhyGetLastRxLqiValue (void) |
This function returns the LQI for the las received packet. | |
uint8_t | PhyGetLastRxRssiValue (void) |
This function returns the RSSI for the las received packet. | |
void | PhyPlmeSetRxOnWhenIdle (bool_t state, instanceId_t instanceId) |
This function sets the state of the PhyRxOnWhenIdle PIB. | |
void | PhyPlmeSetFrameWaitTime (uint32_t time, instanceId_t instanceId) |
This function sets the value of the maxFrameWaitTime PIB. | |
uint8_t | Phy_GetEnergyLevel (uint8_t energyLeveldB) |
Scales energy level to 0-255. | |
void | Radio_Phy_PdDataConfirm (instanceId_t instanceId, bool_t framePending) |
This function signals the PHY task that a TX operation completed successfully. If the received ACK has FP=1, then the radio will enter RX state for maxFrameWaitTime duration. | |
void | Radio_Phy_TimeWaitTimeoutIndication (instanceId_t instanceId) |
This function signals the PHY task that timer1 compare match occured. | |
void | Radio_Phy_TimeRxTimeoutIndication (instanceId_t instanceId) |
This function signals the PHY task that the programmed sequence has timed out The Radio is forced to Idle. | |
void | Radio_Phy_PdDataIndication (instanceId_t instanceId) |
This function signals the PHY task that new data has been received. | |
void | Radio_Phy_TimeStartEventIndication (instanceId_t instanceId) |
This function signals the PHY task that the programmed sequence has started. | |
void | Radio_Phy_PlmeCcaConfirm (phyStatus_t phyChannelStatus, instanceId_t instanceId) |
This function signals the PHY task that a CCA sequence has finished. | |
void | Radio_Phy_PlmeEdConfirm (uint8_t energyLeveldB, instanceId_t instanceId) |
This function signals the PHY task that a ED sequence has finished. | |
void | Radio_Phy_PlmeSyncLossIndication (instanceId_t instanceId) |
This function signals the PHY task that a Sync Loss occured (PLL unlock) The Radio is forced to Idle. | |
void | Radio_Phy_PlmeRxSfdDetect (instanceId_t instanceId, uint32_t param) |
This function signals the PHY task that a SFD was detected. Also, if there is not enough time to receive the entire packet, the RX timeout will be extended. | |
void | Radio_Phy_PlmeFilterFailRx (instanceId_t instanceId) |
This function signals the PHY task that a Filter Fail occured. | |
void | Radio_Phy_UnexpectedTransceiverReset (instanceId_t instanceId) |
This function signals the PHY task that an unexpected Transceiver Reset occured and force the TRX to Off. | |
bool_t | PhyIsIdleRx (instanceId_t instanceId) |
This function starts the IdleRX if the PhyRxOnWhenIdle PIB is set. |
Detailed Description
Copyright (c) 2015, Freescale Semiconductor, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
o Neither the name of Freescale Semiconductor, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file Phy.h.
Function Documentation
uint8_t Phy_GetEnergyLevel | ( | uint8_t | energyLevel ) |
void PHY_InstallIsr | ( | void | ) |
void PHY_InterruptHandler | ( | void | ) |
void PhyAbort | ( | void | ) |
Aborts the current sequence and force the radio to IDLE.
*********************************************************************************
Definition at line 870 of file PhyPacketProcessor.c.
uint8_t PhyGetLastRxLqiValue | ( | void | ) |
uint8_t PhyGetLastRxRssiValue | ( | void | ) |
void PhyHwInit | ( | void | ) |
Initialize the 802.15.4 Radio registers.
*********************************************************************************
Definition at line 929 of file PhyPacketProcessor.c.
bool_t PhyIsIdleRx | ( | instanceId_t | instanceId ) |
This function starts the IdleRX if the PhyRxOnWhenIdle PIB is set.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY
Definition at line 624 of file PhyStateMachine.c.
void PhyIsrPassRxParams | ( | volatile phyRxParams_t * | pRxParam ) |
void PhyIsrPassTaskParams | ( | instanceId_t | instanceId ) |
void PhyIsrSeqCleanup | ( | void | ) |
void PhyIsrTimeoutCleanup | ( | void | ) |
phyStatus_t PhyPdDataRequest | ( | pdDataReq_t * | pTxPacket, |
volatile phyRxParams_t * | pRxParams, | ||
volatile phyTxParams_t * | pTxParams | ||
) |
This function will start a TX sequence. The packet will be sent OTA.
*********************************************************************************
- Parameters:
-
[in] pTxPacket pointer to the TX packet structure [in] pRxParams pointer to RX parameters [in] pTxParams pointer to TX parameters
- Returns:
- phyStatus_t
Definition at line 98 of file PhyPlmeData.c.
phyStatus_t PhyPlmeCcaEdRequest | ( | phyCCAType_t | ccaParam, |
phyContCCAMode_t | cccaMode | ||
) |
This function will start a CCA / CCCA sequence.
*********************************************************************************
- Parameters:
-
[in] ccaParam the type of CCA [in] cccaMode continuous or single CCA
- Returns:
- phyStatus_t
Definition at line 318 of file PhyPlmeData.c.
uint8_t PhyPlmeGetCurrentChannelRequest | ( | uint8_t | pan ) |
This function will return the current channel for a specified PAN.
*********************************************************************************
- Parameters:
-
[in] pan the PAN registers (0/1)
- Returns:
- uint8_t current channel number
Definition at line 434 of file PhyPlmeData.c.
phyStatus_t PhyPlmeGetPIBRequest | ( | phyPibId_t | pibId, |
uint64_t * | pibValue, | ||
uint8_t | phyRegistrySet, | ||
instanceId_t | instanceId | ||
) |
This function will return the value of PHY PIBs.
*********************************************************************************
- Parameters:
-
[in] pibId the Id of the PIB [out] pibValue pointer to a location where the value will be stored [in] phyRegistrySet the PAN registers (0/1) [in] instanceId the instance of the PHY
- Returns:
- phyStatus_t
Definition at line 596 of file PhyPlmeData.c.
phyStatus_t PhyPlmeRxRequest | ( | phySlottedMode_t | phyRxMode, |
phyRxParams_t * | pRxParams | ||
) |
This function will start a RX sequence.
*********************************************************************************
- Parameters:
-
[in] phyRxMode slotted/unslotted [in] pRxParams pointer to RX parameters
- Returns:
- phyStatus_t
Definition at line 235 of file PhyPlmeData.c.
phyStatus_t PhyPlmeSetCurrentChannelRequest | ( | uint8_t | channel, |
uint8_t | pan | ||
) |
This function will set the channel number for the specified PAN.
*********************************************************************************
- Parameters:
-
[in] channel new channel number [in] pan the PAN registers (0/1)
- Returns:
- phyStatus_t
Definition at line 397 of file PhyPlmeData.c.
void PhyPlmeSetFrameWaitTime | ( | uint32_t | time, |
instanceId_t | instanceId | ||
) |
This function sets the value of the maxFrameWaitTime PIB.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY [in] time The maxFrameWaitTime value
Definition at line 563 of file PhyStateMachine.c.
phyStatus_t PhyPlmeSetPIBRequest | ( | phyPibId_t | pibId, |
uint64_t | pibValue, | ||
uint8_t | phyRegistrySet, | ||
instanceId_t | instanceId | ||
) |
This function will set the value of PHY PIBs.
*********************************************************************************
- Parameters:
-
[in] pibId the Id of the PIB [in] pibValue the new value of the PIB [in] phyRegistrySet the PAN registers (0/1) [in] instanceId the instance of the PHY
- Returns:
- phyStatus_t
Definition at line 507 of file PhyPlmeData.c.
phyStatus_t PhyPlmeSetPwrLevelRequest | ( | uint8_t | pwrStep ) |
This function will set the radio Tx power.
*********************************************************************************
- Parameters:
-
[in] pwrStep the Tx power
- Returns:
- phyStatus_t
Definition at line 453 of file PhyPlmeData.c.
phyStatus_t PhyPlmeSetPwrState | ( | uint8_t | state ) |
Change the XCVR power state.
*********************************************************************************
- Parameters:
-
[in] state the new XCVR power state
- Returns:
- phyStatus_t
- Precondition:
- Before entering hibernate/reset states, the MCG clock source must be changed to use an input other than the one generated by the XCVR!
- Postcondition:
- When XCVR is in hibernate, indirect registers cannot be accessed in burst mode When XCVR is in reset, all registers are inaccessible!
- Remarks:
- Putting the XCVR into hibernate/reset will stop the generated clock signal!
Definition at line 1063 of file PhyPacketProcessor.c.
void PhyPlmeSetRxOnWhenIdle | ( | bool_t | state, |
instanceId_t | instanceId | ||
) |
This function sets the state of the PhyRxOnWhenIdle PIB.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY [in] state The PhyRxOnWhenIdle value
Definition at line 575 of file PhyStateMachine.c.
void PhyTimeDisableEventTimeout | ( | void | ) |
void PhyTimeDisableEventTrigger | ( | void | ) |
void PhyTimeDisableWaitTimeout | ( | void | ) |
uint32_t PhyTimeGetEventTimeout | ( | void | ) |
void PhyTimeInitEventTimer | ( | uint32_t * | pAbsTime ) |
bool_t PhyTimeIsWakeUpTimeExpired | ( | void | ) |
void PhyTimeSetWakeUpTime | ( | uint32_t * | pWakeUpTime ) |
void Radio_Phy_PdDataConfirm | ( | instanceId_t | instanceId, |
bool_t | framePending | ||
) |
This function signals the PHY task that a TX operation completed successfully. If the received ACK has FP=1, then the radio will enter RX state for maxFrameWaitTime duration.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY [in] framePending The value of the framePending bit for the received ACK
Definition at line 641 of file PhyStateMachine.c.
void Radio_Phy_PdDataIndication | ( | instanceId_t | instanceId ) |
This function signals the PHY task that new data has been received.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY
Definition at line 671 of file PhyStateMachine.c.
void Radio_Phy_PlmeCcaConfirm | ( | phyStatus_t | phyChannelStatus, |
instanceId_t | instanceId | ||
) |
This function signals the PHY task that a CCA sequence has finished.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY [in] phyChannelStatus The status of the channel: Idle/Busy
- Returns:
- None.
Definition at line 699 of file PhyStateMachine.c.
void Radio_Phy_PlmeEdConfirm | ( | uint8_t | energyLeveldB, |
instanceId_t | instanceId | ||
) |
This function signals the PHY task that a ED sequence has finished.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY [in] energyLevel The enetgy level on the channel. [in] energyLeveldB The energy level in DB
Definition at line 717 of file PhyStateMachine.c.
void Radio_Phy_PlmeFilterFailRx | ( | instanceId_t | instanceId ) |
This function signals the PHY task that a Filter Fail occured.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY
Definition at line 827 of file PhyStateMachine.c.
void Radio_Phy_PlmeRxSfdDetect | ( | instanceId_t | instanceId, |
uint32_t | frameLen | ||
) |
This function signals the PHY task that a SFD was detected. Also, if there is not enough time to receive the entire packet, the RX timeout will be extended.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY [in] frameLen the length of the PSDU
Definition at line 767 of file PhyStateMachine.c.
void Radio_Phy_PlmeSyncLossIndication | ( | instanceId_t | instanceId ) |
This function signals the PHY task that a Sync Loss occured (PLL unlock) The Radio is forced to Idle.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY
Definition at line 812 of file PhyStateMachine.c.
void Radio_Phy_TimeRxTimeoutIndication | ( | instanceId_t | instanceId ) |
This function signals the PHY task that the programmed sequence has timed out The Radio is forced to Idle.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY
Definition at line 734 of file PhyStateMachine.c.
void Radio_Phy_TimeStartEventIndication | ( | instanceId_t | instanceId ) |
This function signals the PHY task that the programmed sequence has started.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY
- Returns:
- None.
Definition at line 750 of file PhyStateMachine.c.
void Radio_Phy_TimeWaitTimeoutIndication | ( | instanceId_t | instanceId ) |
This function signals the PHY task that timer1 compare match occured.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY
Definition at line 685 of file PhyStateMachine.c.
void Radio_Phy_UnexpectedTransceiverReset | ( | instanceId_t | instanceId ) |
This function signals the PHY task that an unexpected Transceiver Reset occured and force the TRX to Off.
*********************************************************************************
- Parameters:
-
[in] instanceId The instance of the PHY
Definition at line 842 of file PhyStateMachine.c.
Generated on Fri Jul 15 2022 21:41:18 by
