微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI Zigbee设计交流 > CC2530/CC2531怎么实现非调制(unmodulated)的载波发送

CC2530/CC2531怎么实现非调制(unmodulated)的载波发送

时间:10-02 整理:3721RD 点击:

您好!我想咨询下贵公司,CC2530/CC2531怎么实现非调制(unmodulated)的载波发送,以实现模块在出厂时的频点检测。因为实际产品无法用smartRF studio,怎么用函数实现,z-stack里有现成可调用的吗?非常感谢

我尝试用smartRf studio导出寄存器设置,

P0 = 0x7F; // port 0

P1 = 0xAD; // port 1

P0DIR = 0x80; // port 0 direction

P1DIR = 0x12; // port 1 direction

FRMCTRL0 = 0x43; // frame handling

FRMCTRL1 = 0x00; // frame handling

TXPOWER = 0xD5; // controls the output power

CCACTRL0 = 0xF8; // cca threshold

FSCAL1 = 0x00; // tune frequency calibration

AGCCTRL1 = 0x15; // agc reference level

AGCCTRL2 = 0xFE; // agc gain override

TXFILTCFG = 0x09; // tx filter configuration

CHVER = 0x00; // chip version

CHIPID = 0x00; // chip id 

这样就能实现未调制载波的发送吗,因为手里没频谱仪,所以还望各位赐教

/**************************************************************************************************
* @fn znpTestRF
*
* @brief This function initializes and checks the ZNP RF Test Mode NV items. It is designed
* to be invoked before/instead of MAC radio initialization.
*
* input parameters
*
* None.
*
* output parameters
*
* None.
*
* @return None.
*/
void znpTestRF(void)
{
uint8 rfTestParms[4] = { 0, 0, 0, 0 };

if ((SUCCESS != osal_nv_item_init(ZNP_NV_RF_TEST_PARMS, 4, rfTestParms)) ||
(SUCCESS != osal_nv_read(ZNP_NV_RF_TEST_PARMS, 0, 4, rfTestParms)) ||
(rfTestParms[0] == 0))
{
return;
}

/* Recommended settings */
MDMCTRL0 = 0x85;
RXCTRL = 0x3F;
FSCTRL = 0x55;
FSCAL1 = 0x01;
AGCCTRL1 = 0x15;
ADCTEST0 = 0x10;
ADCTEST1 = 0x0E;
ADCTEST2 = 0x03;

FRMCTRL0 = 0x43;
FRMCTRL1 = 0x00;

MAC_RADIO_RXTX_OFF();
MAC_RADIO_SET_CHANNEL(rfTestParms[1]);
MAC_RADIO_SET_TX_POWER(rfTestParms[2]);
TX_PWR_TONE_SET(rfTestParms[3]);

switch (rfTestParms[0])
{
case 1: /* Rx promiscuous mode. */
MAC_RADIO_RX_ON();
break;

case 2: /* Un-modulated Tx. */
TX_PWR_MOD__SET(1);
/* no break; */

case 3: /* Modulated Tx. */
/* Modulated is default register setting, so no special action. */

/* Now turn on Tx power for either mod or un-modulated Tx test*/
MAC_RADIO_TX_ON();
break;

default: /* Not expected. */
break;
}

/* Clear the RF test mode. */
(void)osal_memset(rfTestParms, 0, 4);
(void)osal_nv_write(ZNP_NV_RF_TEST_PARMS, 0, 4, rfTestParms);

while (1); /* Spin in RF test mode until a hard reset. */
}

多谢,回答如此详细,我都不用翻文档了

再麻烦下,TX_PWR_TONE_SET(),TX_PWR_MOD__SET(1);      MAC_RADIO_TX_ON(); 怎么定义的,多谢

协议栈帮你定义了,直接去协议栈里面搜

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top