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.

EZ430 RF2500

Other Parts Discussed in Thread: SIMPLICITI

HI,

I have a doubt regarding the EZ430-RF2500. I am giving a serial input from an external device to the battery board pinouts, pin 6, p3.5 which is responsible to receive data input in UART mode. Than i wanna view the output before it goes to the radio. So i am looking at the output at the battery board pinouts  pin 1 p3.4 which is responsible for transmitting data output in UART mode. I have connected the p3.4 of the battery board pinouts to the oscilloscope.

However, I dont have the header files which are responsible to address the battery board pins. Hence I can't figure out the software to receive and transmit the UART data.

Can someone plz help me!!

  • Hi Dominic,

    the header files come with the IDE (IAR or CCE), but  don't think that this is the problem! Are you shure you have implemented a UART protocol to your software? Furthermore you need to know that TI calls this UART a 'Backchannel UART' and it has as transfer rate of 9600baud (when using the  Demo Application).

    Have a look at this too: http://wiki.msp430.com/index.php/EZ430_Backchannel_UART_Configuration

    Rgds
    aBUGSworstnightmare 

  • hi, I guess if I have display my code, it will be easier for you to judge the problem:

    #include "bsp.h"
    #include "mrfi.h"
    #include "bsp_leds.h"
    #include "bsp_buttons.h"
    #include "nwk_types.h"
    #include "nwk_api.h"
    #include "nwk_frame.h"
    #include "nwk.h"

    #include "msp430x22x4.h"

      

    char string1[8];
    char i;
    char j = 0;

    void main(void)
    {
      WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
     
     
      UCA0BR0 = 0x03;                           // 32kHz/9600 = 3.41
      UCA0BR1 = 0x00;                           //
     
      IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt

      __bis_SR_register(LPM3_bits + GIE);       // Enter LPM3, interrupts enabled
    }

    // USCI A0/B0 Transmit ISR
    #pragma vector=USCIAB0TX_VECTOR
    __interrupt void USCI0TX_ISR(void)
    {
      UCA0TXBUF = string1[i++];                 // TX next character

      if (i == sizeof string1)                  // TX over?
        IE2 &= ~UCA0TXIE;                       // Disable USCI_A0 TX interrupt
    }

    // USCI A0/B0 Receive ISR
    #pragma vector=USCIAB0RX_VECTOR
    __interrupt void USCI0RX_ISR(void)
    {
      string1[j++] = UCA0RXBUF;
      if (j > sizeof string1 - 1)
      {
        i = 0;
        j = 0;
        IE2 |= UCA0TXIE;                        // Enable USCI_A0 TX interrupt
        UCA0TXBUF = string1[i++];
      }
    }

    Note: I got this code from MSP430 sample codes.

    My other question is how do I address pins on the battery board? I am assuming that If I give a command like P1DIR=0xFF, that would active the pin 1 on the target board. But what if I want to use the battery board's pin?

    Please bare with my questions :( I am a student doing an internship I am just want to know more.

     

  • Hi dominic,

    the battery board pins WERE target board pins! The battery board simply convertes them to 2.54mm pin header to make them easily accessible.

    Pls have a look at the ez430-RF2500 documentation (page 8) and the MSP430Fx2xx Users Manual (then you will see that P1DIR=0xff is not the instruction to activate pin 1 on the target board (which is connected to P3.4)).

    Rgds
    aBUGSworstnightmare 

  • Ok, I ll take a look at the docs again.

    But what about the code, do you think it is the right way to do UART data input?

  • HI,

    I got this piece of code from http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=slaa378b, its a sample application for the EZ430-RF2500.

    My question here is,

    P3SEL |= 0x30;                            // P3.4,5 = USCI_A0 TXD/RXD

    The above syntax, how does it choose P3.4 and P3.5? P3SEL must mean select pin 3. But pin 3 in RHA and DA package. neither of them are for UART RX/TX. How do we than select the UART RX/TX pin in EZ430-rf2500?

    void MCU_Init()
    {
      BCSCTL1 = CALBC1_8MHZ;                    // Set DCO
      DCOCTL = CALDCO_8MHZ;
     
      BCSCTL3 |= LFXT1S_2;                      // LFXT1 = VLO
      TBCCTL0 = CCIE;                           // TCCR0 interrupt enabled
      TBCCR0 = 12000;                           // ~1 second
      TBCTL = TBSSEL_1 + MC_1;                  // ACLK, upmode
     
      P3SEL |= 0x30;                            // P3.4,5 = USCI_A0 TXD/RXD
      UCA0CTL1 = UCSSEL_2;                      // SMCLK
      UCA0BR0 = 0x41;                           // 9600 from 8Mhz
      UCA0BR1 = 0x3;
      UCA0MCTL = UCBRS_2;                      
      UCA0CTL1 &= ~UCSWRST;                     // **Initialize USCI state machine**
      IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
      __enable_interrupt();
    }

  • dominic pritham said:

    HI,

    I got this piece of code from http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=slaa378b, its a sample application for the EZ430-RF2500.

    My question here is,

    P3SEL |= 0x30;                            // P3.4,5 = USCI_A0 TXD/RXD

    The above syntax, how does it choose P3.4 and P3.5? P3SEL must mean select pin 3. But pin 3 in RHA and DA package. neither of them are for UART RX/TX. How do we than select the UART RX/TX pin in EZ430-rf2500?

    P3SEL is a register in the Digital I/O for port 3, not pin 3.  Each bit in this 8-bit register represents a particular pin of Port 3.  A write of the value 0x30 will set bit[5:4] each to a logic-1.

     

  • Hi,

    In the case of the EZ430 RF2500, the UART TX on the target board is given to the sensor right?

    SO does that mean that I cannot use p3.4 and p3.5 for some other serial data communication?

    Can I have the entire schematic for the EZ430 RF2500 target board? Which could include the sensor's connection too?

    Basically I am trying to give UART input to the EZ430 RF2500 from an external device, and I want to know if the UART 3.4, 3.5 is free to do the communication.

  • Hi Dominic,

    pls refer to my answer above! I've posted a link to the eZ430-RF2500 Users Manual. Here is another resource regarding the target board: eZ430-RF2500T Hardware Design Files.

    aBUGSworstnightmare

    P.S. Have a look at the tools section for more info here: http://focus.ti.com/docs/toolsw/folders/print/ez430-rf2500.html (since I heard someone saying this might help!). And yes, you can use the UART for your own application (P3.4 and P3.5)!

  • hi,

    My objective is to get serial input from a function generator at 3.3V PP square wave at frequency 9.6KHz. This input will trigger an interrupt, which is happening, and whenever this interrupt occurs, the red LED lights up. So far, so good!

    but I want to see the serial data entering P2IN when I come to the debug mode and use F11 and F10 for stepping into or over.

    Everytime I have a break point to see the data coming into P2IN, all I see is 0x80, irrespective of whether I give input at pin 3 of EZ430-RF2500, which is P2.0 of the MSP430.

    Can someone plz tell me how to see the serial data streaming into the P2IN register?

  • Hi ,

    I have given below the code which i am working on right now, it is taken from the Temperature sensing which came along with ez430 rf2500. What I am trying to do is get input through the UART pin 3.5. I have set up UART as it is done in the ACCESS POINT program. This is found inside the function MCU_Init(). My ISR does what its is suppose to do, that is, switch off the LED 2 when ISR is fired, and switch on otherwise.

    My probem is, in the super loop found inside main(), I have a LED 1 ON command. When I run this program, the LED 1 never lights up, which means there is no communication between ACCESS POINT and END DEVICE.

    Why is this happening? How do I establish communication between the AP and ED.

    Please help me! 

     

    //..................END DEVICE............................

    #include "bsp.h"

    #include "mrfi.h"

    #include "nwk_types.h"

    #include "nwk_api.h"

    #include "bsp_leds.h"

    #include "bsp_buttons.h"

    #include "vlo_rand.h"

    #include "msp430x22x4.h"

     

    void linkTo(void);

    void MCU_Init(void);

     

     

    uint8_t *msg;

    int i=0;

     

     

     

    void main (void)

    {

      addr_t lAddr;

      WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT

      { 

     

      if( CALBC1_8MHZ == 0xFF )                 // Do not run if cal values are erased

      {

        volatile int i;

        P1DIR |= 0x03;

        BSP_TURN_ON_LED1();

        BSP_TURN_OFF_LED2();

        while(1)

        {

          for(i = 0; i < 0x5FFF; i++){}

          BSP_TOGGLE_LED2();

          BSP_TOGGLE_LED1();

        }

      }

     

      // SimpliciTI will change port pin settings as well

      P1DIR = 0xFF;

      P1OUT = 0x00;

      P2DIR = 0x27;

      P2OUT = 0x00;

      P3DIR = 0xC0;

      P3OUT = 0x00;

      P4DIR = 0xFF;

      P4OUT = 0x00;

     

     

      while (SMPL_NO_JOIN == SMPL_Init((uint8_t (*)(linkID_t))0))

      {

        BSP_TOGGLE_LED1();

        BSP_TOGGLE_LED2();;

        __bis_SR_register(LPM3_bits + GIE);     // LPM3 with interrupts enabled

      }

      // unconditional link to AP which is listening due to successful join.

      linkTo();

    }

     

     

     

    void linkTo()

    {

      linkID_t linkID1;

     

      // keep trying to link...

      while (SMPL_SUCCESS != SMPL_Link(&linkID1))

      {

        __bis_SR_register(LPM3_bits + GIE);     // LPM3 with interrupts enabled

        BSP_TOGGLE_LED1();

        BSP_TOGGLE_LED2();

      }

      MCU_Init();

     

     

     

      while (1)

      {

        BSP_TURN_ON_LED2();

    if (SMPL_SUCCESS == SMPL_Send(linkID1, msg, sizeof(msg)))

       {

         BSP_TURN_ON_LED1();

    }

     

    /*------------------------------------------------------------------------------

    * ADC10 interrupt service routine

    ------------------------------------------------------------------------------*/

    #pragma vector=ADC10_VECTOR

    __interrupt void ADC10_ISR(void)

    {

      __bic_SR_register_on_exit(CPUOFF);        // Clear CPUOFF bit from 0(SR)

    }

     

    /*------------------------------------------------------------------------------

    * Timer A0 interrupt service routine

    ------------------------------------------------------------------------------*/

    / /...........................SETTING THE UART.....................................

    void MCU_Init()

    {

      BCSCTL1 = CALBC1_8MHZ;                    // Set DCO

      DCOCTL = CALDCO_8MHZ;

     

      BCSCTL3 |= LFXT1S_2;                      // LFXT1 = VLO

      TACCTL0 = CCIE;                           // TACCR0 interrupt enabled

      TACCR0 = 12000;                           // ~1 second

      TACTL = TASSEL_1 + MC_1;                  // ACLK, upmode

     

      P3SEL |= 0x30;                            // P3.4,5 = USCI_A0 TXD/RXD

      UCA0CTL1 = UCSSEL_2;                      // SMCLK

      UCA0BR0 = 0x41;                           // 9600 from 8Mhz

      UCA0BR1 = 0x3;

      UCA0MCTL = UCBRS_2;                       

      UCA0CTL1 &= ~UCSWRST;  // **Initialize USCI state machine**

      //BSP_TURN_ON_LED1(); 

     

        IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt

      __enable_interrupt(); 

    //.......................................................//

    }

    #pragma vector=TIMERA0_VECTOR

    __interrupt void Timer_A (void)

    {

      __bic_SR_register_on_exit(LPM3_bits);        // Clear LPM3 bit from 0(SR)

    }

    //................................ISR.......................................

    #pragma vector = USCIAB0RX_VECTOR

    __interrupt void USCIRX_ISR(void)

    {

     

       BSP_TURN_OFF_LED2();

       msg[i]=UCA0RXBUF;

      i++;

    if (i==7)

    {

    i=0;

    }

     

    MCU_Init();

     

    }

     

     

     

     

     

     

     

     

     

  • Dear, I am Navinkarthi, i am doing my M.E in VLSI Design, for next semester i have to do a project, i would like to do with Texas Instruments, can u suggest which area is good for project, can u help me to do project?

    Mail id: navinkarthinsit@gmail.com

  • Navin Karthi said:
    can u suggest which area is good for project, can u help me to do project?

    I can tell you which is not: a four-year-old thread of a totally different topic. Please start your own thread.

    And I don't know whether MSP430 is the right base for VLSI anyway.

**Attention** This is a public forum