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.

CC1310: Contiki on RSM package (4x4) and Chip Revision 2.1

Part Number: CC1310

Hi,

We are currently working on CC1310 running Contiki. For development purpose, we are using TI's CC1310 LaunchPad and it's work very well. The problem started once we try to make it running on our production board.

ASFAIK, CC1310 LP works only on 868MHz and 915MHz frequency. So it's different from our production board. Our production board using 4x4 package, and since we are requesting 433MHz support, we got chip revision 2.1. We have tried to adjust the pin mapping on Contiki's board.h. But I think the problem is not only related to pin mapping. Somewhere on TI publication told us that software for 2.1 is not backward compatible.

We are hoping that someone with experience on this subject can help us on this problem. Here is our modification on board.h.

--- platform/srf06-cc26xx/launchpad/cc1310/board.h
+++ platform/mcmv2/default/cc1310/board.modified.h
@@ -27,28 +27,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /*---------------------------------------------------------------------------*/
-/** \addtogroup launchpad-peripherals
- * @{
- *
- * \defgroup launchpad-cc1310-specific CC1310 LaunchPad Peripherals
- *
- * Defines related to the CC1310 LaunchPad
- *
- * This file provides connectivity information on LEDs, Buttons, UART and
- * other peripherals
- *
- * 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
- * CC1310 LaunchPad
- *
- * \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_
 /*---------------------------------------------------------------------------*/
@@ -84,11 +64,13 @@
  * Those values are not meant to be modified by the user
  * @{
  */
-#define BOARD_IOID_LED_1          IOID_6
-#define BOARD_IOID_LED_2          IOID_7
+ 
+#define BOARD_IOID_LED_1          IOID_UNUSED
+#define BOARD_IOID_LED_2          IOID_UNUSED
 #define BOARD_LED_1               (1 << BOARD_IOID_LED_1)
 #define BOARD_LED_2               (1 << BOARD_IOID_LED_2)
 #define BOARD_LED_ALL             (BOARD_LED_1 | BOARD_LED_2)
+
 /** @} */
 /*---------------------------------------------------------------------------*/
 /**
@@ -97,10 +79,10 @@
  * Those values are not meant to be modified by the user
  * @{
  */
-#define BOARD_IOID_UART_RX        IOID_2
-#define BOARD_IOID_UART_TX        IOID_3
-#define BOARD_IOID_UART_RTS       IOID_18
-#define BOARD_IOID_UART_CTS       IOID_19
+#define BOARD_IOID_UART_RX        IOID_1
+#define BOARD_IOID_UART_TX        IOID_2
+#define BOARD_IOID_UART_RTS       IOID_5
+#define BOARD_IOID_UART_CTS       IOID_6
 #define BOARD_UART_RX             (1 << BOARD_IOID_UART_RX)
 #define BOARD_UART_TX             (1 << BOARD_IOID_UART_TX)
 #define BOARD_UART_RTS            (1 << BOARD_IOID_UART_RTS)
@@ -113,8 +95,8 @@
  * Those values are not meant to be modified by the user
  * @{
  */
-#define BOARD_IOID_KEY_LEFT       IOID_13
-#define BOARD_IOID_KEY_RIGHT      IOID_14
+#define BOARD_IOID_KEY_LEFT       IOID_7
+#define BOARD_IOID_KEY_RIGHT      IOID_8
 #define BOARD_KEY_LEFT            (1 << BOARD_IOID_KEY_LEFT)
 #define BOARD_KEY_RIGHT           (1 << BOARD_IOID_KEY_RIGHT)
 /** @} */
@@ -125,8 +107,8 @@
  * Those values are not meant to be modified by the user
  * @{
  */
-#define BOARD_IOID_SPI_MOSI       IOID_9
-#define BOARD_IOID_SPI_MISO       IOID_8
+#define BOARD_IOID_SPI_MOSI       IOID_UNUSED
+#define BOARD_IOID_SPI_MISO       IOID_UNUSED
 /** @} */
 /*---------------------------------------------------------------------------*/
 /**
@@ -135,9 +117,9 @@
  * Those values are not meant to be modified by the user
  * @{
  */
-#define BOARD_IOID_FLASH_CS       IOID_20
+#define BOARD_IOID_FLASH_CS       IOID_UNUSED
 #define BOARD_FLASH_CS            (1 << BOARD_IOID_FLASH_CS)
-#define BOARD_IOID_SPI_CLK_FLASH  IOID_10
+#define BOARD_IOID_SPI_CLK_FLASH  IOID_UNUSED
 /** @} */
 /*---------------------------------------------------------------------------*/
 /**
@@ -146,8 +128,8 @@
  * Those values are not meant to be modified by the user
  * @{
  */
-#define BOARD_IOID_SCL            IOID_4
-#define BOARD_IOID_SDA            IOID_5
+#define BOARD_IOID_SCL            IOID_UNUSED
+#define BOARD_IOID_SDA            IOID_UNUSED
 /** @} */
 /*---------------------------------------------------------------------------*/
 /**
@@ -178,28 +160,18 @@
  * Those values are not meant to be modified by the user
  * @{
  */
-#define BOARD_IOID_CS             IOID_11
-#define BOARD_IOID_TDO            IOID_16
-#define BOARD_IOID_TDI            IOID_17
-#define BOARD_IOID_DIO12          IOID_12
-#define BOARD_IOID_DIO15          IOID_15
-#define BOARD_IOID_DIO21          IOID_21
-#define BOARD_IOID_DIO22          IOID_22
-#define BOARD_IOID_DIO23          IOID_23
-#define BOARD_IOID_DIO24          IOID_24
-#define BOARD_IOID_DIO25          IOID_25
-#define BOARD_IOID_DIO26          IOID_26
-#define BOARD_IOID_DIO27          IOID_27
-#define BOARD_IOID_DIO28          IOID_28
-#define BOARD_IOID_DIO29          IOID_29
-#define BOARD_IOID_DIO30          IOID_30
+//#define BOARD_IOID_CS             IOID_7
+#define BOARD_IOID_TDO            IOID_3
+#define BOARD_IOID_TDI            IOID_4
+#define BOARD_IOID_DIO9           IOID_9
+
 /** @} */
 /*---------------------------------------------------------------------------*/
 /**
  * \name Device string used on startup
  * @{
  */
-#define BOARD_STRING "TI CC1310 LaunchPad"
+#define BOARD_STRING "CC1310 4x4 RSM"
 
 /** @} */
 /*---------------------------------------------------------------------------*/

Thank you very much.

  • It takes a while to setup GDB to debug Contiki. But I found a nice catch today. Here's the excerpt from cpu/cc26xx-cc13xx/dev/oscillators.c, func: oscillators_select_lf_xosc:

     /* Switch LF clock source to the LF XOSC if required */
      if(ti_lib_osc_clock_source_get(OSC_SRC_CLK_LF) != OSC_XOSC_LF) {
        ti_lib_osc_clock_source_set(OSC_SRC_CLK_LF, OSC_XOSC_LF);
    
        /* Wait for LF clock source to become XOSC_LF */
        while(ti_lib_osc_clock_source_get(OSC_SRC_CLK_LF) != OSC_XOSC_LF); // IT KEEP LOOPING HERE

    Seems like this procedure failed on 4x4... I don't know if this because we are using TCXO, package size incompatibilies, or else. Digging further on this one...

  • Do you use a TCXO for the 24 MHz clock or the 32 kHz clock?
  • We are using TXCO on 32kHz. Here's the schematic:

  • If you run a TI RTOS example on your HW, does it run correctly?
  • Hi Chen,

    Yes it does. It runs well on some TI examples on resource explorer. After debugging, I found that the code lock up during LF oscillators activation.

    excerp cpu/cc26xx-cc13xx/dev/oscillators.c, func: oscillators_select_lf_xosc:

     

    /* Switch LF clock source to the LF XOSC if required */
    
     if(ti_lib_osc_clock_source_get(OSC_SRC_CLK_LF) != OSC_XOSC_LF) {
    
       ti_lib_osc_clock_source_set(OSC_SRC_CLK_LF, OSC_XOSC_LF);
    
       /* Wait for LF clock source to become XOSC_LF */
    
       while(ti_lib_osc_clock_source_get(OSC_SRC_CLK_LF) != OSC_XOSC_LF); // IT KEEP LOOPING HERE

    Probably it's a hardware problem. Our TCXO implementation is not right. However, I can make contiki runs well by commenting this one:

    /*---------------------------------------------------------------------------*/
    /**
     * \brief Main function for CC26xx-based platforms
     *
     * The same main() is used for all supported boards
     */
    int
    main(void)
    {
      /* Enable flash cache and prefetch. */
     ti_lib_vims_mode_set(VIMS_BASE, VIMS_MODE_ENABLED);
     ti_lib_vims_configure(VIMS_BASE, true, true);
    
     ti_lib_int_master_disable();
    
      /* Set the LF XOSC as the LF system clock source */
     //..oscillators_select_lf_xosc();
    
      lpm_init();
    
      board_init();
    
      gpio_interrupt_init();

    If I set the SET_CCFG_MODE_CONF_SCLK_LF_OPTION to 0x2, the board perform unreliably. The timer most of the time triggered, but in some case (pretty often), it doesn't.

  • I'm also checking in the TCXO supply from LDO, the voltage level seems correct (1.789V) and I check the TCXO pulse on my scope, it also works well. Could it be CC1310 problem?
  • It sounds like the 32KHz oscillator is not able to start, this can be due to various HW issue. The most likely is assemble related.

    Regards,
    /TA
  • Could it be because the TCXO we used has nano swing feature?
  • A external 32 kHz clock should be connected to a DIO, not Q1.

    In the CCFG.c file you should set:
    #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION 0x1 // External LF clock
    #define SET_CCFG_EXT_LF_CLK_DIO 0x01 // DIO number if using external LF clock

    This is not well documented, I'm going to add a ticket to change the clock section of the TRM.

    The hardware is designed to detect if a crystal connected starts to swing but doesn't have circuitry to detect if a TCXO has correct swing.
  • I see, so in order to use TCXO, we should configure it as external clock, not as crystal replacement for LF XOSC, right? Great to know now since we just perform sampling production and only produce few. Thank you very much for your great help!

  • Yes. This should be possible to test on the board you have by cutting the line to Q1 and solder on a thin wire to a DIO.
  • It's very hard to do, since the module is very small. And the TCXO is CSP package. 

    I manage to test the external clock functionaity using off the shelf DS3231. It has 32kHz pulse output. And it works pretty well so far. Anyway, since it doesn't convenient to add more RTC chip, at this moment I'm using internal LF RC OSC. I found it works pretty well on Rev 2.1.