Hello,
I have recently designed a board with the CC2520 and the MSP430f5437.
The board has a balun from Johanson Technology optimized for CC2520 - 2450BN15B0002.
The board is 6 layer board with the stack up as follow:
The substrate in between the TOP and the GND layer is 0.8mm and the substrate between all the other layers is standard value.
1.Top - the CC2520 is located on the top layer
2.GND
3. Power-V=3.3V
4.Signal_1
5.Signal_2
6.Bottom - the MSP430f is located on this layer.
I was successfully able to send data packets between two pcb's using the provided example code, but now I have started to look at the RF output on the spectrum analyzer and I am getting only -11dBm when the transmit power is set at max 0xF7. I used the following registers settings to perform a carrier test:
Included is the picture of the top side layout. Please advice to why I am getting only -11dBm. I did expect a few dBs of attenuation but -16dB indicates something major is wrong.
CC2520_MEMWR8(CC2520_TXCTRL, 0x94); CC2520_MEMWR8(CC2520_TXPOWER, 0xF7); CC2520_MEMWR8(CC2520_MDMTEST0,0x65); CC2520_MEMWR8(CC2520_MDMCTRL0, 0x44);CC2520_MEMWR8(CC2520_FRMCTRL0, 0x43); CC2520_MEMWR8(CC2520_FRMCTRL1, 0x00); CC2520_MEMWR8(CC2520_EXTCLOCK, 0x00);Part from my main: Command_strobe(CC2520_INS_SXOSCON ); //Oscilator ON Command_strobe(CC2520_INS_SNOP); Command_strobe(CC2520_INS_STXCAL); Command_strobe(CC2520_INS_STXON);while(1);
4276.CC2520_MSP430_43mm_BALUN_1.pdf
Hi Bruno
I have had a quick look at your design and found no obvious explanation to a 16dB performance drop. Review in pdf is difficult, gerber files would provide a better base for checking the design, a schematic also is helpful.
The register settings seem Ok. One comment TXCTRL=0x94 is only intended for high temperature operation, else it should be 0x91
Suggest start checking component values, solder joints and supply voltage on al VDD pins to debug the design. Sometimes current measurements also provide clues to what is happening.
Tor-Inge
HI Tor-Inge,
I can now verify that the board is fine. It is something with the procedure for going to TX mode.
When I put a break point in my code, after performing command strobe for calibration (INS_STXCAL) and wait roughly for 10 seconds, I get full power (3dBm) on the spectrum analyzer. It seems like the radio is not in transmit mode if I don't delay long enough even though the current is 34mA. So I guess that my procedure for getting in the TX mode is not correct. Can you please advice me what is the right procedure for going in TX mode after resetting the CC2520? I include the register setting and the part of the main:
Register settings:
TXCTRL->0x94
TXPOWER ->0xF7 //5dBm
MDMTEST0 ->0x65
MDMCTRL0 ->0x44
FRMCTRL0 -> 0x43
FRMCTRL1 ->0x00
EXTCLOCK -> 0x00
Part from Main:
Reset ; // resetting the CC2520 AS per example code
Command_strobe(CC2520_INS_SXOSCON ); //Oscilator ON
__delay_cycles (500); // I run at default frequency through the DCODIV
Command_strobe(CC2520_INS_SNOP); __delay_cycles(500); Command_strobe(CC2520_INS_STXCAL);__delay_cycles (500) // I put the break point here and wait for roughly 10 sec and then hit play and I am getting the full power. If I don't wait the attenuation is 16dB.
Command_strobe(CC2520_INS_TXON); // The current is correct I = 33mAx = Command_strobe(CC2520_INS_SNOP ); //Check of the status byte.
while(1);
To summarise:
If I do not breakpoint on delay after TXCAL strobe I get 34mA and only -11dBm output, if I delay for 10 seconds I get 3dBm as expected.
This is a bit outside what I am familiar with. Hopefully, someone with low level programming skills can comment on this.
However, it is my understanding that there are two approaches to this. First, strobe STX and transceiver will calibrate and automatically start transmission of TXFIFO content after calibration. Second strategy is to monitor FSMSTAT0.CAL_RUNNING for a negative edge indicating finished calibration.
Hi Bruno,
Did you find solution to the problem? It seems that we have similar issue. We are using also MSP430f5437A and cc2520.
We are missing ~15dm from CC2520 output. Changing the TXPOWER register does not make any effect to radio output.
-Jani-
Hello Jani,
I found solution to my problem by building my own state machine for each of the modes (TX,RX,IDLE,LPM1,LPM2). So, if I want to go from LPM1 to TX I execute one piece of code if I want to go from RX to TX another piece of code etc. I was following the flow diagram on page 85 in the datasheet. Here is a code example :
First reset the CC2520 with using RESETn, then initialize (registers) and then I call this function set_radio_mode and put the radio in IDLE .
status = set_radio_mode(Radio_IDLE);//Go in IDLE Command_strobe(CC2520_INS_SFLUSHRX); // Flush RXFIFO Command_strobe(CC2520_INS_SFLUSHTX); // Flush TXFIFO CC2520_TXBUF(mpduLength,txMpdu); //Write to the TXFIFO status = set_radio_mode(Radio_TX);//Go in TX
unsigned char set_radio_mode ( unsigned char mode)
{
case Radio_TX: { if (Prev_Radio_Mode==Radio_LPM1) //if the previous radio mode was LPM1 I do the following sequence of commands { Command_strobe(CC2520_INS_SXOSCON ); Command_strobe(CC2520_INS_SNOP); P3OUT&=~1; //CS while (!(P3IN&BIT2));// wait until SO<>1 P3OUT|=1; while(!(Command_strobe(CC2520_INS_SNOP)&0x80)); // now oscillator is stable and running Command_strobe(CC2520_INS_STXON); status = Command_strobe(CC2520_INS_SNOP); } else //if (Prev_Radio_Mode==Radio_RX) { Command_strobe(CC2520_INS_STXON); status=Command_strobe(CC2520_INS_SNOP); } Prev_Radio_Mode=Radio_TX; } break; case Radio_IDLE: { if (Prev_Radio_Mode==Radio_LPM1) { Command_strobe(CC2520_INS_SXOSCON); while(!(Command_strobe(CC2520_INS_SNOP)&0x80)); Command_strobe(CC2520_INS_SRFOFF); status=Command_strobe(CC2520_INS_SNOP); } Prev_Radio_Mode=Radio_IDLE; } break; case Radio_LPM1: { Command_strobe(CC2520_INS_SRFOFF); Command_strobe(CC2520_INS_SXOSCOFF ); Prev_Radio_Mode=Radio_LPM1; } break; }
}
Good luck,
Bruno.