8 Replies Latest reply on Jan 10, 2019 11:16 PM by SheetalJ_96

    20719 disable HCI UART

    JeHu_3414236

      After I program my application, I want to disable HCI UART because I don't have any debug traces to print.  What should be the line state for CTS?  If it is low, the app cannot run after reset because I assume it will be in recovery mode.  If I leave it high, the app will run for maybe 10s then stop.  Is the app trying to access the HCI UART?  What code changes should I make in the app to disable HCI UART?  I tried not calling wiced_transport_init() but it doesn't work.  I am using the 20719 Q40EVB but the HCI UART is connected to my own test circuit and not the FTDI output.

        • 1. Re: 20719 disable HCI UART
          SheetalJ_96

          Hi JeHu_3414236,

           

          HCI UART is only used to program the device. PUART is used for further transmission of data.

          You can route the debug traces to PUART or no debug traces using WICED_ROUTE_DEBUG_TO_PUART or WICED_ROUTE_DEBUG_NONE. You can use API wiced_set_debug_uart().

          1 of 1 people found this helpful
          • 2. Re: 20719 disable HCI UART
            JeHu_3414236

            I set WICED_ROUTE_DEBUG_NONE and it still doesn't work when I keep CTS high on HCI_UART.  The app will run for some time then stop.  I can only get it to work by setting CTS high for 100ms during power up/reset, then setting CTS low.  I am disabling UART by not defining these flags from a new project generated by WICED Studio:

            C_FLAGS += -DWICED_BT_TRACE_ENABLE

            # If defined, HCI traces are sent over transport/WICED HCI interface

            C_FLAGS += -DHCI_TRACE_OVER_TRANSPORT

             

            This is my transport config:

            wiced_transport_cfg_t transport_cfg =

            {

                WICED_TRANSPORT_UART,              /**< Wiced transport type. */

                {

                    WICED_TRANSPORT_UART_HCI_MODE, /**<  UART mode, HCI or Raw */

                    115200          /**<  UART baud rate */

                },

                {

                    TRANS_UART_BUFFER_SIZE,        /**<  Rx Buffer Size */

                    TRANS_UART_BUFFER_COUNT        /**<  Rx Buffer Count */

                },

                NULL,                              /**< Wiced transport status handler.*/

                NULL,        /**< Wiced transport receive data handler. */

                NULL                               /**< Wiced transport tx complete callback. */

            };

            • 3. Re: 20719 disable HCI UART
              AnjanaM_61

              Hi,

               

              Could you please confirm why you want to disable the HCI UART ?

              If only to disable the debug prints, you can make use of WICED_ROUTE_DEBUG_NONE as mentioned before.

              After that you do not have to change any pin states.

               

              Thanks,

              Anjana

              1 of 1 people found this helpful
              • 4. Re: 20719 disable HCI UART
                JoJo_2624151

                The DEBUG is PUART

                Don't confuse

                • 5. Re: 20719 disable HCI UART
                  JeHu_3414236

                  I don't want any activity on HCI UART or enable debug traces.  I only use HCI UART to program the application during production.  Can you confirm this is the correct setup?  Thanks.

                   

                  CTS always high

                  call wiced_set_debug_uart( WICED_ROUTE_DEBUG_NONE )

                  do not call wiced_bt_dev_register_hci_trace()

                  do not set makefile flag WICED_BT_TRACE_ENABLE

                  do not set makefile flag HCI_TRACE_OVER_TRANSPORT

                  set the sleep config sleep_mode to WICED_SLEEP_MODE_NO_TRANSPORT

                  • 6. Re: 20719 disable HCI UART
                    SheetalJ_96

                    Hi JeHu_3414236,

                     

                    You will have to call wiced_bt_dev_register_hci_trace() bcoz HCI traces are the communication between host and controller, HCI commands and their response. So it is necessary to define it. You can check the comments about wiced_transport_send_hci_trace() for the same.

                    Remaining configuration looks good.

                    1 of 1 people found this helpful
                    • 7. Re: 20719 disable HCI UART
                      JeHu_3414236

                      Thanks.  When I create a new project it adds a precompiler define to

                      enable/disable HCI trace.  In what situation will I need to disable HCI

                      trace?

                      • 8. Re: 20719 disable HCI UART
                        SheetalJ_96

                        When you dont want any communication using HCI commands, you can disable HCI traces.

                        I do not think your code or functionality will get affected if you keep the HCI UART enabled. It is just for programming the chip and allowing the HCI communication between host and controller.