2018年4月2日 星期一

CC2640:Change RF front end mode and bias

1. In ../main.c define your own BLE configuration template.
#ifndef USE_DEFAULT_USER_CFG
#include "ble_user_config.h"
// BLE user defined configuration
//bleUserCfg_t user0Cfg = BLE_USER_CFG;
#define MY_RF_FE_MODE_AND_BIAS ( RF_FE_DIFFERENTIAL | RF_FE_INT_BIAS)
#define MY_BLE_USER_CFG { MAX_NUM_BLE_CONNS, \
MAX_NUM_PDU, \
MAX_PDU_SIZE, \
MY_RF_FE_MODE_AND_BIAS, \
rfRegTbl, \
&txPwrTbl, \
rfDriverTable, \
eccDriverTable, \
CRYPTO_DRV_TABLE, \
trngDriverTable, \
ASSERT_CBACK, \
L2CAP_NUM_PSM, \
L2CAP_NUM_CO_CHANNELS,\
&pfnBMAlloc, \
&pfnBMFree, \
PM_STARTUP_MARGIN }
bleUserCfg_t user0Cfg = MY_BLE_USER_CFG;
#endif // USE_DEFAULT_USER_CFG
view raw gistfile1.txt hosted with ❤ by GitHub
2.The option and default configuration is define in ../ble_user_config.h
// RF Front End Settings
// Note: The use of these values completely depends on how the PCB is laid out.
// Please see Device Package and Evaluation Module (EM) Board below.
#define RF_FE_DIFFERENTIAL 0
#define RF_FE_SINGLE_ENDED_RFP 1
#define RF_FE_SINGLE_ENDED_RFN 2
#define RF_FE_ANT_DIVERSITY_RFP_FIRST 3
#define RF_FE_ANT_DIVERSITY_RFN_FIRST 4
#define RF_FE_SINGLE_ENDED_RFP_EXT_PINS 5
#define RF_FE_SINGLE_ENDED_RFN_EXT_PINS 6
//
#define RF_FE_INT_BIAS (0<<3)
#define RF_FE_EXT_BIAS (1<<3)
...
...
...
#define BLE_USER_CFG { MAX_NUM_BLE_CONNS, \
MAX_NUM_PDU, \
MAX_PDU_SIZE, \
RF_FE_MODE_AND_BIAS, \
rfRegTbl, \
&txPwrTbl, \
rfDriverTable, \
eccDriverTable, \
CRYPTO_DRV_TABLE, \
trngDriverTable, \
ASSERT_CBACK, \
L2CAP_NUM_PSM, \
L2CAP_NUM_CO_CHANNELS,\
&pfnBMAlloc, \
&pfnBMFree, \
PM_STARTUP_MARGIN }
view raw gistfile1.txt hosted with ❤ by GitHub
 

The internal bias and external bias is determine by the RX_TX pin, which didn't implement in 7x7 package.In our application we use the CC2592 as PA and use 5x5 package for smaller footprint, and the configuration is differential mode internal bias.


Ref:
      1.CC26xx HW Training : RF Front End options and Antennas
      2.CC2640 在 Beacon 应用中的实现方法
      3.CC26x0 SimpleLink™Bluetooth®low energy Software Stack 2.2.xDeveloper's Guide

Linux driver: How to enable dynamic debug at booting time for built-in driver.

 Dynamic debug is useful for debug driver, and can be enable by: 1. Mount debug fs #>mount -t debugfs none /sys/kernel/debug 2. Enable dy...