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.

HostTestApp on CC2540: Control GPIO over HCI interface(USB/UART)

Other Parts Discussed in Thread: CC2540

Hi Sir,

I am developping a project based on hostTestApp with CC2540. An external MCU is used to control the BLE SOC over HCI interface(UART). There are two LEDs used to indicate the system state. However, becasue of the limit number GPIOs on MCU side, we want to put the LEDs on BLE SOC side. Then according to the "TI_BLE_Vendor_Specific_HCI_Guide",we do not find the command to do this(control a GPIO).  Although there are some other command like "HCI_EXT_AdvEventNoticeCmd " and  "HCI_EXT_ConnEventNoticeCmd" which can be used to trigger a task with such event,we need to more states on LEDs.

Then what should we do for this?

Another question, for HCI over UART, is it more stable for UART with CTS/RTS compared to the 3-wire connections(UART_TX/RX/GND)?

  • Hi,

    By default, there are no HCI commands that can be used for this. HCI commands are used to control a BLE chip form a Host chip and host chip is supposed to contain all the required peripheral like LED & Buttons.

    You need to define your own class of commands for this and modify the npi_uart.c for this set of commands to filter them.

    You can operate in both modes. But While developing initially it will be easy to disable Flow Control and start and later you can move forward to Flow control enable. I don think there is any stability issue with both Flow Control ON or OFF.

    Regards,
    Arun
  • Hi Arun,
    Thanks for your answer. It is a good idea to add a specific HCI command according to you suggestion. I should say TI's solution always has the best flexibility.

    Regards,
    Daniel
  • Hi,

    Thank you for your suggestion.

    As I mentioned earlier HCI commands are used to control a BLE chip from a Host chip to enable full BLE functionality over UART/SPI etc. Adding system peripheral control commands with HCI would mean HCI commands would loose its modular aspecct and purpose. Individuals who want them can go ahead and modify them as per their wish.

    Regards,
    Arun