This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Control CC2530 RF for FCC cert testing

Other Parts Discussed in Thread: CC2530, TIMAC, CC2592

I am about to have a product using the cc2530 go through FCC certification testing.  Is there any documentation or utility code that would allow me to control the RF such that:

1.    The software should allow configuration and operation on all available unlicensed wireless device channels.
2.    The software should allow configuration and operation at a duty cycle equivalent to the "worst case" during "100 percent and normal mode of operation."
3.    The software should allow configuration and operation using all available modulations and data rates.
4.    The software should allow configuration and operation on all available power out levels. (Maximum power will be tested only)

I've seen the TransmitApp utility, but it appears that to achieve max data rates, you have to have a second transmitting device, and that seems like something that won't be usable for the the kinds of testing they will be doing. 

If no utility is readily available, does anyone know what API would give me the kind of access that this would seem to require?  Can Zstack handle this, or do I have to go with some other stack (TIMAC)?

 

  • I think I've found most of this (the znp sample app and the smartrf studio programs are good guides). 

    The only one I do'nt have a handle on is finding a way to turn off the transmitter (for the FCC unintentional emmissions test) yet still allow the stack (and thus my application) to run otherwise normally (to do other stuff that doesn't involve RF, like operate relays and things). 

    The api calls that I have tried throw the stack into assert loops because, presumably, they interrupt the flow that zstack is expecting.    The best I've been able to come up with is to disable network polling (I'm a ZED).  I'm not sure that's good enough for this testing. 

     

     

     

  • Hi Ben,

    What we do for FCC certification is to make a really simple program that toggles through the following 9 modes:

    - Modulated TX; low, mid and high frequencies; maximum output power

    - Unmodulated TX (CW); low, mid and high frequencies; maximum output power

    - RX; low, mid and high frequencies (for spurious emission testing)

    The duty cycle correction factor can be calculated and applied to a measurement of the system in continuous TX.

    The register settings required for the different modes can be copied directly from SmartRF Studio by using the "register export"-function.

    /Fredrik

  • I did use smartrf studio which was pretty easy, but it does not address the issue of allowing the stack to run but disallowing transmits.  What I ended up doing was to just modify the mac module to always return from the max_tx without transmitting. 

    As for the modulated / unmodulated tx,etc, yes the smartrf studio along with the sample app for ZNP that is in the distribution made that pretty simple.  But the stack and therefore the application do not run while in that mode. 

    Thanks for replying

  • Hi Ben,

    I am not sure why you need the stack to run?

    For spurious emission measurements (radio running, but no transmission/TX off) you can simply enable continuous RX.

    /Fredrik

  • Because the test lab requires that the equipment be operating as it would under normal conditions (switching power, changing LCDs, etc) to check if your electronics are causing unintentional RF emissions. 

  • Frederick,


    I like your idea of making a simple program, which allows a device to be tested standalone (not connected to SmartRF).  But I'm having trouble.  I get all the registers set but do not actually get any transmission.  If I issue an ISTXON command to the RFST register, one packet or RF burst is seen, but it is not continuous.


    What more needs to be done?  Setting registers per SmartRF is not enough.  Clearly the "start" and "stop" buttons are issuing more commands.  Must I create my own CSP algorithm?  How do I insure random data?

    jh

  • Doh! Seems the RFST = ISTXON command was working after all. Realized my power supply was getting dragged down and re-booting the chip. It was not designed to handle continuous TX current (with CC2592). Lowering to 10dBm solved the problem.

    Still not sure if output is modulated or not...

    jh
  • Hi Jim,

    MDMTEST1, bit 4, controls if the output is modulated or not.

    Cheers,
    Fredrik
  • Hi,
    I'm having pretty much the same problem. I need to do FCC testing but can't use RF Studio. Can anybody probably post some code on how to enter the different test modes?
    I tried to come up with something myself, but I can't get it to work.

    Thanks,
    Jens
  • The following snippet works for me.  I use a pushbutton on P0.6 to toggle through the modes.  Red LED on P0.0 and green LED on P0.1.  Good luck!

    jh

    ///////////////////////////////////////////////////////////////////////////////
    // rf test program
    
    #include "iocc2530.h"
    
    #define RX_EN()				P1 = P1 & ~0x02 | 0x10
    #define TX_EN()				P1 = P1 & ~0x10 | 0x02
    
    #define ISRXON()				RFST = 0xE3
    #define ISTXON()				RFST = 0xE9
    #define ISRFOFF()				RFST = 0xEF
    #define ISFLUSHRX()			RFST = 0xED
    #define ISFLUSHTX()			RFST = 0xEE
    
    #define SET_RADIO_RX()		{FRMFILT0 = 0x0C; FRMCTRL0 = 0x0C; RX_EN(); ISFLUSHRX(); ISRXON();}
    #define SET_RADIO_TX()		{FRMFILT0 = 0x0D; FRMCTRL0 = 0x43; TX_EN(); ISFLUSHTX(); ISTXON();}
    #define SET_RADIO_OFF()		{ISRFOFF(); ISFLUSHRX();}
    #define SET_LED_BLK()		P0 = P0 & ~0x03
    #define SET_LED_RED()		P0 = P0 & ~0x02 | 0x01
    #define SET_LED_GRN()		P0 = P0 & ~0x01 | 0x02
    #define SET_LED_YEL()		P0 = P0 | 0x03;
    #define SET_CHANNEL_LO()	FREQCTRL = 0x0B
    #define SET_CHANNEL_MID()	FREQCTRL = 0x2E
    #define SET_CHANNEL_HI()	FREQCTRL = 0x51
    
    #define DBM10					0x65
    #define DBM20					0xE5
    
    ///////////////////////////////////////////////////////////////////////////////
    // prototypes
    
    void SetMode(unsigned char);
    
    ///////////////////////////////////////////////////////////////////////////////
    // main
    
    void main(void)
    {
    	unsigned char i = 0;
    	unsigned char j = 0;
    	unsigned char mode = 0;
    	
    	// wake up delay
    	for(i = 0; i < 250; i++)
    	{
    		for(j = 0; j < 250; j++)asm("nop");
    	}
    	
    	// select 32M
    	CLKCONCMD = 0x80;
    	for(i = 0; i < 250; i++)asm("nop");
    	for(i = 0; i < 250; i++)asm("nop");
    	
    	// init pins
    	P0 = 0xB0;
    	P1 = 0x20;
    	P2 = 0x01;
    	P0DIR = 0xBB;
    	P1DIR = 0x7E;	
    	P2DIR	= 0x01;
    	
    	// power level
    	TXPOWER   = DBM10;
    
    	// rf
    	CCACTRL0 = 0xF8; 
    	FSCAL1 = 0x00; 
    	AGCCTRL1 = 0x15; 
    	AGCCTRL2 = 0xFE; 
    	TXFILTCFG = 0x09; 
    	FRMCTRL1 = 0x00;
    	
    	// init mode
    	mode = 0;
    	SetMode(mode);
    
    	// main loop, poll for button
    	while(1)
    	{
    		// is button up?
    		if(P0 & 0x40)continue;
    		
    		// button is pressed, wait for it to go up
    		while(!(P0 & 0x40));
    		
    		// turn off
    		SET_RADIO_OFF();
    
    		// debounce
    		for(i = 0; i < 250; i++)
    		{
    			for(j = 0; j < 250; j++)
    			{
    				asm("nop");
    				asm("nop");
    				asm("nop");
    				asm("nop");
    			}
    		}
    
    		// change mode
    		mode++;
    		
    		// rewind
    		if(mode >= 7)mode = 0;
    		
    		// set mode
    		SetMode(mode);
    	}
    }
    
    ///////////////////////////////////////////////////////////////////////////////
    // set mode
    
    void SetMode(unsigned char mode)
    {
    	switch(mode)
    	{
    		case 0:
    		{
    			SET_CHANNEL_LO();
    			SET_RADIO_RX();
    			SET_LED_YEL();
    			break;
    		}
    			
    		case 1:
    		{
    			SET_CHANNEL_LO();
    			SET_RADIO_TX();
    			SET_LED_GRN();
    			break;
    		}
    			
    		case 2:
    		{
    			SET_CHANNEL_MID();
    			SET_RADIO_RX();
    			SET_LED_RED();
    			break;
    		}
    			
    		case 3:
    		{
    			SET_CHANNEL_MID();
    			SET_RADIO_TX();
    			SET_LED_GRN();
    			break;
    		}
    			
    		case 4:
    		{
    			SET_CHANNEL_HI();
    			SET_RADIO_RX();
    			SET_LED_RED();
    			break;
    		}
    			
    		case 5:
    		{
    			SET_CHANNEL_HI();
    			SET_RADIO_TX();
    			SET_LED_GRN();
    			break;
    		}
    			
    		default:
    		{
    			SET_RADIO_OFF();
    			SET_LED_BLK();
    			break;
    		}
    	}		
    }

  • Thank you very much, that was very helpful!

    Cheers,

    Jens