This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SWO

I am using the Segger Embeded studio and wondering about the SWO output.

I know I can load code and set break points with just SWDIO and SWDCLK.

So with RTT do I really need SWO ?

If I want SWO can it be on any GPIO pin ?

Can I have one pin that has SWO and GPIO for led control at the same time?

How much of my RAM on a nRF52840 does RTT support take ?

  • Hi,

    SWO uses special pins, that can only be used for that single purpose. Those are what we often refer to as the "programmer pins", as they are used for programming the board. RTT is also done over these pins. That means that no, you cannot use GPIO pins for this purpose. Also, you cannot use SWDIO and SWDCLK for GPIO or any other purpose than SWO.

    Edit: I was mixing up SWO with something else. I am very sorry. SWO uses a GPIO pin and that pin can be used for any other GPIO purpose, but you can not use the other GPIO pins for SWO. RTT on the other hand uses SWDCLK and SWDIO, which means it uses the special purpose programmer pins (and it cannot use any GPIO pins). See also the answers by , he knows his stuff.

    RAM requirement depends on implementation. I am afraid that I do not have any specific numbers for that, but you could have a look at map files, etc. for some clues. Also if you build a project with and without RTT logging enabled you will see some differences in the build output with regards to memory footprint. (Not including stack usage, however.)

    Regards,
    Terje

  •  

    I am a little confused.  I know that SWDIO and SWDCLK are needed to load code and breakpoints.

    I want to know if the SDO pin is used by Segger RTT

     

     

     

    So my question is can I use P1.00 as a GPIO if I want Segger RTT ?

    or does Segger RTT use P1.00 for SWO (serial wire outptut) which means I cannot use it for a GPIO to control a LED.

  • SWO is not used by RTT - you can use the pin for anything you like. Not much uses SWO at all, even less uses the full trace. There are certain functions in the ITM which will only multiplex over SWO and trace but you are very unlikely ever t o need them. RTT pretty much won here and just uses SWCLK and SWIO

  • If I leave Segger and used JTAG would I need SWO .  I do not plan to do this but just wanted to leave JTAG as an option for future needs.

    It looks like the Keil Serial viewer uses the SWO pin  and the J-link has a viewer as well.

    but I think Segger has started using RTT as a replacement for SWO .  Is this correct ?

    Do the Nordic SDK 15 examples have the RTT tools installed ?

    Do the Nordiw SDK 15 examples support printf on the SWO line ?

Related