I/O Stream SWO#

I/O Stream SWO.

Overview#

Serial Wire Output (SWO) is an output stream only, which means it is impossible to receive data. SWO has a dedicated pin allowing the CPU to output data in real-time.

IOStream-SWO uses channel 0 for its own purpose.The module also set the SWO output frequency around 863 kHz and uses the UART encoding .

Initialization#

The stream sets itself as the default stream at the end of the initialization function.You must reconfigure the default interface if you have multiple streams in your project else the last stream initialized will be set as the system default stream.

Communication channel connection#

For connecting to the SWO channel you can use the tools provided by Segger or you can open a telnet session and connect to the port 4091 using your host IP address when the debugger is connected using USB and using J-Link debugger IP address when your debugger is connected over ethernet.

Variables#

sl_iostream_swo_handle

Functions#

sl_status_t

Initialize SWO stream component.

sl_status_t

De-initialize SWO stream component.

Variable Documentation#

sl_iostream_swo_handle#

sl_iostream_t* sl_iostream_swo_handle

sl_iostream_swo_handle


sl_iostream_instance_swo_info#

sl_iostream_instance_info_t sl_iostream_instance_swo_info

sl_iostream_instance_swo_info


Function Documentation#

sl_iostream_swo_init#

sl_status_t sl_iostream_swo_init (void )

Initialize SWO stream component.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status Code:

    • SL_STATUS_OK

    • SL_STATUS_FAIL


sl_iostream_swo_deinit#

sl_status_t sl_iostream_swo_deinit (void )

De-initialize SWO stream component.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Status Code:

    • SL_STATUS_OK