I would like to use the HCI for debug and I've seen many posts in the past discussing the same thing, but they are confusing.
1) On the one hand there is a document MMPWICED-Smart-QSG203-R.pdf (and posts on this site) which suggest calling BLE_APP_ENABLE_TRACING_ON_HCI_UART will work, as long as the UART_RX pin is disconnected once the application is running. The procedure is given in pages 19/20 of the above document (Viewing Traces from the WICED Smart Tag).
2) In WICED-Smart-Hardware-Interfaces.pdf, page 16 says:
The BCM20732 has two UART interfaces. One is the factory or HCI UART that is used for programming and factory testing. The other is the peripheral UART, which is available for application use to output debug messages/tracing or to interface with a peripheral device/microcontroller. The following sections describe the peripheral UART only. The HCI UART is not available for application use.
The two seem to contradict each other. Does anyone know?
The HCI UART for all intents and purposes is a programming interface only. You can also route debug traces to the HCI UART per the instructions in the WICED Smart Quick Start Guide (SDK 2.x and TAG4 Board), but again, if you application requires some form of UART access, only the peripheral UART is available to the application.
Thanks for the answer. However I don't think I fully understood. While you said that "You can also route debug traces to the HCI UART per the instructions .." you also said "if you application requires some form of UART access, only the peripheral UART is available to the application". Could you explain a little on what the difference is that you are making?
i.e. when can we use the debug traces using HCI UART and when will we necessarily have to use P UART?
Is it that with HCI UART we can only output debug strings / traces whereas for a full-fledged bi-directional data transfer then P UART is the only option?
If you confirm this, thanks, I've understood fully.