WICED_ROUTE_DEBUG_TO_HCI_UART

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AcSp_4798551
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

DEar Sirs,

I am using CYBT-413055-EVAL board. I understood that there are two serial ports HCI UART & PUART.

in APPLICATION_START() I can assign the TRACE output route as given by instrunction:

#if defined WICED_BT_TRACE_ENABLE || defined HCI_TRACE_OVER_TRANSPORT

    wiced_transport_init(&transport_cfg);

    // create special pool for sending data to the MCU

    host_trans_pool = wiced_transport_create_buffer_pool(TRANS_UART_BUFFER_SIZE, IAP2_TRANS_MAX_BUFFERS);

    // Set the debug uart as WICED_ROUTE_DEBUG_NONE to get rid of prints

    // wiced_set_debug_uart(WICED_ROUTE_DEBUG_NONE);

    // Set to PUART to see traces on peripheral uart(puart)

    //wiced_set_debug_uart( WICED_ROUTE_DEBUG_TO_PUART );

    // Set to HCI to see traces on HCI uart - default if no call to wiced_set_debug_uart()

    wiced_set_debug_uart( WICED_ROUTE_DEBUG_TO_HCI_UART );

#endif

WICED_ROUTE_DEBUG_TO_PUART works !

WICED_ROUTE_DEBUG_TO_HCI_UART does not give me any output !

Since I need PUART for my application I need to get HCI_UART to run for the TRACE output.

I see in the DEVICE CONFIGURATOR that UART 1 (HCI UART) in the peripherals list is disabled.

If I enable I cannot assign the pins 23-26 (UART_...) since they are DEDICATED.

For UART 2 (PUART) I am using  P4 & P33 as given by the EVAL board config.

How can I get HCI_UART working for TRACE output ?

Regards

Achim

0 Likes
1 Solution

Hi AcSp_4798551 ,

Client Control is not used for debug prints. It is used as a host app for WICED HCI communication.

I hope your requirement is to use HCI UART for debug purpose similar to PUART with which you can see debug prints.

So do not use or open HCI UART com port on client control app.

You can use any other serial terminal emulator. I have not used HTerm. I am using Teraterm .

1. Which Console/Terminal software do you intend to use?

A. Please try with Teraterm

2. What is the correct setup for the connection?

A.

- Connect the USB of EVAL board . First program the module with debug route to HCI UART

- after programming open teraterm and connect the serial port to HCI UART com port . Select baud rate as in the application

- do not press reset after connecting HCI uart com port.

You should able to see subsequent debug prints from now.

Regards,

Anjana

View solution in original post

0 Likes
3 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi AcSp_4798551 ,

Please note the below points to use HCI UART for debug prints:

-    wiced_set_debug_uart( WICED_ROUTE_DEBUG_TO_HCI_UART ); - This you have already done

- After programming the device , open the uart console on HCI UART com port

- Make sure you are using the same baud rate as the one configured in transport_cfg

- Once you download the application and open HCI UART com port for debug prints, do not press hard reset on the EVAL board. If you press reset , then device will enter into recovery mode. And the application will stop running.

Similar threads:

Re: How to use HCI TRACE of CYBT-213043-MESH kit

Re: How can I send data through HCI UART without using ClienControlMesh APP?

Regards,

Anjana

0 Likes

Thanks Anjana for the quick answer.

I am not sure which "uart console" you are using. I tried with the Client Control with no success.

I also tied HTerm as a terminal software which works fine with PUART (over USB and directly) but not with HCI UART.

Using "Serial Tools" on MAC and switching on RTS it get a trace flow similar as I expect to get from PUART tracing.

But switching CTS Flow Control on HTerm does only bring a result when playing around with DTR and RTS

Which Console/Terminal software do you intend to use?

What is the correct setup for the connection?

Regards

Achim

0 Likes

Hi AcSp_4798551 ,

Client Control is not used for debug prints. It is used as a host app for WICED HCI communication.

I hope your requirement is to use HCI UART for debug purpose similar to PUART with which you can see debug prints.

So do not use or open HCI UART com port on client control app.

You can use any other serial terminal emulator. I have not used HTerm. I am using Teraterm .

1. Which Console/Terminal software do you intend to use?

A. Please try with Teraterm

2. What is the correct setup for the connection?

A.

- Connect the USB of EVAL board . First program the module with debug route to HCI UART

- after programming open teraterm and connect the serial port to HCI UART com port . Select baud rate as in the application

- do not press reset after connecting HCI uart com port.

You should able to see subsequent debug prints from now.

Regards,

Anjana

0 Likes