![]() |
![]() |
PRELIMINARY LogSinkTraceLPF3 interface
WARNING These APIs are PRELIMINARY, and subject to change in the next few months.
The LogSinkTraceLPF3 module is a sink that can be used in conjunction with the Log.h API. The API defined in this file should not be used directly, but is made available to the Logging framework and used as a transport layer for Log.h
To use the LogSinkTraceLPF3 sink, ensure that the correct library for your device is linked in and include this header file as follows:
Additionally, LogSinkTraceLPF3_init must be called before LogSinkTraceLPF3 can be used. It is called from Board_init() and thus can only be called if SysConfig is used and the LogSinkTraceLPF3 module is enabled.
This module implements one function that is required by the Log API:
Whenever a log-statement is invoked, that uses LogSinkTraceLPF3 as its sink, the function above is ultimately invoked.
Note: buf(const Log_Module *handle, uint32_t header, uint32_t headerPtr, uint8_t *data, size_t size) is not implemented due to hardware limitations with this sink.
LogSinkTraceLPF3 is a sink/transport layer that is able to output log-statements over the tracer. The tracer is a hardware module inside the radio core which can extract logs at high speed. LogSinkTraceLPF3 uses the tracer to stream data out onto a user-selectable pin. The frequency of the data stream is set by the RF tracer prescaler which divides the internal 24 MHz clock. Hardware and software needed to decode the data stream is currently only available through TI.
LogSinkTraceLPF3 uses certain channels for different purposes. Separate channels are used for data transfer, time synchronization, etc. Channel 1 is used for logs inside the CPU. The other channels are used by the internal parts of the radio.
Timestamps are automatically generated internally by the tracer hardware inside the radio core. A synchronization timestamp is sent over the tracer pin when a log statement is sent. The timestamp resolution is fixed to 0.5 us with a max range of 32 ms.
The tracer supports a maximum of four 16bit parameters inside each log statement. If using two parameters or less,
#include <stdint.h>#include <ti/log/Log.h>#include <ti/devices/DeviceFamily.h>#include <DeviceFamily_constructPath(inc/hw_lrfdtrc.h)>
Go to the source code of this file.
Data Structures | |
| struct | LogSinkTraceLPF3_Config |
| LogSinkTraceLPF3 global configuration. More... | |
Macros | |
| #define | LogSinkTraceLPF3_CONFIG_CHANNELS_CPU_ONLY LRFDTRC_CFG_CH1EN_NORM | LRFDTRC_CFG_CH2EN_OFF | LRFDTRC_CFG_CH3EN_OFF |
| #define | LogSinkTraceLPF3_CONFIG_CHANNELS_RADIO_ONLY LRFDTRC_CFG_CH1EN_OFF | LRFDTRC_CFG_CH2EN_TOPSM | LRFDTRC_CFG_CH3EN_TOPSM |
| #define | LogSinkTraceLPF3_CONFIG_CHANNELS_CPU_RADIO LRFDTRC_CFG_CH1EN_NORM | LRFDTRC_CFG_CH2EN_TOPSM | LRFDTRC_CFG_CH3EN_TOPSM |
| #define | LogSinkTraceLPF3_CONFIG_TIMESTAMP_ENABLED LRFDTRC_CFG_TSEN_ON |
| #define | LogSinkTraceLPF3_CONFIG_TIMESTAMP_DISABLED LRFDTRC_CFG_TSEN_OFF |
| #define | LogSinkTraceLPF3_CONFIG_PRESCALER_DIV1 LRFDTRC_CFG_PRESCAL_DIV1 |
| #define | LogSinkTraceLPF3_CONFIG_PRESCALER_DIV2 LRFDTRC_CFG_PRESCAL_DIV2 |
| #define | LogSinkTraceLPF3_CONFIG_PRESCALER_DIV3 LRFDTRC_CFG_PRESCAL_DIV3 |
| #define | LogSinkTraceLPF3_CONFIG_PRESCALER_DIV4 LRFDTRC_CFG_PRESCAL_DIV4 |
| #define | Log_MODULE_INIT_SINK_TRACELPF3(name, _levels, printfDelegate, bufDelegatee, _dynamicLevelsPtr) |
Functions | |
| void | LogSinkTraceLPF3_printfSingleton (const Log_Module *handle, uint32_t header, uint32_t headerPtr, uint32_t numArgs,...) |
| Array with the configuration of each sink. More... | |
| void | LogSinkTraceLPF3_printfSingleton0 (const Log_Module *handle, uint32_t header, uint32_t headerPtr,...) |
| void | LogSinkTraceLPF3_printfSingleton1 (const Log_Module *handle, uint32_t header, uint32_t headerPtr,...) |
| void | LogSinkTraceLPF3_printfSingleton2 (const Log_Module *handle, uint32_t header, uint32_t headerPtr,...) |
| void | LogSinkTraceLPF3_printfSingleton3 (const Log_Module *handle, uint32_t header, uint32_t headerPtr,...) |
| void | LogSinkTraceLPF3_init (void) |
| void | LogSinkTraceLPF3_bufSingleton (const Log_Module *handle, uint32_t header, uint32_t headerPtr, uint8_t *data, size_t size) |
Variables | |
| const LogSinkTraceLPF3_Config | LogSinkTraceLPF3_config |
| #define LogSinkTraceLPF3_CONFIG_CHANNELS_CPU_ONLY LRFDTRC_CFG_CH1EN_NORM | LRFDTRC_CFG_CH2EN_OFF | LRFDTRC_CFG_CH3EN_OFF |
| #define LogSinkTraceLPF3_CONFIG_CHANNELS_RADIO_ONLY LRFDTRC_CFG_CH1EN_OFF | LRFDTRC_CFG_CH2EN_TOPSM | LRFDTRC_CFG_CH3EN_TOPSM |
| #define LogSinkTraceLPF3_CONFIG_CHANNELS_CPU_RADIO LRFDTRC_CFG_CH1EN_NORM | LRFDTRC_CFG_CH2EN_TOPSM | LRFDTRC_CFG_CH3EN_TOPSM |
| #define LogSinkTraceLPF3_CONFIG_TIMESTAMP_ENABLED LRFDTRC_CFG_TSEN_ON |
| #define LogSinkTraceLPF3_CONFIG_TIMESTAMP_DISABLED LRFDTRC_CFG_TSEN_OFF |
| #define LogSinkTraceLPF3_CONFIG_PRESCALER_DIV1 LRFDTRC_CFG_PRESCAL_DIV1 |
| #define LogSinkTraceLPF3_CONFIG_PRESCALER_DIV2 LRFDTRC_CFG_PRESCAL_DIV2 |
| #define LogSinkTraceLPF3_CONFIG_PRESCALER_DIV3 LRFDTRC_CFG_PRESCAL_DIV3 |
| #define LogSinkTraceLPF3_CONFIG_PRESCALER_DIV4 LRFDTRC_CFG_PRESCAL_DIV4 |
| #define Log_MODULE_INIT_SINK_TRACELPF3 | ( | name, | |
| _levels, | |||
| printfDelegate, | |||
| bufDelegatee, | |||
| _dynamicLevelsPtr | |||
| ) |
| void LogSinkTraceLPF3_printfSingleton | ( | const Log_Module * | handle, |
| uint32_t | header, | ||
| uint32_t | headerPtr, | ||
| uint32_t | numArgs, | ||
| ... | |||
| ) |
Array with the configuration of each sink.
| void LogSinkTraceLPF3_printfSingleton0 | ( | const Log_Module * | handle, |
| uint32_t | header, | ||
| uint32_t | headerPtr, | ||
| ... | |||
| ) |
| void LogSinkTraceLPF3_printfSingleton1 | ( | const Log_Module * | handle, |
| uint32_t | header, | ||
| uint32_t | headerPtr, | ||
| ... | |||
| ) |
| void LogSinkTraceLPF3_printfSingleton2 | ( | const Log_Module * | handle, |
| uint32_t | header, | ||
| uint32_t | headerPtr, | ||
| ... | |||
| ) |
| void LogSinkTraceLPF3_printfSingleton3 | ( | const Log_Module * | handle, |
| uint32_t | header, | ||
| uint32_t | headerPtr, | ||
| ... | |||
| ) |
| void LogSinkTraceLPF3_init | ( | void | ) |
| void LogSinkTraceLPF3_bufSingleton | ( | const Log_Module * | handle, |
| uint32_t | header, | ||
| uint32_t | headerPtr, | ||
| uint8_t * | data, | ||
| size_t | size | ||
| ) |
| const LogSinkTraceLPF3_Config LogSinkTraceLPF3_config |