CC2520 radio
Hardware
- TI/Chipcon CC2520 Second generation 2.4 GHz ZigBee/IEEE 802.15.4 RF transceiver
- Currently working with kit CC2520DK, picture CC2520DK picture
Software
- USB drivers only for Win XP
- TI Smart RF Studio link
- TI Z-Stack link
- IAR evaluation version IAR is not so pedantic, getting second evaluation license is possible
Report
April
9th - first contact with CC2520DK, testing factory code (packet error counting), the range seems to be sufficient with antenna (PCB antenna is not connected, it is a little bit confusing in schematic), test with running DC motor (model railway H0 1:87) nearby receiver (bad contact with sparkling), wireless communication is not affected, but program is sometimes corrupted because of sparkling
10th - simple sending packets via Smart RF Studio user guide page 112/113, firmware upgrade (evaluations boards + debugger) - one board without upgrade does not display messages from MSP, debugging of GenericApp (Coordinator + EndDevice)
14th - need replace - uses GPIO0 pin , mac_dualchip.c
void macDualchipTurnOnRadioPower(void) {....}
18th - library functions are in APS.h - Router2618.lib, TIMAC-MSP2618.lib and other (security header files are referencing to Security2618.lib). Details are in .map file after compiling
19th -
1. void macDualchipTurnOnRadioPower(void) {...
macSpiWriteReg( GPIOCTRL1, GPIO_DIR_RADIO_OUTPUT | EXCEPTION_CHANNEL_A ); //instead GPIOCTRL0
//macSpiWriteReg( GPIOCTRL1, GPIO_DIR_RADIO_OUTPUT | EXCEPTION_RFC_FIFO ); //wathching this state is not so critical
...}
2. #define HAL_MAC_TX_ACK_DONE_GPIO_BIT 5 //instead 3
Exception EXCEPTION_RFC_FIFO is used only for defining of other states in mac_radio_defs.h and in interrupt service
#define MAC_RADIO_RX_FIFO_HAS_OVERFLOWED() (HAL_MAC_READ_FIFOP_PIN() && !HAL_MAC_READ_FIFO_PIN()) #define MAC_RADIO_RX_FIFO_IS_EMPTY() (!HAL_MAC_READ_FIFO_PIN() && !HAL_MAC_READ_FIFOP_PIN())
HAL_ISR_FUNCTION( halMacFifopIsr, FIFOP_VECTOR() )
{...
if (!HAL_MAC_READ_FIFOP_PIN() && HAL_MAC_READ_FIFO_PIN()){
/*It appears that after rxPayloadIsr(), a FIFOP glitch can occur. ...*/
//but rxPayloadIsr() is in this comment only
...}
...}
Notes
Pin interconnection between MSP and CC
Conectors CC P1 - MSP P6, CC P2 - MSP P7
GPIO1 - P1.5 GPIO2 - P1.6 GPIO3 - P1.1 GPIO4 - P1.2 GPIO5 - P1.7
EW430_UserGuide
Setting up the simulation environment p55
Macro C-SPY reference p429
EW430_CompilerReference
Tags in source
HAL_ISR_FUNCTION( halMacFifopIsr, FIFOP_VECTOR() ) - interrupt from the radio in hal_mac_config.c