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.

CC2642R: OAD Resources and sample projects for latest SDK 6.xx

Part Number: CC2642R

Hi,

I browsed the  docs https://software-dl.ti.com/simplelink/esd/simplelink_cc13xx_cc26xx_sdk/6.20.00.29/exports/docs/ble5stack/ble_user_guide/html/ble-stack-5.x-guide/ble5-oad-index-cc13xx_cc26xx.html

I cant seem the find any related sample application, looking specifically for BIM and "persistent app" to build on for on chip OAD.

I have gotten the OAD working in SKD 3.30, but I was hoping instead of porting the BIM and the persistent app to the latest SDK I can get started with the new examples, and I can't seem to find the BIM app in the SDK f

Can someone provide some instructions and maybe a walk through, URL to examples docs, anything OAD examples related will help.

Thanks,

Ivan

  • Hi Ivan,

    Here are online links to bim_onchip and persistent_app, located locally at simplelink_cc13xx_cc26xx_sdk_6_40_00_13\examples\nortos\CC26X2R1_LAUNCHXL\bim\bim_onchip and simplelink_cc13xx_cc26xx_sdk_6_40_00_13\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\persistent_app respectively.  I also recommend that you reference the BLE OAD SimpleLink Academy Labs

    Regards,
    Ryan

  • Ryan,

    thanks for your reply - this is very helpful!!!

    Regards,

    Ivan Slavov

  • Ryan,

    I just wanted to point out, in the simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang sample project in SDK 6.20.00.29, there are compile errors, out of the box. Errors are related to the LEDs, please see below:

    Do you know if this is fixed in the later SDK 6.40?

    thanks,

    Ivan

    Description	Resource	Path	Location	Type
    use of undeclared identifier 'CONFIG_TI_DRIVERS_LED_COUNT'	board_key.c	/simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang/Application	line 82	C/C++ Problem
    use of undeclared identifier 'CONFIG_LED_1'	board_key.c	/simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang/Application	line 158	C/C++ Problem
    use of undeclared identifier 'CONFIG_LED_1'	board_key.c	/simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang/Application	line 159	C/C++ Problem
    use of undeclared identifier 'CONFIG_LED_1'	board_key.c	/simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang/Application	line 214	C/C++ Problem
    use of undeclared identifier 'CONFIG_LED_0'	board_key.c	/simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang/Application	line 157	C/C++ Problem
    use of undeclared identifier 'CONFIG_LED_0'	board_key.c	/simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang/Application	line 159	C/C++ Problem
    use of undeclared identifier 'CONFIG_LED_0'	board_key.c	/simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang/Application	line 210	C/C++ Problem
    

  • I have verified that simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos7_ticlang does not produce compile errors out of the box.  My board_key.c also does not include the CONFIG_TI_DRIVERS_LED_COUNT and CONFIG_LED_* identifiers mentioned.  Since board_key.c is a linked file pointing to simplelink_cc13xx_cc26xx_sdk_6_20_00_29\source\ti\ble5stack\common\cc26xx I assume you have modified this file at some point in the past.  I recommend reverting to its original condition.

    Regards,
    Ryan

  • Ryan,

    Thank you, I will try to revert to original.

    I installed the SDK with the windows installer exe file. Do you have a git link to the examples so i can pull just that file?

    thank you,

    Ivan

  • I can provide them here (these are from SDK v6.20):

    3010.board_key.c
    /******************************************************************************
    
     @file  board_key.c
    
     @brief This file contains the interface to the SRF06EB Key Service.
    
     Group: WCS, BTS
     Target Device: cc13xx_cc26xx
    
     ******************************************************************************
     
     Copyright (c) 2014-2022, Texas Instruments Incorporated
     All rights reserved.
    
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions
     are met:
    
     *  Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
    
     *  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.
    
     *  Neither the name of Texas Instruments Incorporated 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 OWNER 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.
    
     ******************************************************************************
     
     
     *****************************************************************************/
    
    /*********************************************************************
     * INCLUDES
     */
    #include <stdbool.h>
    
    #ifdef FREERTOS
    #include <ti/drivers/dpl/HwiP.h>
    #include <ti/drivers/dpl/SwiP.h>
    #else
    #include <ti/sysbios/knl/Clock.h>
    #include <ti/sysbios/knl/Semaphore.h>
    #include <ti/sysbios/knl/Queue.h>
    #include <ti/sysbios/family/arm/m3/Hwi.h>
    #endif
    
    #include <ti/drivers/GPIO.h>
    #include <ti/drivers/gpio/GPIOCC26XX.h>
    
    #ifdef USE_ICALL
    #include <icall.h>
    #endif
    
    #include <inc/hw_ints.h>
    
    #include "util.h"
    #include "board_key.h"
    #include <ti_drivers_config.h>
    
    #ifdef FREERTOS
    typedef void* UArg;
    #endif
    
    /*********************************************************************
     * TYPEDEFS
     */
    
    /*********************************************************************
     * LOCAL FUNCTIONS
     */
    static void Board_keyChangeHandler(UArg a0);
    static void GPIO_Board_keyCallback(uint_least8_t index);
    /*******************************************************************************
     * EXTERNAL VARIABLES
     */
    
    /*********************************************************************
     * LOCAL VARIABLES
     */
    
    // Value of keys Pressed
    static uint8_t keysPressed;
    
    // Key debounce clock
    static Clock_Struct keyChangeClock;
    
    // Pointer to application callback
    keysPressedCB_t appKeyChangeHandler = NULL;
    
    // Memory for the GPIO module to construct a Hwi
    #ifdef FREERTOS
    HwiP_Struct callbackHwiKeys;
    #else
    Hwi_Struct callbackHwiKeys;
    #endif
    
    /*********************************************************************
     * PUBLIC FUNCTIONS
     */
    /*********************************************************************
     * @fn      Board_initKeys
     *
     * @brief   Enable interrupts for keys on GPIOs.
     *
     * @param   appKeyCB - application key pressed callback
     *
     * @return  none
     */
    void Board_initKeys(keysPressedCB_t appKeyCB)
    {
      // Initialize GPIO
      GPIO_setConfig(CONFIG_GPIO_BTN1, GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_FALLING);
      GPIO_setConfig(CONFIG_GPIO_BTN2, GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_FALLING);
      // Set callback function
      GPIO_setCallback(CONFIG_GPIO_BTN1, GPIO_Board_keyCallback);
      GPIO_setCallback(CONFIG_GPIO_BTN2, GPIO_Board_keyCallback);
      // Enable interrupt
      GPIO_enableInt(CONFIG_GPIO_BTN1);
      GPIO_enableInt(CONFIG_GPIO_BTN2);
    
      // Setup keycallback for keys
      Util_constructClock(&keyChangeClock, Board_keyChangeHandler,
                          KEY_DEBOUNCE_TIMEOUT, 0, false, 0);
    
      // Set the application callback
      appKeyChangeHandler = appKeyCB;
    #ifdef POWER_SAVING
      //Enable wakeup - store current configure in temporary variable and update pinConfig
      GPIO_PinConfig currConfig;
      GPIO_getConfig(CONFIG_GPIO_BTN1, &currConfig);
      GPIO_setConfig(CONFIG_GPIO_BTN1, currConfig | GPIO_CFG_STANDBY_WAKE_ON);
      GPIO_setConfig(CONFIG_GPIO_BTN2, currConfig | GPIO_CFG_STANDBY_WAKE_ON);
    #endif
    }
    
    /*********************************************************************
     * @fn      GPIO_Board_keyCallback
     *
     * @brief   Interrupt handler for Keys for GPIO++ module
     *
     * @param   none
     *
     * @return  none
     */
    static void GPIO_Board_keyCallback(uint_least8_t index)
    {
      keysPressed = 0;
      if ( GPIO_read(CONFIG_GPIO_BTN1) == 0 )
      {
        keysPressed |= KEY_LEFT;
      }
      if ( GPIO_read(CONFIG_GPIO_BTN2) == 0 )
      {
        keysPressed |= KEY_RIGHT;
      }
      Util_startClock(&keyChangeClock);
    }
    
    /*********************************************************************
     * @fn      Board_keyChangeHandler
     *
     * @brief   Handler for key change
     *
     * @param   UArg a0 - ignored
     *
     * @return  none
     */
    static void Board_keyChangeHandler(UArg a0)
    {
      if (appKeyChangeHandler != NULL)
      {
        // Notify the application
        (*appKeyChangeHandler)(keysPressed);
      }
    }
    /*********************************************************************
    *********************************************************************/
    
    board_key.h

    Regards,
    Ryan

  • thank you, Ryan! I could compile.

    I must have modified my board.c and. h files. Appreciate your help!

    Thanks,

    Ivan