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.

CCS/LP-CC2652RB: cc2652

Part Number: LP-CC2652RB
Other Parts Discussed in Thread: SYSCONFIG

Tool/software: Code Composer Studio

Hi all,

  can somebody please help me.

I managed to run the project Zero.

now I want to transfer the code to a custom PCB, for starters I have to change the LED Pins and there the trouble starts....

I used the syscfg utility to change the PIN from IO_6 to IO_0 , leaving the name as is!

compiling......

Error: CONFIG_PIN_RLED not defined

I change the Pin back to IO_6

compiling......

Error: CONFIG_PIN_RLED not defined

Ti_drivers_config.h

has got the defines for the LEDs

#define CONFIG_PIN_GLED    0x00000007

#define CONFIG_PIN_4    0x00000006

but the sysconfig utility shows the name as

CONFIG_GPIO_RLED

CONFIG_GPIO_GLED

it says the file Ti_drivers_config.h is created by the SW, but where the ... does it get the  #define CONFIG_GPIO_GLED from???

best regards

Kurt

  • Hi,

    In project_zero, SysConfig generates the code to define the symbols CONFIG_GPIO_RLED, CONFIG_GPIO_GLED, CONFIG_PIN_RLED, CONFIG_PIN_GLED for you. These symbols are all defined in ti_drivers_config.h.

    FYI, CONFIG_GPIO_RLED and CONFIG_GPIO_GLED are holding an index that can be recognized by the GPIO driver. While CONFIG_PIN_RLED and CONFIG_PIN_GLED are holding a pin number (corresponding to DIO6 and DIO7).

    I hope this will help,

    Regards,

  • Hi Clement,

     thanks for your email.

    but it does not explain where the pins are defined!

    the ti_driver_config.h is created via SW - no manual editing!

    I assume you name the pins with the GUI to modify the project_zero.syscfg

    in the ti_driver_config.h

    the following block is defined (whis is ok - eg I understand!)

    /*
     *  ======== GPIO ========
     */

    /* DIO13, LaunchPad Button BTN-1 (Left) */
    extern const uint_least8_t          CONFIG_GPIO_BTN1_CONST;
    #define CONFIG_GPIO_BTN1            0
    /* DIO14, LaunchPad Button BTN-2 (Right) */
    extern const uint_least8_t          CONFIG_GPIO_BTN2_CONST;
    #define CONFIG_GPIO_BTN2            1
    /* DIO6, LaunchPad LED Red */
    extern const uint_least8_t          RED_LED_CONST;
    #define RED_LED                     2                                                         -> I renamed that PIN!
    /* DIO7, LaunchPad LED Green */
    extern const uint_least8_t          CONFIG_GPIO_GLED_CONST;
    #define CONFIG_GPIO_GLED            3
    /* DIO20, MX25R8035F SPI Flash Slave Select */
    extern const uint_least8_t          CONFIG_GPIO_0_CONST;
    #define CONFIG_GPIO_0               4

    further down the file you find the following define block

    /* XDS110 UART, Parent Signal: CONFIG_DISPLAY_UART TX, (DIO3) */
    #define CONFIG_PIN_UART_TX    0x00000003
    /* XDS110 UART, Parent Signal: CONFIG_DISPLAY_UART RX, (DIO2) */
    #define CONFIG_PIN_UART_RX    0x00000002
    /* LaunchPad Button BTN-1 (Left), Parent Signal: CONFIG_GPIO_BTN1 GPIO Pin, (DIO13) */
    #define CONFIG_PIN_BTN1    0x0000000d
    /* LaunchPad Button BTN-2 (Right), Parent Signal: CONFIG_GPIO_BTN2 GPIO Pin, (DIO14) */
    #define CONFIG_PIN_BTN2    0x0000000e
    /* LaunchPad LED Red, Parent Signal: RED_LED GPIO Pin, (DIO6) */
    #define CONFIG_PIN_4    0x00000006                                                                                          -> that's the Pin I renamed, why is it CONFIG_PIN_4??? where does it get the name from?
    /* LaunchPad LED Green, Parent Signal: CONFIG_GPIO_GLED GPIO Pin, (DIO7) */
    #define CONFIG_PIN_GLED    0x00000007
    /* MX25R8035F SPI Flash Slave Select, Parent Signal: CONFIG_GPIO_0 GPIO Pin, (DIO20) */
    #define CONFIG_PIN_0    0x00000014
    /* LaunchPad SPI Bus, Parent Signal: CONFIG_SPI_0 SCLK, (DIO10) */
    #define CONFIG_PIN_1    0x0000000a
    /* LaunchPad SPI Bus, Parent Signal: CONFIG_SPI_0 MISO, (DIO8) */
    #define CONFIG_PIN_2    0x00000008
    /* LaunchPad SPI Bus, Parent Signal: CONFIG_SPI_0 MOSI, (DIO9) */
    #define CONFIG_PIN_3    0x00000009

    As the sw looks for "CONFIG_PIN_RLED"it does not compile! 

    and I cannot change the name from CONFIG_PIN_4 to CONFIG_PIN_RLED as the file is automatic generated!

    please explain where the pins are defined!!

    thanks very much

    best regards

    Kurt

  • Hi Kurt,

    The symbol's name is generated based on the GPIO name selected in SysConfig.

    If needed, in SysConfig, you can click the small "?" to get more details.

    Regards,