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.

TI cc1310 contiki uart can't print message

Other Parts Discussed in Thread: CC1310, CC1350

Dear All,

I am using TI cc1310 with contiki to print message via uart.

I built the hello-world example to test uart. 

But it  didn't print anything.

It's working in smartRF06+CC13xxEM.

I have modified the uart IO definition board.h of  cc13xx module .

6LoWPAN\contiki\trunk\platform\srf06-cc26xx\srf06\cc13xx

From:

#define BOARD_IOID_UART_RX IOID_2 //evm board
#define BOARD_IOID_UART_TX IOID_3

To 

#define BOARD_IOID_UART_RX IOID_2//CC1350 UART  Rx

#define BOARD_IOID_UART_TX IOID_1 //CC1350 UART  Tx

Did I miss something?

Can someone advise me how to correct it?

Thanks.

  • Which DIO pins do you use as UART TX/RX pins on your own CC1310?
  • I use DIO1 for Tx and DIO2 for Rx.

    #define BOARD_IOID_UART_TX IOID_1
    #define BOARD_IOID_UART_RX IOID_2//CC1350 UART Rx
  • Hi,

    1. Have you enabled debugging over uart
    2. Are you seeing any action (with oscope) on the DIO1 and DIO2 pins?
  • Hi YK,

    My target board is cc1310 5*5 package . but My Evaluation board is 7*7 package.
    How to modify board.h to meet my require?

    my board.h config as below:

    /*
    * Copyright (c) 2014, Texas Instruments Incorporated - http://www.ti.com/
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * 1. Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    * 2. Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the distribution.
    * 3. Neither the name of the copyright holder nor the names of its
    * contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
    * OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    /*---------------------------------------------------------------------------*/
    /** \addtogroup cc26xx-srf-tag
    * @{
    *
    * \defgroup srf06-cc13xx-peripherals Peripherals for the SmartRF06EB + CC1310EM
    *
    * Defines related to the SmartRF06 Evaluation Board with a CC1310EM
    *
    * This file provides connectivity information on LEDs, Buttons, UART and
    * other peripherals
    *
    * This file can be used as the basis to configure other boards using the
    * CC13xx/CC26xx code as their basis.
    *
    * This file is not meant to be modified by the user.
    * @{
    *
    * \file
    * Header file with definitions related to the I/O connections on the TI
    * SmartRF06 Evaluation Board with a CC1310EM
    *
    * \note Do not include this file directly. It gets included by contiki-conf
    * after all relevant directives have been set.
    */
    /*---------------------------------------------------------------------------*/
    #ifndef BOARD_H_
    #define BOARD_H_
    /*---------------------------------------------------------------------------*/
    #include "ioc.h"
    /*---------------------------------------------------------------------------*/
    /**
    * \name LED configurations
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    /* Some files include leds.h before us, so we need to get rid of defaults in
    * leds.h before we provide correct definitions */
    #undef LEDS_GREEN
    #undef LEDS_YELLOW
    #undef LEDS_RED
    #undef LEDS_CONF_ALL

    #define LEDS_RED 1 /**< LED1 (Red) */
    #define LEDS_YELLOW 2 /**< LED2 (Yellow) */
    #define LEDS_GREEN 4 /**< LED3 (Green) */
    #define LEDS_ORANGE 8 /**< LED4 (Orange) */

    #define LEDS_CONF_ALL 15

    /* Notify various examples that we have LEDs */
    #define PLATFORM_HAS_LEDS 0
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name LED IOID mappings
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    #define BOARD_IOID_LED_1 IOID_UNUSED
    #define BOARD_IOID_LED_2 IOID_UNUSED
    #define BOARD_IOID_LED_3 IOID_UNUSED
    #define BOARD_IOID_LED_4 IOID_UNUSED
    #define BOARD_LED_1 (1 << BOARD_IOID_LED_1)
    #define BOARD_LED_2 (1 << BOARD_IOID_LED_2)
    #define BOARD_LED_3 (1 << BOARD_IOID_LED_3)
    #define BOARD_LED_4 (1 << BOARD_IOID_LED_4)
    #define BOARD_LED_ALL (BOARD_LED_1 | BOARD_LED_2 | BOARD_LED_3 | \
    BOARD_LED_4)
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name UART IOID mapping
    *
    * Those values are not meant to be modified by the user
    * @{
    */


    #define BOARD_IOID_UART_RX IOID_2
    #define BOARD_IOID_UART_TX IOID_1


    #define BOARD_IOID_UART_CTS IOID_UNUSED
    #define BOARD_IOID_UART_RTS IOID_UNUSED
    #define BOARD_UART_RX (1 << BOARD_IOID_UART_RX)
    #define BOARD_UART_TX (1 << BOARD_IOID_UART_TX)
    #define BOARD_UART_CTS (1 << BOARD_IOID_UART_CTS)
    #define BOARD_UART_RTS (1 << BOARD_IOID_UART_RTS)
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name Button IOID mapping
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    #define BOARD_IOID_KEY_LEFT IOID_9
    #define BOARD_IOID_KEY_RIGHT IOID_8
    #define BOARD_IOID_KEY_UP IOID_10
    #define BOARD_IOID_KEY_DOWN IOID_7
    #define BOARD_IOID_KEY_SELECT IOID_0
    #define BOARD_KEY_LEFT (1 << BOARD_IOID_KEY_LEFT)
    #define BOARD_KEY_RIGHT (1 << BOARD_IOID_KEY_RIGHT)
    #define BOARD_KEY_UP (1 << BOARD_IOID_KEY_UP)
    #define BOARD_KEY_DOWN (1 << BOARD_IOID_KEY_DOWN)
    #define BOARD_KEY_SELECT (1 << BOARD_IOID_KEY_SELECT)
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name 3.3V domain IOID mapping
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    #define BOARD_IOID_3V3_EN IOID_UNUSED
    #define BOARD_3V3_EN (1 << BOARD_IOID_3V3_EN)
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name SPI IOID mapping
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    #define BOARD_IOID_SPI_SCK IOID_UNUSED
    #define BOARD_IOID_SPI_MOSI IOID_UNUSED
    #define BOARD_IOID_SPI_MISO IOID_UNUSED
    #define BOARD_SPI_SCK (1 << BOARD_IOID_SPI_SCK)
    #define BOARD_SPI_MOSI (1 << BOARD_IOID_SPI_MOSI)
    #define BOARD_SPI_MISO (1 << BOARD_IOID_SPI_MISO)
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name LCD IOID mapping
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    #define BOARD_IOID_LCD_MODE IOID_UNUSED
    #define BOARD_IOID_LCD_RST IOID_UNUSED
    #define BOARD_IOID_LCD_CS IOID_UNUSED
    #define BOARD_IOID_LCD_SCK BOARD_IOID_SPI_SCK
    #define BOARD_IOID_LCD_MOSI BOARD_IOID_SPI_MOSI
    #define BOARD_LCD_MODE (1 << BOARD_IOID_LCD_MODE)
    #define BOARD_LCD_RST (1 << BOARD_IOID_LCD_RST)
    #define BOARD_LCD_CS (1 << BOARD_IOID_LCD_CS)
    #define BOARD_LCD_SCK BOARD_SPI_SCK
    #define BOARD_LCD_MOSI BOARD_SPI_MOSI
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name SD Card IOID mapping
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    #define BOARD_IOID_SDCARD_CS IOID_UNUSED
    #define BOARD_SDCARD_CS (1 << BOARD_IOID_SDCARD_CS)
    #define BOARD_IOID_SDCARD_SCK BOARD_IOID_SPI_SCK
    #define BOARD_SDCARD_SCK BOARD_SPI_SCK
    #define BOARD_IOID_SDCARD_MOSI BOARD_IOID_SPI_MOSI
    #define BOARD_SDCARD_MOSI BOARD_SPI_MOSI
    #define BOARD_IOID_SDCARD_MISO BOARD_IOID_SPI_MISO
    #define BOARD_SDCARD_MISO BOARD_SPI_MISO
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name ALS IOID mapping
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    #define BOARD_IOID_ALS_PWR IOID_UNUSED
    #define BOARD_IOID_ALS_OUT IOID_UNUSED
    #define BOARD_ALS_PWR (1 << BOARD_IOID_ALS_PWR)
    #define BOARD_ALS_OUT (1 << BOARD_IOID_ALS_OUT)
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name ACC IOID mapping
    *
    * Those values are not meant to be modified by the user
    * @{
    */
    #define BOARD_IOID_ACC_PWR IOID_UNUSED
    #define BOARD_IOID_ACC_INT IOID_UNUSED
    #define BOARD_IOID_ACC_INT1 IOID_UNUSED
    #define BOARD_IOID_ACC_INT2 IOID_UNUSED
    #define BOARD_IOID_ACC_CS IOID_UNUSED
    #define BOARD_ACC_PWR (1 << BOARD_IOID_ACC_PWR)
    #define BOARD_ACC_INT (1 << BOARD_IOID_ACC_INT)
    #define BOARD_ACC_INT1 (1 << BOARD_IOID_ACC_INT1)
    #define BOARD_ACC_INT2 (1 << BOARD_IOID_ACC_INT2)
    #define BOARD_ACC_CS (1 << BOARD_IOID_ACC_CS)
    #define BOARD_IOID_ACC_SCK BOARD_IOID_SPI_SCK
    #define BOARD_ACC_SCK BOARD_SPI_SCK
    #define BOARD_IOID_ACC_MOSI BOARD_IOID_SPI_MOSI
    #define BOARD_ACC_MOSI BOARD_SPI_MOSI
    #define BOARD_IOID_ACC_MISO BOARD_IOID_SPI_MISO
    #define BOARD_ACC_MISO BOARD_SPI_MISO
    /** @} */
    /*---------------------------------------------------------------------------*/
    /**
    * \name Device string used on startup
    * @{
    */
    #define BOARD_STRING "TI SmartRF06EB + CC13xx EM"
    /** @} */
    /*---------------------------------------------------------------------------*/
    #endif /* BOARD_H_ */
    /*---------------------------------------------------------------------------*/
    /**
    * @}
    * @}
    */
  • Your board.h seems OK. What is your problem using it?
  • I flashed hello-world example to verify my target board(CC1310 5*5 package).
    but now, the uart can't print any message.

    my question is how to port code from cc13xxem(7*7 package) to cc1310(5*5 package)?
  • Hi Igor,
    How to enable debugging setting?
  • Try to comment out "configure_unused_pins()" in board.c.
  • You need no to. Just put printf()