Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Enumerations | Functions
pal_bb_154.h File Reference

IEEE 802.15.4 MAC Baseband driver interface file. More...

#include "pal_types.h"

Go to the source code of this file.

Data Structures

struct  PalBb154Chan_t
 802.15.4 channelization parameters. More...
 
struct  PalBb154OpParam_t
 Operation parameters. More...
 
struct  PalBb154TxBufDesc
 Transmit buffer descriptor. More...
 
struct  PalBb154DrvStats_t
 Baseband driver statistics. More...
 
struct  PalBb154DrvPib_tag
 MAC PIB for driver. More...
 

Macros

#define PAL_BB_154_MIN_RX_BUF_CNT   2
 Minimum number of receive buffers. More...
 
#define PAL_BB_154_RX_BUF_CNT   2
 
#define PAL_BB_154_FLAG_TX_RX_AUTO_ACK   (PAL_BB_154_FLAG_TX_AUTO_RX_ACK | PAL_BB_154_FLAG_RX_AUTO_TX_ACK)
 PAL_BB_154_FLAG_TX_RX_AUTO_ACK. More...
 
#define PAL_BB_154_SYMB_TO_US(x)    ((x) * 16)
 
#define PAL_BB_154_SYMB_TO_MS(x)    (((x) * 16) / 1000)
 
#define PAL_BB_154_US_TO_SYMB(x)    ((x) / 16)
 
#define PAL_BB_154_TPT_TO_MS(x)    (((x) * 15723) >> 10)
 
#define PAL_BB_154_ED_THRESHOLD   -75
 Energy detect threshold in dBm. More...
 
#define PAL_BB_154_FRAME_CONTROL_LEN   2
 Size of frame control in octets. More...
 
#define PAL_BB_154_FCS_LEN   2
 Size of FCS in octets. More...
 
#define PAL_BB_154_FCS_INIT_VALUE   0x0000
 FCS initialization value. More...
 
#define PAL_BB_154_FC_FRAME_TYPE_SHIFT   0
 Frame control bits and fields. More...
 
#define PAL_BB_154_FC_FRAME_TYPE_MASK   0x0007
 
#define PAL_BB_154_FC_FRAME_TYPE_CD_MASK   0x0001
 
#define PAL_BB_154_FC_FRAME_TYPE_CMD_MASK   0x0003
 
#define PAL_BB_154_FC_FRAME_TYPE(x)    (((x) & PAL_BB_154_FC_FRAME_TYPE_MASK)/*>> PAL_BB_154_FC_FRAME_TYPE_SHIFT*/)
 
#define PAL_BB_154_FC_LEGACY_SEC_TEST(x)    (((x) & (PAL_BB_154_FC_SECURITY_ENABLED_MASK | PAL_BB_154_FC_FRAME_VERSION_MASK)) == PAL_BB_154_FC_SECURITY_ENABLED_MASK)
 Mask for checking legacy security. More...
 
#define PAL_BB_154_FC_FRAME_TYPE_FP_TEST   (PAL_BB_154_FC_ACK_REQUEST_MASK | PAL_BB_154_FC_FRAME_TYPE_CMD_MASK)
 Mask for checking frame pending processing based on ack. requested and being a MAC command frame. More...
 
#define PAL_BB_154_FC_FRAME_TYPE_ACK_TEST   (PAL_BB_154_FC_ACK_REQUEST_MASK | PAL_BB_154_FC_FRAME_TYPE_CD_MASK)
 Mask for checking ack. sending based on ack. requested and being a MAC command or data frame. More...
 
#define PAL_BB_154_SCAN_MAX_PD_ENTRIES   16
 
#define PAL_BB_154_SCAN_MAX_ED_ENTRIES   16
 
#define PAL_BB_154_SYMBOL_DURATION   16
 Symbol duration in microseconds (2450 MHz O-QPSK). More...
 
#define PAL_BB_154_ED_DURATION   8
 ED duration in symbols (802.15.4-2006 6.9.7). More...
 
#define PAL_BB_154_SYMBOLS_PER_OCTET   2
 The number of symbols per octets for the current PHY (2450 MHz O-QPSK). More...
 
#define PAL_BB_154_PREAMBLE_FIELD_LENGTH   8
 Preamble field length in symbols (2450 MHz O-QPSK). More...
 
#define PAL_BB_154_SFD_FIELD_LENGTH   2
 SFD field length in symbols (2450 MHz O-QPSK). More...
 
#define PAL_BB_154_aMaxPHYPacketSize   127
 The maximum PSDU size (in octets) the PHY shall be able to receive. More...
 
#define PAL_BB_154_aTurnaroundTime   12
 RX-to-TX or TX-to-RX maximum turnaround time (in symbol periods). More...
 
#define PAL_BB_154_phySHRDuration   10
 SHR duration for 802.15.4-2006. (2.4GHz PHY) More...
 
#define PAL_BB_154_phySymbolsPerOctet   2
 Symbols per octet for 802.15.4-2006. (2.4GHz PHY) More...
 
#define PAL_BB_154_aBaseSlotDuration   60
 The number of symbols forming a superframe slot when the superframe order is equal to 0. More...
 
#define PAL_BB_154_aBaseSuperframeDuration   (PAL_BB_154_aBaseSlotDuration * PAL_BB_154_aNumSuperframeSlots)
 The number of symbols forming a superframe when the superframe order is equal to 0. More...
 
#define PAL_BB_154_aGTSDescPersistenceTime   4
 The number of superframes in which a GTS descriptor exists in the beacon frame of the PAN coordinator. More...
 
#define PAL_BB_154_aMaxBeaconOverhead   75
 The maximum number of octets added by the MAC sublayer to the MAC payload of a beacon frame. More...
 
#define PAL_BB_154_aMaxBeaconPayloadLength   (PAL_BB_154_aMaxPHYPacketSize - PAL_BB_154_aMaxBeaconOverhead)
 The maximum beacon payload length. More...
 
#define PAL_BB_154_aMaxLostBeacons   4
 The number of consecutive lost beacons that will cause the MAC sublayer of a receiving device to declare a loss of synchronization. More...
 
#define PAL_BB_154_aMaxMPDUUnsecuredOverhead   25
 The maximum number of octets added by the MAC sublayer to the PSDU without security. More...
 
#define PAL_BB_154_aMaxSIFSFrameSize   18
 The maximum size of an MPDU, in octets, that can be followed by a SIFS period. More...
 
#define PAL_BB_154_aMinCAPLength   440
 The minimum number of symbols forming the CAP. This ensures that MAC commands can still be transferred to devices when GTSs are being used. An exception to this minimum shall be allowed for the accommodation of the temporary increase in the beacon frame length needed to perform GTS maintenance. More...
 
#define PAL_BB_154_aMinMPDUOverhead   9
 The minimum number of octets added by the MAC sublayer to the PSDU. More...
 
#define PAL_BB_154_aNumSuperframeSlots   16
 The number of slots contained in any superframe. More...
 
#define PAL_BB_154_aUnitBackoffPeriod   20
 The number of symbols forming the basic time period used by the CSMA-CA algorithm. More...
 
#define PAL_BB_154_TX_FRAME_PTR(x)    ((uint8_t *)(((PalBb154TxBufDesc_t *)(x))+1))
 PAL_BB_154_TX_FRAME_PTR. More...
 

Typedefs

typedef void(* PalBb154TxIsr_t) (uint8_t flags)
 Transmit complete ISR callback signature. More...
 
typedef uint8_t(* PalBb154FPIsr_t) (uint8_t srcAddrMode, uint64_t srcAddr)
 Frame pending check callback. More...
 
typedef uint8_t(* PalBb154RxIsr_t) (uint8_t *pBuf, uint16_t len, int8_t rssi, uint32_t timestamp, uint8_t flags)
 Receive complete ISR callback signature. More...
 
typedef void(* PalBb154EdIsr_t) (int8_t rssi)
 CCA or energy detect complete ISR callback signature. More...
 
typedef void(* PalBb154Err_t) (uint8_t status)
 Driver error callback signature. More...
 
typedef void *(* PalBb154Alloc_t) (uint16_t len)
 Buffer free callback signature. More...
 
typedef void(* PalBb154Free_t) (void *pBuf)
 Buffer free callback signature. More...
 
typedef struct PalBb154TxBufDesc PalBb154TxBufDesc_t
 Transmit buffer descriptor. More...
 
typedef struct PalBb154DrvPib_tag PalBb154DrvPib_t
 MAC PIB for driver. More...
 

Enumerations

Functions

void PalBb154Init (void)
 Initialize the 802.15.4 baseband driver. More...
 
void PalBb154Register (PalBb154Alloc_t allocCback, PalBb154Free_t freeCback)
 Register callbacks for the 802.15.4 baseband driver. More...
 
void PalBb154Enable (void)
 Enable the BB hardware. More...
 
void PalBb154Disable (void)
 Disable the BB hardware. More...
 
void PalBb154SetChannelParam (const PalBb154Chan_t *pParam)
 Set channelization parameters. More...
 
void PalBb154ResetChannelParam (void)
 Reset channelization parameters. More...
 
void PalBb154SetOpParams (const PalBb154OpParam_t *pOpParam)
 Set the operation parameters. More...
 
PalBb154DrvPib_tPalBb154GetDrvPIB (void)
 Get Driver PIB. More...
 
void PalBb154FlushPIB (void)
 Flushes PIB attributes to hardware. More...
 
void PalBb154ClearRxBufs (void)
 Clear all received buffers (active and queued). More...
 
uint8_t PalBb154ReclaimRxFrame (uint8_t *pRxFrame)
 Reclaim the buffer associated with the received frame. More...
 
void PalBb154BuildRxBufQueue (uint8_t num)
 Build receive buffer queue. More...
 
uint8_t * PalBb154GetPayloadPtr (uint8_t *pFrame, uint16_t fctl)
 Get payload pointer. More...
 
void PalBb154Tx (PalBb154TxBufDesc_t *pDesc, uint8_t cnt, uint32_t due, uint8_t now)
 Transmit a packet. More...
 
void PalBb154Rx (uint32_t due, uint8_t now, uint32_t timeout)
 Receive a packet. More...
 
void PalBb154Ed (uint32_t due, uint8_t now)
 Perform energy detect. More...
 
uint8_t PalBb154Off (void)
 Cancel any pending operation. More...
 
uint8_t PalBb154RssiToLqi (int8_t rssi)
 Convert RSSI to LQI. More...
 
void PalBb154GetLastRssi (uint8_t *pBuf)
 Return the last received RSSI. More...
 
void PalBb154ContinuousTx (uint8_t rfChan, uint8_t modulation, uint8_t txPhy, int8_t power)
 Enter Continuous Transmit mode. More...
 
void PalBb154ContinuousRx (uint8_t rfChan, uint8_t rxPhy)
 Enter Continuous Receive mode. More...
 
void PalBb154ContinuousStop (void)
 Stop Continous Transmit or Receive mode. More...
 
void PalBb154DrvGetStats (PalBb154DrvStats_t *pStats)
 Get baseband driver statistics. More...
 

Detailed Description

IEEE 802.15.4 MAC Baseband driver interface file.

Copyright (c) 2016-2019 Arm Ltd. All Rights Reserved.

Copyright (c) 2019-2020 Packetcraft, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file pal_bb_154.h.

Macro Definition Documentation

#define PAL_BB_154_aBaseSlotDuration   60

The number of symbols forming a superframe slot when the superframe order is equal to 0.

Definition at line 259 of file pal_bb_154.h.

#define PAL_BB_154_aBaseSuperframeDuration   (PAL_BB_154_aBaseSlotDuration * PAL_BB_154_aNumSuperframeSlots)

The number of symbols forming a superframe when the superframe order is equal to 0.

Definition at line 262 of file pal_bb_154.h.

#define PAL_BB_154_aGTSDescPersistenceTime   4

The number of superframes in which a GTS descriptor exists in the beacon frame of the PAN coordinator.

Definition at line 268 of file pal_bb_154.h.

#define PAL_BB_154_aMaxBeaconOverhead   75

The maximum number of octets added by the MAC sublayer to the MAC payload of a beacon frame.

Definition at line 271 of file pal_bb_154.h.

#define PAL_BB_154_aMaxBeaconPayloadLength   (PAL_BB_154_aMaxPHYPacketSize - PAL_BB_154_aMaxBeaconOverhead)

The maximum beacon payload length.

Definition at line 274 of file pal_bb_154.h.

#define PAL_BB_154_aMaxLostBeacons   4

The number of consecutive lost beacons that will cause the MAC sublayer of a receiving device to declare a loss of synchronization.

Definition at line 278 of file pal_bb_154.h.

#define PAL_BB_154_aMaxMPDUUnsecuredOverhead   25

The maximum number of octets added by the MAC sublayer to the PSDU without security.

Definition at line 281 of file pal_bb_154.h.

#define PAL_BB_154_aMaxPHYPacketSize   127

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

Definition at line 242 of file pal_bb_154.h.

#define PAL_BB_154_aMaxSIFSFrameSize   18

The maximum size of an MPDU, in octets, that can be followed by a SIFS period.

Definition at line 284 of file pal_bb_154.h.

#define PAL_BB_154_aMinCAPLength   440

The minimum number of symbols forming the CAP. This ensures that MAC commands can still be transferred to devices when GTSs are being used. An exception to this minimum shall be allowed for the accommodation of the temporary increase in the beacon frame length needed to perform GTS maintenance.

Definition at line 291 of file pal_bb_154.h.

#define PAL_BB_154_aMinMPDUOverhead   9

The minimum number of octets added by the MAC sublayer to the PSDU.

Definition at line 294 of file pal_bb_154.h.

#define PAL_BB_154_aNumSuperframeSlots   16

The number of slots contained in any superframe.

Definition at line 297 of file pal_bb_154.h.

#define PAL_BB_154_aTurnaroundTime   12

RX-to-TX or TX-to-RX maximum turnaround time (in symbol periods).

Definition at line 245 of file pal_bb_154.h.

#define PAL_BB_154_aUnitBackoffPeriod   20

The number of symbols forming the basic time period used by the CSMA-CA algorithm.

Definition at line 300 of file pal_bb_154.h.

#define PAL_BB_154_ED_DURATION   8

ED duration in symbols (802.15.4-2006 6.9.7).

Definition at line 220 of file pal_bb_154.h.

#define PAL_BB_154_ED_THRESHOLD   -75

Energy detect threshold in dBm.

10 dBm above 802.15.4 specified -85 dBm

Definition at line 149 of file pal_bb_154.h.

#define PAL_BB_154_FC_FRAME_TYPE (   x)    (((x) & PAL_BB_154_FC_FRAME_TYPE_MASK)/*>> PAL_BB_154_FC_FRAME_TYPE_SHIFT*/)

Optimized bit 0.

Definition at line 170 of file pal_bb_154.h.

#define PAL_BB_154_FC_FRAME_TYPE_ACK_TEST   (PAL_BB_154_FC_ACK_REQUEST_MASK | PAL_BB_154_FC_FRAME_TYPE_CD_MASK)

Mask for checking ack. sending based on ack. requested and being a MAC command or data frame.

Definition at line 207 of file pal_bb_154.h.

#define PAL_BB_154_FC_FRAME_TYPE_CD_MASK   0x0001

Convenient way of checking if MAC command or data.

Definition at line 168 of file pal_bb_154.h.

#define PAL_BB_154_FC_FRAME_TYPE_CMD_MASK   0x0003

Convenient way of checking if MAC command.

Definition at line 169 of file pal_bb_154.h.

#define PAL_BB_154_FC_FRAME_TYPE_FP_TEST   (PAL_BB_154_FC_ACK_REQUEST_MASK | PAL_BB_154_FC_FRAME_TYPE_CMD_MASK)

Mask for checking frame pending processing based on ack. requested and being a MAC command frame.

Definition at line 204 of file pal_bb_154.h.

#define PAL_BB_154_FC_FRAME_TYPE_MASK   0x0007

Bitmask.

Definition at line 167 of file pal_bb_154.h.

#define PAL_BB_154_FC_FRAME_TYPE_SHIFT   0

Frame control bits and fields.

Definition at line 166 of file pal_bb_154.h.

#define PAL_BB_154_FC_LEGACY_SEC_TEST (   x)    (((x) & (PAL_BB_154_FC_SECURITY_ENABLED_MASK | PAL_BB_154_FC_FRAME_VERSION_MASK)) == PAL_BB_154_FC_SECURITY_ENABLED_MASK)

Mask for checking legacy security.

Definition at line 201 of file pal_bb_154.h.

#define PAL_BB_154_FCS_INIT_VALUE   0x0000

FCS initialization value.

Definition at line 163 of file pal_bb_154.h.

#define PAL_BB_154_FCS_LEN   2

Size of FCS in octets.

Definition at line 160 of file pal_bb_154.h.

#define PAL_BB_154_FLAG_TX_RX_AUTO_ACK   (PAL_BB_154_FLAG_TX_AUTO_RX_ACK | PAL_BB_154_FLAG_RX_AUTO_TX_ACK)

PAL_BB_154_FLAG_TX_RX_AUTO_ACK.

Definition at line 138 of file pal_bb_154.h.

#define PAL_BB_154_FRAME_CONTROL_LEN   2

Size of frame control in octets.

Definition at line 157 of file pal_bb_154.h.

#define PAL_BB_154_MIN_RX_BUF_CNT   2

Minimum number of receive buffers.

PAL_BB_154_MIN_RX_BUF_CNT.

Definition at line 39 of file pal_bb_154.h.

#define PAL_BB_154_phySHRDuration   10

SHR duration for 802.15.4-2006. (2.4GHz PHY)

Definition at line 253 of file pal_bb_154.h.

#define PAL_BB_154_phySymbolsPerOctet   2

Symbols per octet for 802.15.4-2006. (2.4GHz PHY)

Definition at line 256 of file pal_bb_154.h.

#define PAL_BB_154_PREAMBLE_FIELD_LENGTH   8

Preamble field length in symbols (2450 MHz O-QPSK).

Definition at line 231 of file pal_bb_154.h.

#define PAL_BB_154_RX_BUF_CNT   2

PAL_BB_154_RX_BUF_CNT.

Definition at line 40 of file pal_bb_154.h.

#define PAL_BB_154_SCAN_MAX_ED_ENTRIES   16

Note - can't have more than 16 for 2.4GHz.

Definition at line 210 of file pal_bb_154.h.

#define PAL_BB_154_SCAN_MAX_PD_ENTRIES   16

Note - arbitrary number and could make it easy by sending all beacons using beacon notify indication.

Definition at line 209 of file pal_bb_154.h.

#define PAL_BB_154_SFD_FIELD_LENGTH   2

SFD field length in symbols (2450 MHz O-QPSK).

Definition at line 234 of file pal_bb_154.h.

#define PAL_BB_154_SYMB_TO_MS (   x)    (((x) * 16) / 1000)

PAL_BB_154_SYMB_TO_MS.

Definition at line 142 of file pal_bb_154.h.

#define PAL_BB_154_SYMB_TO_US (   x)    ((x) * 16)

PAL_BB_154_SYMB_TO_US.

Definition at line 141 of file pal_bb_154.h.

#define PAL_BB_154_SYMBOL_DURATION   16

Symbol duration in microseconds (2450 MHz O-QPSK).

Definition at line 217 of file pal_bb_154.h.

#define PAL_BB_154_SYMBOLS_PER_OCTET   2

The number of symbols per octets for the current PHY (2450 MHz O-QPSK).

Definition at line 223 of file pal_bb_154.h.

#define PAL_BB_154_TPT_TO_MS (   x)    (((x) * 15723) >> 10)

15723/1024 approximates to 15.36

Definition at line 146 of file pal_bb_154.h.

#define PAL_BB_154_TX_FRAME_PTR (   x)    ((uint8_t *)(((PalBb154TxBufDesc_t *)(x))+1))

PAL_BB_154_TX_FRAME_PTR.

Definition at line 359 of file pal_bb_154.h.

#define PAL_BB_154_US_TO_SYMB (   x)    ((x) / 16)

PAL_BB_154_US_TO_SYMB.

Definition at line 143 of file pal_bb_154.h.

Typedef Documentation

typedef void*(* PalBb154Alloc_t) (uint16_t len)

Buffer free callback signature.

Definition at line 334 of file pal_bb_154.h.

MAC PIB for driver.

typedef void(* PalBb154EdIsr_t) (int8_t rssi)

CCA or energy detect complete ISR callback signature.

Definition at line 328 of file pal_bb_154.h.

typedef void(* PalBb154Err_t) (uint8_t status)

Driver error callback signature.

Definition at line 331 of file pal_bb_154.h.

typedef uint8_t(* PalBb154FPIsr_t) (uint8_t srcAddrMode, uint64_t srcAddr)

Frame pending check callback.

Definition at line 322 of file pal_bb_154.h.

typedef void(* PalBb154Free_t) (void *pBuf)

Buffer free callback signature.

Definition at line 337 of file pal_bb_154.h.

typedef uint8_t(* PalBb154RxIsr_t) (uint8_t *pBuf, uint16_t len, int8_t rssi, uint32_t timestamp, uint8_t flags)

Receive complete ISR callback signature.

Definition at line 325 of file pal_bb_154.h.

Transmit buffer descriptor.

typedef void(* PalBb154TxIsr_t) (uint8_t flags)

Transmit complete ISR callback signature.

Definition at line 319 of file pal_bb_154.h.

Enumeration Type Documentation

anonymous enum

Driver status flags.

Enumerator
PAL_BB_154_FLAG_RX_ACK_CMPL 

Rx ack. completed.

PAL_BB_154_FLAG_TX_ACK_CMPL 

Tx ack. completed.

PAL_BB_154_FLAG_RX_ACK_START 

Rx ack. started.

PAL_BB_154_FLAG_TX_ACK_START 

Tx ack. started.

Definition at line 43 of file pal_bb_154.h.

anonymous enum

Operation flags.

Enumerator
PAL_BB_154_FLAG_TX_AUTO_RX_ACK 

Automatically wait for ACK after transmit completes.

PAL_BB_154_FLAG_RX_AUTO_TX_ACK 

Automatically send ACK after receive completes.

PAL_BB_154_FLAG_RX_WHILE_ED 

Receive any packet detected while performing ED.

PAL_BB_154_FLAG_DIS_CCA 

Disable CCA before transmit.

PAL_BB_154_FLAG_RAW 

Treat as raw frame

Definition at line 52 of file pal_bb_154.h.

anonymous enum

Receive flags.

Enumerator
PAL_BB_154_RX_FLAG_GO_IDLE 

Can go idle.

PAL_BB_154_RX_FLAG_SET_ACK_FP 

Set frame pending in ack.

Definition at line 62 of file pal_bb_154.h.

Addressing mode.

Definition at line 74 of file pal_bb_154.h.

Values of MAC command type.

Definition at line 105 of file pal_bb_154.h.

MAC device type (vendor specific).

Enumerator
PAL_BB_154_DEV_TYPE_DEVICE 

Device is not a coordinator

PAL_BB_154_DEV_TYPE_COORD 

Device is a coordinator but not a PAN coordinator

PAL_BB_154_DEV_TYPE_PAN_COORD 

Device is a PAN coordinator

Definition at line 119 of file pal_bb_154.h.

Values of frame type in FC.

Definition at line 87 of file pal_bb_154.h.

Function Documentation

void PalBb154BuildRxBufQueue ( uint8_t  num)

Build receive buffer queue.

Parameters
lenLength of each receive buffer.
numNumber of buffers to load into the queue.
void PalBb154ClearRxBufs ( void  )

Clear all received buffers (active and queued).

Calling this routine will clear and free the active receive buffer (if any) and all queued receive buffers. This should only be called when the operation is terminating.

void PalBb154ContinuousRx ( uint8_t  rfChan,
uint8_t  rxPhy 
)

Enter Continuous Receive mode.

Parameters
rfChanPhysical channel number
rxPhyPHY type
void PalBb154ContinuousStop ( void  )

Stop Continous Transmit or Receive mode.

void PalBb154ContinuousTx ( uint8_t  rfChan,
uint8_t  modulation,
uint8_t  txPhy,
int8_t  power 
)

Enter Continuous Transmit mode.

Parameters
rfChanPhysical channel number
modulationModulation type (0 disables)
txPhyPHY type
powerPransmit power (dBm)
void PalBb154Disable ( void  )

Disable the BB hardware.

This routine signals the BB hardware to go into low power (disable power and clocks). This routine is called after all 802.15.4 operations are disabled.

void PalBb154DrvGetStats ( PalBb154DrvStats_t pStats)

Get baseband driver statistics.

Parameters
pStatsStorage for statistics.
void PalBb154Ed ( uint32_t  due,
uint8_t  now 
)

Perform energy detect.

Parameters
dueDue time for energy detect (if now is FALSE).
nowTRUE if energy detect should occur minimal delay.

Perform energy detect and return energy level to assess channel status.

void PalBb154Enable ( void  )

Enable the BB hardware.

This routine brings the BB hardware out of low power (enable power and clocks). This routine is called just before a 802.15.4 BOD is executed.

void PalBb154FlushPIB ( void  )

Flushes PIB attributes to hardware.

Calling this routine will flush all PIB attributes that have a hardware counterpart to the respective registers in hardware.

PalBb154DrvPib_t* PalBb154GetDrvPIB ( void  )

Get Driver PIB.

Returns
Driver PIB pointer.

Calling this routine retun a pointer to the driver PIB.

void PalBb154GetLastRssi ( uint8_t *  pBuf)

Return the last received RSSI.

Parameters
pBufStorage for results – first element is integer dBm, second is fractional
uint8_t* PalBb154GetPayloadPtr ( uint8_t *  pFrame,
uint16_t  fctl 
)

Get payload pointer.

Parameters
pFrameFrame buffer pointing to first octet of frame
fctlFrame control field
Returns
Pointer to frame payload or NULL if illegal addr mode combo.

Obtains the source and destination addresses from the frame. If either parameter is NULL, simply skips past the fields

void PalBb154Init ( void  )

Initialize the 802.15.4 baseband driver.

One-time initialization of baseband resources. This routine can be used to setup software driver resources, load RF trim parameters and execute RF calibrations.

This routine should block until the BB hardware is completely initialized.

uint8_t PalBb154Off ( void  )

Cancel any pending operation.

Returns
TRUE if pending operation could be cancelled.

Cancel any pending operation.

uint8_t PalBb154ReclaimRxFrame ( uint8_t *  pRxFrame)

Reclaim the buffer associated with the received frame.

Parameters
pRxFramePointer to the received frame.
Returns
Total number of receive buffers queued.

Calling this routine will put the buffer associated with the received frame back onto the receive queue. Note the actual buffer pointer may not be the same as the frame pointer dependent on driver implementation. If the queue is empty when the driver expects to transition to the receive state, the driver will instead move into the off state.

void PalBb154Register ( PalBb154Alloc_t  allocCback,
PalBb154Free_t  freeCback 
)

Register callbacks for the 802.15.4 baseband driver.

void PalBb154ResetChannelParam ( void  )

Reset channelization parameters.

Calling this routine will reset (clear) the channelization parameters.

uint8_t PalBb154RssiToLqi ( int8_t  rssi)

Convert RSSI to LQI.

Returns
LQI value.

Converts RSSI value into equivalent LQI value from 0 to 0xFF.

void PalBb154Rx ( uint32_t  due,
uint8_t  now,
uint32_t  timeout 
)

Receive a packet.

Parameters
dueDue time for receive (if now is FALSE).
nowTRUE if packet should be received with minimal delay.
timeoutTimeout.
void PalBb154SetChannelParam ( const PalBb154Chan_t pParam)

Set channelization parameters.

Parameters
pParamChannelization parameters.

Calling this routine will set parameters for all future transmit, receive, and energy detect operations until this routine is called again providing new parameters.

Note
pParam is not guaranteed to be static and is only valid in the context of the call to this routine. Therefore parameters requiring persistence should be copied.
void PalBb154SetOpParams ( const PalBb154OpParam_t pOpParam)

Set the operation parameters.

Parameters
pOpParamOperations parameters.

Calling this routine will set parameters for all future transmit, receive, ED, and CCA operations until this routine is called again providing new parameters.

Note
pOpParam is not guaranteed to be static and is only valid in the context of the call to this routine. Therefore parameters requiring persistence should be copied.
void PalBb154Tx ( PalBb154TxBufDesc_t pDesc,
uint8_t  cnt,
uint32_t  due,
uint8_t  now 
)

Transmit a packet.

Parameters
pDescChain of transmit buffer descriptors.
cntNumber of descriptors.
dueDue time for transmit (if now is FALSE).
nowTRUE if packet should be transmitted with minimal delay.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.