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.

cc1110 UART driver problems [Only Rx and Tx]

Other Parts Discussed in Thread: CC2510, SIMPLICITI

Hello everybody,

I am working about the design about a UART communication with a Arduino Due board (3.3v logic voltage).
I can receive in Arduino the message that I send to CC1110, but I have tried send a message from Arduino to CC1110 target board, and I can't receive anything. I thought that it may be due the RTS and CTS pin, but I don't sure. I have read, we can bypass this handshake if we put the CTS pin to LOW, but it doesn't work fine for me. I have also disabled the UART_FLOW_CONTROL in the library uart_intfc.h but it also doesn't work fine.

Can someone help me?
Thanks.

  • Hi Andres,

    in the basic CC1110 / CC2510 examples there is a UART example:
    www.ti.com/.../swrc117

    Have you tried this and gotten it to work?

    Best regards,
    Niklas
  • I have tested with the UART_BRIDGE example, but it uses this UART driver and I can't make it work.

    I am going to try one more time, but with your reference.

    Thanks.

  • I can't make it work, I am trying again the uart_bridge code from Simpliciti1.2.0.

    This is my code:

    /*----------------------------------------------------------------------------
    * Demo Application for SimpliciTI
    *
    * L. Friedman
    * Texas Instruments, Inc.
    *----------------------------------------------------------------------------
    */
    /******************************************************************************************

    Copyright 2007-2009 Texas Instruments Incorporated. All rights reserved.

    IMPORTANT: Your use of this Software is limited to those specific rights granted under
    the terms of a software license agreement between the user who downloaded the software,
    his/her employer (which must be your employer) and Texas Instruments Incorporated (the
    "License"). You may not use this Software unless you agree to abide by the terms of the
    License. The License limits your use, and you acknowledge, that the Software may not be
    modified, copied or distributed unless embedded on a Texas Instruments microcontroller
    or used solely and exclusively in conjunction with a Texas Instruments radio frequency
    transceiver, which is integrated into your product. Other than for the foregoing purpose,
    you may not use, reproduce, copy, prepare derivative works of, modify, distribute,
    perform, display or sell this Software and/or its documentation for any purpose.

    YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS”
    WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY
    WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
    IN NO EVENT SHALL TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
    NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
    THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY
    INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST
    DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY
    THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.

    Should you have any questions regarding your right to use this Software,
    contact Texas Instruments Incorporated at www.TI.com.
    **************************************************************************************************/
    #define INDICATOR_TIME_OUT 250;

    #include <stdio.h>
    #include "bsp.h"
    #include "mrfi.h"
    #include "nwk_types.h"
    #include "nwk_api.h"
    #include "nwk_pll.h"
    #include "bsp_leds.h"
    #ifdef MRFI_CC430
    #include "uart_intfc_cc430.h"
    #else
    #include "uart_intfc.h"
    #endif

    #include "rf_protocol.h"


    #define SMPL_LINKID_USER_UUD ((linkID_t) ~0)

    void main (void)
    {
    /* holds length of current message */
    uint8_t len8;
    uint16_t len16;

    #ifdef LINK_TO
    /* the link token */
    linkID_t myID = 4;
    #else
    /* the link token */A
    linkID_t myID = 2;
    #endif


    /* the transmit and receive buffers */
    uint8_t rx[MAX_APP_PAYLOAD], tx[MAX_APP_PAYLOAD];

    /* holds led indicator time out counts */
    uint16_t led_tmr;

    BSP_Init( );

    addr_t myAddress = {0x79, 0x56, 0x34, myID};

    SMPL_Ioctl(IOCTL_OBJ_ADDR, IOCTL_ACT_SET, &myAddress);

    SMPL_Init( NULL );

    uart_intfc_init( );

    /* turn on the radio so we are always able to receive data asynchronously */
    SMPL_Ioctl( IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_RXON, NULL );

    /* turn on LED. */
    BSP_TURN_ON_LED1( );

    tx_send_wait( "Link Established!\r\nReady...\r\n", 29 ); // this works
    while(1){

    if(len8 = rx_receive( rx, MAX_APP_PAYLOAD ) > 0){ // this return always 0 to len8.
    printf("%s",rx);
    }
    MRFI_DelayMs( 5 );
    }
    }

    And this link is the UART driver specifications:

    http://www.ti.com/lit/an/swra306/swra306.pdf

  • Why are you running a SimpliciTI example instead of the basic stand-alone UART example Niklas referred you to?

    The examples works fine running on the SmartRF04EB, but might need modifications based on your HW, which I am not familiar with.

    Siri

  • Hi,

    I have tested a lot of things, maybe, I have found the problem.

    I put a breakpoint in this interruption function and it never launches this interruption. :

    _Pragma("vector=0x13") __near_func __interrupt void UART0_RX_ISR(void){
    
    URX0IF = 0;
    
    uartRxBuffer[uartRxIndex++] = U0DBUF;
    
    printf("%c",uartRxBuffer[uartRxIndex-1]);
    
    if (uartRxIndex >= SIZE_OF_UART_RX_BUFFER) {
    
    uartRxIndex = 0; IEN0 &= ~0x04;
    
    }
    
    }

    If I try to send with this interruption function, then it works fine:

    _Pragma("vector=0x3B") __near_func __interrupt void UART0_TX_ISR(void){
    UTX0IF = 0;
    if (uartTxIndex >= SIZE_OF_UART_TX_BUFFER) {
    uartTxIndex = 0; IEN2 &= ~0x08; return;
    }
    U0DBUF = uartTxBuffer[uartTxIndex++];
    }

    The connection diagram is like this:

    Arduino due board                                                     CC1110 mini kit dev
                RX                                      -                                     P0.3
                TX                                      -                                     P0.2
              GND                                    -                                     GND

    I think the Uart initialization is correct, because I can send over Uart, but I can't receive.

    Can someone help me about this topic?