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.

CC2652R7: Remove NPI Interface from BLE Peripheral Example

Part Number: CC2652R7
Other Parts Discussed in Thread: SYSCONFIG, SIMPLELINK-CC13XX-CC26XX-SDK

Hi,

I'm using BLE peripheral example and I want to remove the NPI related code, so I excluded the folder from building but build is failing. And I saw -DNPI_USE_UART in ti_ble_app_config.opt in the generated folder. How do I remove the NPI_USE_UART from sysconfig ? Also anything else I have to do to remove the NPI ? I see CONFIG_GPIO_BTN1 and CONFIG_GPIO_BTN2 getting defined because of NPI. Also is there any connection between POWER_SAVING macro and NPI ? Please help me on this.

Regards,

Madhusudhan

  • Hi Madhusudhan,

    The NPI is not used in the simple peripheral example project by default, therefore it should be possible to exclude the NPI folder from the project build without any issues.  I've confirmed this with v6.10 of the SIMPLELINK-CC13XX-CC26XX-SDK.  The only way to remove NPI_USE_UART from SysConfig is by editing source\ti\ble5stack\.meta\templates\ble_app_config.opt.xdt and re-importing the example into CCS, but as no NPI APIs are used by the simple peripheral application this definition is inconsequential.  CONFIG_GPIO_BTN1/2 are used for the two-button menu (which uses UART through the Display TI driver) and there is no correlation between the NPI and POWER_SAVING.

    Regards,
    Ryan

  • Hi Ryan,

    Even when I remove the NPI folder and uncheck the "Two button menu" option from sysconfig, CONFIG_GPIO_BTN1/2 are getting added in the generated ti_driver_config files.

    Regards,

    Madhusudhan

  • Even if they are initialized in ti_drivers_config.c/h you can choose to not use them in your application.  However it is possible to completely remove them by deleting the following from simple_peripheral.syscfg using the text editor:

    var gpio0 = GPIO.addInstance();
    gpio0.$hardware = system.deviceData.board.components.BUTTON0;
    gpio0.mode = "Input";
    gpio0.$name = "CONFIG_GPIO_BTN1";
    
    var gpio1 = GPIO.addInstance();
    gpio1.$hardware = system.deviceData.board.components.BUTTON1;
    gpio1.mode = "Input";
    gpio1.$name = "CONFIG_GPIO_BTN2";
    

    Regards,
    Ryan