nRF5 SDK v17.1.0
Macros | Typedefs | Enumerations
PHY Common API

Module to declare Common PHY API. More...

Macros

#define PHY_MAX_PACKET_SIZE   127
 The maximum PSDU size (in octets) the PHY shall be able to receive (aMaxPHYPacketSize). More...
 
#define PHY_MAX_HEADER_SIZE   1
 The maximum PHR size (in octets). More...
 
#define PHY_MAX_PPDU_SIZE   (PHY_MAX_HEADER_SIZE + PHY_MAX_PACKET_SIZE)
 Maximum PPDU size.
 
#define PHY_HEADER_POS   (-1)
 Position of PHY header related to income PPDU start pointer.
 
#define PHY_HEADER_SIZE   1
 Size of PHY header in bytes.
 
#define PHY_MAX_CHANNEL_NUM   0x1Au
 Maximum channel number.
 
#define PHY_MIN_CHANNEL_NUM   0x0Bu
 Minimum channel number.
 
#define aMaxPHYPacketSize   PHY_MAX_PACKET_SIZE
 
#define aTurnaroundTime   12
 
#define aTurnaroundTimeUs   192
 
#define PHY_CURRENT_PAGE   0x0u
 
#define PHY_CHANNEL_SUPPORTED   0x07FFF800ul
 
#define PHY_SHR_DURATION   10u
 
#define PHY_MAX_FRAME_DURATION   (PHY_SHR_DURATION + (int)((aMaxPHYPacketSize + 1) * PHY_SYMBOLS_PER_OCTET))
 
#define PHY_SYMBOLS_PER_OCTET   2u
 
#define PHY_TRX_CCA_MODE0   0
 
#define PHY_TRX_CCA_MODE1   1
 
#define PHY_TRX_CCA_MODE2   2
 
#define PHY_TRX_CCA_MODE3   3
 
#define PHY_MIN_TX_POWER   0x20
 Minimum value that can be used to set radio transmit power. Equals to -32 dBm. More...
 
#define PHY_TRANSMIT_POWER_SIGN_BIT_POS   5
 Internal parameter of the PHY layer. More...
 
#define PHY_TRANSMIT_POWER_MASK   0xC0
 Internal parameter of the PHY layer. More...
 
#define PHY_TRANSMIT_POWER_MASK_INV   0x3F
 Internal parameter of the PHY layer. More...
 
#define DBM_11   ( 11 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_10   ( 10 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_9   ( 9 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_8   ( 8 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_7   ( 7 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_6   ( 6 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_5   ( 5 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_4   ( 4 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_3   ( 3 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_2   ( 2 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_1   ( 1 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_0   ( 0 & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_1   (( -1) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_2   (( -2) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_3   (( -3) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_4   (( -4) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_5   (( -5) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_6   (( -6) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_7   (( -7) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_8   (( -8) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_9   (( -9) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_10   ((-10) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_11   ((-11) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_12   ((-12) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_13   ((-13) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_14   ((-14) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_15   ((-15) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_16   ((-16) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_17   ((-17) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_18   ((-18) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_19   ((-19) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_20   ((-20) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_21   ((-21) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_22   ((-22) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_23   ((-23) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_24   ((-24) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_25   ((-25) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_26   ((-26) & PHY_TRANSMIT_POWER_MASK_INV)
 
#define DBM_MIN_27   ((-27) & PHY_TRANSMIT_POWER_MASK_INV)
 

Typedefs

typedef phy_enum_t phy_status_t
 PHY status type.
 

Enumerations

enum  phy_enum_t {
  PHY_BUSY = 0x00,
  PHY_BUSY_RX = 0x01,
  PHY_BUSY_TX = 0x02,
  PHY_FORCE_TRX_OFF = 0x03,
  PHY_IDLE = 0x04,
  PHY_INVALID_PARAMETER = 0x05,
  PHY_RX_ON = 0x06,
  PHY_SUCCESS = 0x07,
  PHY_TRX_OFF = 0x08,
  PHY_TX_ON = 0x09,
  PHY_UNSUPPORTED_ATTRIBUTE = 0x0A,
  PHY_READ_ONLY = 0x0B,
  PHY_FORCE_TX_ON = 0xFC,
  PHY_CHANNEL_ACCESS_FAILURE = 0xFD,
  PHY_NO_ACK = 0xFE,
  PHY_IS_NOT_AVAILABLE = 0xFF
}
 Common PHY enumerations description used in various PHY primitives. More...
 

Detailed Description

Module to declare Common PHY API.

The Common PHY module contains declarations of commonly used PHY routines and necessary macros/types.

Macro Definition Documentation

#define PHY_MAX_HEADER_SIZE   1

The maximum PHR size (in octets).

See 6.3 PPDU format.

#define PHY_MAX_PACKET_SIZE   127

The maximum PSDU size (in octets) the PHY shall be able to receive (aMaxPHYPacketSize).

See Table 22 - PHY constants.

#define PHY_MIN_TX_POWER   0x20

Minimum value that can be used to set radio transmit power. Equals to -32 dBm.

This is a combination of digits which includes: 2 MSBs represent the tolerance on the transmit power 6 LSBs which may be written to, represent a signed integer in twos-complement format, corresponding to the nominal transmit power of the device in decibels relative to 1 mW. All combinations less than 0xBF are valid.

#define PHY_TRANSMIT_POWER_MASK   0xC0

Internal parameter of the PHY layer.

This mask hides transmit power from transmit power attribute value, but leaves precision bitfield.

#define PHY_TRANSMIT_POWER_MASK_INV   0x3F

Internal parameter of the PHY layer.

This mask hides precision bitfield from transmit power attribute value, leaving transmit power unchanged.

#define PHY_TRANSMIT_POWER_SIGN_BIT_POS   5

Internal parameter of the PHY layer.

Position of the sign bit inside transmit power attribute.

Enumeration Type Documentation

enum phy_enum_t

Common PHY enumerations description used in various PHY primitives.

See Table 18-PHY enumerations description for detailed info on the statuses up to PHY_READ_ONLY. The statuses with higher numbers are implementation specific and used for synchronous API only.

Enumerator
PHY_BUSY 

The CCA attempt has detected a busy channel.

PHY_BUSY_RX 

The transceiver is asked to change its state while receiving.

PHY_BUSY_TX 

The transceiver is asked to change its state while transmitting.

PHY_FORCE_TRX_OFF 

The transceiver is to be switched off immediately.

PHY_IDLE 

The CCA attempt has detected an idle channel.

PHY_INVALID_PARAMETER 

A SET/GET request was issued with a parameter in the primitive that is out of the valid range.

PHY_RX_ON 

The transceiver is in or is to be configured into the receiver enabled state.

PHY_SUCCESS 

A SET/GET, an ED operation, or a transceiver state change was successful.

PHY_TRX_OFF 

The transceiver is in or is to be configured into the transceiver disabled state.

PHY_TX_ON 

The transceiver is in or is to be configured into the transmitter enabled state.

PHY_UNSUPPORTED_ATTRIBUTE 

A SET/GET request was issued with the identifier of an attribute that is not supported.

PHY_READ_ONLY 

A SET/GET request was issued with the identifier of an attribute that is read-only.

PHY_FORCE_TX_ON 

Transceiver is forced to change it's state to PHY_TX_ON (potential packet drop).

PHY_CHANNEL_ACCESS_FAILURE 

Data cannot be sent due to failed CCA results.

PHY_NO_ACK 

Data had been sent but ACK frame hasn't been received.

PHY_IS_NOT_AVAILABLE 

PHY is not available for synchronous access


Documentation feedback | Developer Zone | Subscribe | Updated