Configuration Over SWO#

Configuration Over SWO.

Overview#

When working with VCOM and/or PTI with a Silicon Labs kit (WSTK or WPK), it's important that the configuration of the kit's board controller matches that of the target application. The Configuration Over SWO component provides a way to automatically configure the board controller to use the same settings for VCOM and PTI configuration is sent to the board controller over SWO at startup, ensuring that the configuration is synchronized.

Enumerations#

enum
COS_CONFIG_PTI_MODE_ONEWIRE
COS_CONFIG_PTI_MODE_TWOWIRE
COS_CONFIG_PTI_MODE_EFRUART
COS_CONFIG_PTI_MODE_EFRSPI
COS_CONFIG_PTI_MODE_COUNT
}

Enumeration representing the PTI Modes.

enum
COS_CONFIG_PTI_INTERFACE_0
COS_CONFIG_PTI_INTERFACE_1
COS_CONFIG_PTI_INTERFACE_COUNT
}

Enumeration representing the PTI Interfaces.

Functions#

void

Initialize the SWO ITM 8 and initiates VCOM/PTI SWO writes.

void
sl_cos_config_vcom(uint32_t baudrate, uint8_t flow_control)

Custom API, to be used by other software component to write the structured VCOM data on SWO ITM channel 8 The following Custom API take Baud rate, Flow Control as an input that should be configured at the bit(0 to 23) and bit(30(CTS), 31(RTS)) of the structured VCOM data respectively so that WSTK identifies the baud rate and flow_control values and configure accordingly.

void
sl_cos_config_pti(uint32_t baudrate, COS_PtiMode_t mode, COS_PtiInterface_t interface)

Custom API, to be used by other software component to write the structured PTI data on SWO ITM channel 8.

Enumeration Documentation#

COS_PtiMode_t#

COS_PtiMode_t

Enumeration representing the PTI Modes.

Enumerator
COS_CONFIG_PTI_MODE_ONEWIRE

ONEWIRE mode.

COS_CONFIG_PTI_MODE_TWOWIRE

TWOWIRE mode.

COS_CONFIG_PTI_MODE_EFRUART

UART mode.

COS_CONFIG_PTI_MODE_EFRSPI

SPI mode.

COS_CONFIG_PTI_MODE_COUNT

Mode count.


Definition at line 74 of file hardware/driver/configuration_over_swo/inc/sl_cos.h

COS_PtiInterface_t#

COS_PtiInterface_t

Enumeration representing the PTI Interfaces.

Enumerator
COS_CONFIG_PTI_INTERFACE_0

PTI INTERFACE 0.

COS_CONFIG_PTI_INTERFACE_1

PTI INTERFACE 1.

COS_CONFIG_PTI_INTERFACE_COUNT

Interface count.


Definition at line 88 of file hardware/driver/configuration_over_swo/inc/sl_cos.h

Function Documentation#

sl_cos_send_config#

void sl_cos_send_config (void )

Initialize the SWO ITM 8 and initiates VCOM/PTI SWO writes.

Parameters
N/A

Definition at line 103 of file hardware/driver/configuration_over_swo/inc/sl_cos.h

sl_cos_config_vcom#

void sl_cos_config_vcom (uint32_t baudrate, uint8_t flow_control)

Custom API, to be used by other software component to write the structured VCOM data on SWO ITM channel 8 The following Custom API take Baud rate, Flow Control as an input that should be configured at the bit(0 to 23) and bit(30(CTS), 31(RTS)) of the structured VCOM data respectively so that WSTK identifies the baud rate and flow_control values and configure accordingly.

Parameters
[in]baudrate

Baud rate that has to be set over bit_0 to bit_23.

[in]flow_control

Flow Control value that has to be set over bit_30 and bit_31.


Definition at line 117 of file hardware/driver/configuration_over_swo/inc/sl_cos.h

sl_cos_config_pti#

void sl_cos_config_pti (uint32_t baudrate, COS_PtiMode_t mode, COS_PtiInterface_t interface)

Custom API, to be used by other software component to write the structured PTI data on SWO ITM channel 8.

Parameters
[in]baudrate

Baud rate that has to be set over bit_0 to bit_23.

[in]mode

COS_PtiMode_t to be used. ONEWIRE mode. TWOWIRE mode. UART mode. SPI mode. PTI Modes that has to be set over bit_27 to bit_29.

[in]interface

COS_PtiInterface_t to be used. PTI INTERFACE 0. PTI INTERFACE 1. Interface value that has to be set over bit_30 and bit_31.

Returns

  • config


Definition at line 137 of file hardware/driver/configuration_over_swo/inc/sl_cos.h