Skip to main content
JCoti
Associate
December 16, 2018
Question

Does the STM32L0 series support the SWO viewer interface? I can't find this signal in the datasheet.

  • December 16, 2018
  • 4 replies
  • 1062 views

..

    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    December 16, 2018

    The SWO/SWV methods aren't supported by Cortex-M0(+) cores, there is an EVT (Event Viewer) method, Keil's Bob Boys has posted several examples and app notes, Google should pull something useful.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Pavel A.
    December 16, 2018

    @OP if you use Keil - the EVT thing in latest version 5.26 has been updated from 5.24 and earlier.

    If you can't get it working per old instructions, ask Keil support or here.

    I had to do some plumbing to make debug prints via EVT working in Keil 5.26 and Cube-generated project,

    -- pa

    Tesla DeLorean
    Guru
    December 16, 2018

    Usually would need code in fputc()/_ttywrch() to retarget properly.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Pavel A.
    December 16, 2018

    ​Yes but also the Keil EVR component now definitely requires allocation of RAM area, see: http://www.keil.com/support/docs/4012.htm

    It was recommended but optional in previous versions. Now, without this setup, the debugger goes haywire.

    Then. the EVR module requires to define time source. Cortex M0 does not support their default choice, DWT. So one has to give it a dedicated timer, or let it tamper with SysTick and displace the handler provided by the Cube HAL (yep I remember that you don't favor it) … it was a nasty time. Thanks to Keil support, they quickly helped me to understand the root cause.

    -- pa