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

Baseband interface file. More...

#include "pal_types.h"

Go to the source code of this file.

Data Structures

struct  PalBbCfg_t
 BB configuration. More...
 

Macros

#define BB_CLK_RATE_HZ   1000000
 BB clock rate in hertz. More...
 
#define BB_MATH_DIV_10E6(n)    ((uint32_t)(((uint64_t)(n) * UINT64_C(4295)) >> 32))
 Binary divide with 1,000,000 divisor (n[max]=0xFFFFFFFF). More...
 
#define BB_US_TO_BB_TICKS(us)    (us)
 Return microseconds (no conversion required). More...
 
#define BB_TICKS_TO_US(n)    (n)
 BB ticks to microseconds (no conversion required). More...
 
#define BB_MAX_SCAN_PERIOD_MS   1000
 Typical maximum duration to scan in a scan interval (BbRtCfg_t::maxScanPeriodMs). More...
 
#define BB_RF_SETUP_DELAY_US   150
 Typical RF setup delay (BbRtCfg_t::rfSetupDelayUs). More...
 
#define BB_SCH_SETUP_DELAY_US   500
 Typical operation setup delay in microseconds (BbRtCfg_t::schSetupDelayUs). More...
 
#define BB_TIMER_1MHZ_MAX_VALUE_US   0xFFFFFFFF /* 2^32 - 1 = 0xFFFFFFFF. */
 Maximum time tick for 32 bit timer(1MHz) in microseconds (BbRtCfg_t::schSetupDelayUs). More...
 
#define BB_TIMER_8MHZ_MAX_VALUE_US   0x1FFFFFFF /* 2^29 - 1 = 0x1FFFFFFF. */
 Maximum time tick for 32 bit timer(8MHz) in microseconds (BbRtCfg_t::schSetupDelayUs). More...
 
#define BB_RTC_MAX_VALUE_US   511999999 /* 2^24 / 32768 * 10^6 - 1 = 512 * 10^6 - 1 = 511999999. */
 Maximum time tick for 24 bit RTC counter(32768Hz) in microseconds. (BbRtCfg_t::BbTimerBoundaryUs) More...
 

Typedefs

typedef void(* bbDrvIrqCback_t) (void)
 IRQ callback datatypes. More...
 

Enumerations

Functions

void PalBbInit (void)
 Initialize the baseband driver. More...
 
void PalBbEnable (void)
 Enable the BB hardware. More...
 
void PalBbDisable (void)
 Disable the BB hardware. More...
 
void PalBbLoadCfg (PalBbCfg_t *pCfg)
 Load BB timing configuration. More...
 
uint32_t PalBbGetCurrentTime (void)
 Get the current BB clock value in microseconds. More...
 
uint8_t PalBbGetTimestamp (uint32_t *pTime)
 Get the current FRC time. More...
 
void PalBbRegisterProtIrq (uint8_t protId, bbDrvIrqCback_t timerCback, bbDrvIrqCback_t radioCback)
 Called to register a protocol's Radio and Timer IRQ callback functions. More...
 
void PalBbSetProtId (uint8_t protId)
 Set protocol ID. More...
 

Detailed Description

Baseband 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.h.

Macro Definition Documentation

#define BB_CLK_RATE_HZ   1000000

BB clock rate in hertz.

Definition at line 83 of file pal_bb.h.

#define BB_MATH_DIV_10E6 (   n)    ((uint32_t)(((uint64_t)(n) * UINT64_C(4295)) >> 32))

Binary divide with 1,000,000 divisor (n[max]=0xFFFFFFFF).

Definition at line 87 of file pal_bb.h.

#define BB_MAX_SCAN_PERIOD_MS   1000

Typical maximum duration to scan in a scan interval (BbRtCfg_t::maxScanPeriodMs).

Definition at line 121 of file pal_bb.h.

#define BB_RF_SETUP_DELAY_US   150

Typical RF setup delay (BbRtCfg_t::rfSetupDelayUs).

Definition at line 124 of file pal_bb.h.

#define BB_RTC_MAX_VALUE_US   511999999 /* 2^24 / 32768 * 10^6 - 1 = 512 * 10^6 - 1 = 511999999. */

Maximum time tick for 24 bit RTC counter(32768Hz) in microseconds. (BbRtCfg_t::BbTimerBoundaryUs)

Definition at line 136 of file pal_bb.h.

#define BB_SCH_SETUP_DELAY_US   500

Typical operation setup delay in microseconds (BbRtCfg_t::schSetupDelayUs).

Definition at line 127 of file pal_bb.h.

#define BB_TICKS_TO_US (   n)    (n)

BB ticks to microseconds (no conversion required).

Definition at line 108 of file pal_bb.h.

#define BB_TIMER_1MHZ_MAX_VALUE_US   0xFFFFFFFF /* 2^32 - 1 = 0xFFFFFFFF. */

Maximum time tick for 32 bit timer(1MHz) in microseconds (BbRtCfg_t::schSetupDelayUs).

Definition at line 130 of file pal_bb.h.

#define BB_TIMER_8MHZ_MAX_VALUE_US   0x1FFFFFFF /* 2^29 - 1 = 0x1FFFFFFF. */

Maximum time tick for 32 bit timer(8MHz) in microseconds (BbRtCfg_t::schSetupDelayUs).

Definition at line 133 of file pal_bb.h.

#define BB_US_TO_BB_TICKS (   us)    (us)

Return microseconds (no conversion required).

Definition at line 91 of file pal_bb.h.

Typedef Documentation

typedef void(* bbDrvIrqCback_t) (void)

IRQ callback datatypes.

Definition at line 143 of file pal_bb.h.

Enumeration Type Documentation

anonymous enum

Status codes.

Enumerator
BB_STATUS_SUCCESS 

Operation successful.

BB_STATUS_FAILED 

General failure.

BB_STATUS_CANCELED 

Receive canceled.

BB_STATUS_RX_TIMEOUT 

Receive packet timeout.

BB_STATUS_CRC_FAILED 

Receive packet with CRC verification failed.

BB_STATUS_FRAME_FAILED 

Receive packet with frame verification failed.

BB_STATUS_ACK_FAILED 

ACK packet failure.

BB_STATUS_ACK_TIMEOUT 

ACK packet timeout.

BB_STATUS_TX_CCA_FAILED 

Transmit CCA failure.

BB_STATUS_TX_FAILED 

Transmit failure.

Definition at line 50 of file pal_bb.h.

anonymous enum

PHY options.

Enumerator
BB_PHY_OPTIONS_DEFAULT 

BB defined PHY Options behavior.

BB_PHY_OPTIONS_BLE_S2 

Always use S=2 coding when transmitting on LE Coded PHY.

BB_PHY_OPTIONS_BLE_S8 

Always use S=8 coding when transmitting on LE Coded PHY.

Definition at line 74 of file pal_bb.h.

enum PalBbPhy_t

PHY types.

Enumerator
BB_PHY_BLE_1M 

Bluetooth Low Energy 1Mbps PHY.

BB_PHY_BLE_2M 

Bluetooth Low Energy 2Mbps PHY.

BB_PHY_BLE_CODED 

Bluetooth Low Energy Coded PHY (data coding unspecified).

BB_PHY_15P4 

802.15.4 PHY.

Definition at line 65 of file pal_bb.h.

Protocol types.

Enumerator
BB_PROT_NONE 

Non-protocol specific operation.

BB_PROT_BLE 

Bluetooth Low Energy normal mode.

BB_PROT_BLE_DTM 

Bluetooth Low Energy direct test mode.

BB_PROT_PRBS15 

Enable the continuous PRBS15 transmit sequence.

BB_PROT_15P4 

802.15.4.

BB_PROT_NUM 

Number of protocols.

Definition at line 39 of file pal_bb.h.

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.