Debug Logger

nRF5 SDK v9.0.0

nRF51 SDK v9.0.0

Enables debug logs/ trace over UART. More...

Macros

#define app_trace_log printf
Log debug messages. More...

Functions

void app_trace_init (void)
Module Initialization. More...
void app_trace_dump (uint8_t *p_buffer, uint32_t len)
Dump auxiliary byte buffer to the debug trace. More...

Detailed Description

Enables debug logs/ trace over UART.

Enables debug logs/ trace over UART. Tracing is enabled only if ENABLE_DEBUG_LOG_SUPPORT is defined in the project.

Macro Definition Documentation

#define app_trace_log   printf

Log debug messages.

This API logs messages over UART. The module must be initialized before using this API.

Note
Though this is currently a macro, it should be used used and treated as function.

Function Documentation

void app_trace_dump ( uint8_t * p_buffer ,
uint32_t len
)

Dump auxiliary byte buffer to the debug trace.

This API logs messages over UART. The module must be initialized before using this API.

Parameters
[in] p_buffer Buffer to be dumped on the debug trace.
[in] len Size of the buffer.
void app_trace_init ( void )

Module Initialization.

Initializes the module to use UART as trace output.

Warning
This function will configure UART using default board configuration. Do not call this function if UART is configured from a higher level in the application.

Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone .