Jump to content

CC2520 radio

From HW wiki
Revision as of 19:32, 24 May 2009 by Rychnv1 (talk | contribs)

Hardware

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
  ...}
...}

Mai

12th - first success with SPI communication with radio, MSP is running on internal oscillator, radio needs crystal working in fundamental mode, I recommend KX-K 32,000000 FF 16 .

15th - first communcation with ZigBee coordinator from CC2520DK, but only with CC2520EM in place of radio+antenna,

  • original TI Z-Stack needs GPIOs of CC2520 2 to port with interrupt capability, 2 to HW timer and 2 only for read/write
  • orignal uses as mac_mcu_timer timerA, so i changed it to timerB
  • pin changes
GPIO0     XT1IN    clock
GPIO1     P2.7     TX_FRM_DONE_BIT | TX_ACK_DONE_BIT
GPIO2     P2.6     EXCEPTION_RFC_FIFOP
GPIO3     P4.5     EXCEPTION_RFC_SNIFFER_CLK       (original function of GPIO5)
GPIO4     P4.6     EXCEPTION_RFC_SFD_SYNC
GPIO5     P4.7     EXCEPTION_RFC_SNIFFER_DATA       (original function of GPIO3)
  • clock are running on 8 MHz instead of 6 MHz
  • SPI and timer are sourced from ACLK, because SMCLK can't be sourced from XT1IN (MSP430f2618)

15th - again first communication with my complete design of board and coordinator from CC2520DK, simple sending both direction int value every 200 ms and string every 5 seconds, working range about 5 metres (through glass door).

24th - PWM control of DC motor + ADC on CC2520DK (potentiometer) - is done in Z-Stack - hal_adc.c .

Notes