微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > 射频无线通信设计 > CC2530 如何批量测试信号?

CC2530 如何批量测试信号?

时间:10-02 整理:3721RD 点击:
想要测试CC2530信号,请问一下有没有什么办法可以提取SmartRF Studio里面的测试程序(Continuous TX模式)。因为如果批量生产CC2530模块的时候直接用这个提取的程序就可以不使用电脑就可以直接使用频谱仪测量某个信道的信号强度了,否则在电脑上面单独设置会很麻烦的

/**************************************************************************************************
* @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. */
}
Sniffer Log above Everything Else

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

网站地图

Top