![]() |
AIROC™ BTSDK v4.9 - Documentation | |||
This file provided functionality to provide debug traces. More...
Macros | |
| #define | WICED_SHIM_TRACE_ENABLE |
| #define | WICED_SHIM_TRACE(...) BTU_trace_debug(__VA_ARGS__) |
| #define | wiced_printf(p1, p2,...) BTU_trace_debug(__VA_ARGS__) |
Enumerations | |
| enum | wiced_debug_uart_types_t { WICED_ROUTE_DEBUG_NONE = 0x00, WICED_ROUTE_DEBUG_TO_WICED_UART, WICED_ROUTE_DEBUG_TO_HCI_UART, WICED_ROUTE_DEBUG_TO_DBG_UART, WICED_ROUTE_DEBUG_TO_PUART, WICED_ROUTE_DEBUG_TO_SCB_UART } |
| Debug UARTs. More... | |
Functions | |
| void | wiced_bt_trace_enable (void) |
| void | wiced_set_debug_uart (wiced_debug_uart_types_t uart) |
| Function wiced_set_debug_uart. More... | |
| void | wiced_set_debug_uart_baudrate (uint32_t baudrate) |
| Function wiced_set_debug_uart_baudrate. More... | |
| void | wiced_print_trace (char *p_trace_buf, int trace_buf_len, wiced_bt_trace_type_t trace_type) |
| void | wiced_trace_array (const uint8_t *p_array, uint16_t len) |
| wiced_debug_uart_types_t | wiced_get_debug_uart (void) |
| void | BTU_trace_debug (const char *p_fmt,...) |
| void | BTU_trace_error (const char *p_fmt,...) |
| int | BTU_sprintf (char *buf, const char *fmt,...) |
This file provided functionality to provide debug traces.
Debug UARTs.
Used when calling wiced_set_debug_uart.
| Enumerator | |
|---|---|
| WICED_ROUTE_DEBUG_NONE |
No traces. |
| WICED_ROUTE_DEBUG_TO_WICED_UART |
send debug strings in formatted AIROC HCI messages over HCI UART to ClientControl or MCU |
| WICED_ROUTE_DEBUG_TO_HCI_UART |
send debug strings as plain text to HCI UART, used by default if wiced_set_debug_uart() not called |
| WICED_ROUTE_DEBUG_TO_DBG_UART |
Deprecated. |
| WICED_ROUTE_DEBUG_TO_PUART |
send debug strings as plain text to the peripheral uart (PUART) |
| WICED_ROUTE_DEBUG_TO_SCB_UART |
send debug strings as plain text to the peripheral SCB uart |
| void wiced_set_debug_uart | ( | wiced_debug_uart_types_t | uart | ) |
Function wiced_set_debug_uart.
To specify the UART to be used for the debug traces
When configure the BT TRACE route to SCB UART, please following the steps below:
1. Set debug trace route to SCB UART:
wiced_set_debug_uart(WICED_ROUTE_DEBUG_TO_SCB_UART);
2. Select GPIO for SCB UART RX and TX:
SCB0 only use WICED_GPIO_15 and WICED_GPIO_14
wiced_hal_gpio_select_function(WICED_GPIO_14, WICED_ARM_SCB0_UART_RXD);
wiced_hal_gpio_select_function(WICED_GPIO_15, WICED_ARM_SCB0_UART_TXD);
SCB1 only use WICED_GPIO_19 and WICED_GPIO_18
wiced_hal_gpio_select_function(WICED_GPIO_18, WICED_ARM_SCB1_UART_RXD);
wiced_hal_gpio_select_function(WICED_GPIO_19, WICED_ARM_SCB1_UART_TXD);
3. Set ARM GPIO TX as output:
SCB0:
wiced_hal_gpio_configure_pin(WICED_GPIO_15, GPIO_OUTPUT_ENABLE, 0);
SCB1:
wiced_hal_gpio_configure_pin(WICED_GPIO_19, GPIO_OUTPUT_ENABLE, 0);
4. Initialize and configure the SCB uart:
wiced_hal_puart_init();
wiced_hal_puart_flow_off();
wiced_hal_puart_enable_tx();
| [in] | uart | : UART to be used |
| void wiced_set_debug_uart_baudrate | ( | uint32_t | baudrate | ) |
Function wiced_set_debug_uart_baudrate.
It configures the value for wiced_set_debug_uart.
| [in] | baudrate | : baudrate to be used |