[SOLVED] Disable SWV, SWO on j-link, IAR EWARM, STM32F4xx

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Disable SWV, SWO on j-link, IAR EWARM, STM32F4xx

    Hello,

    i'm using IAR Embedded Workbench for ARM V 7.30 and a SEGGER J-Link.
    I tried contacting STM and IAR customer support on this problem. The ST-people said it's related to the IDE and/or the debugger, the IAR-People didn't answer yet (even we got a valid IAR Service and Update Contract for 820 EUR / year).

    For debugging i'm using SWD as interface and on the micro a SPI-Port that is sharing SCLK and TDO/SWO.
    STM32 Configuration is done correctly (including selecting the correct alternate function here it's AF6 for SPI).
    Communication to the SPI peripheral is OK, as long as i Interrupt the program.
    On Breakpoint or manually breaking, SPI SCLK looks like outputting some digital values. When checking the function mapping SCLK is now on AF0, when chanigng to AF6, it's going back to AF0 immediately.

    With an IAR I-Jet I can change a "Trace data collection Mode" from "Serial (SWO)" to "None". But this does not exist for the J-Link.
    Changing the "Library low-level interface implementation" from "Semihosted" "Via SWO" to "None" does not change anything. Is there a configuration bit in the J-Link configuration that can be changed for disabling the SWO?

    Thank you
  • I changed IAR to use GDB-Server debugging.
    As there were some errors while programming the micro (transfer block), I changed back to j-link.
    [Visual GDB connects just fine to the same debugger]

    Now everything runs correctly, so it's an IAR-related issue.
    I'll post the answer from the IAR support here, if they have a solution.
  • Hi,

    Thanks for sharing this issue.
    Is there a configuration bit in the J-Link configuration that can be changed for disabling the SWO?
    Selecting "None" as Library low-level interface implementation should disable SWO pin configuration / output.

    In general the J-Link does not touch the SWO pin. Only, if he IDE (IAR) explicitly tells the J-Link to configure the SWO pin, J-Link will touch it.
    We assume that either somewhere in your project settings, something is configured to configure / use the SWO pin or
    IAR internally executes a SWO macro which configures the pin.

    If you can provide us with an IAR project, which runs out-of-the-box on an eval-board and allows reproducing the issue, we can offer you to have a look at the issue.


    Best regards
    Erik
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello,

    it's independent to the Project Settings in IAR EWARM 7.30.
    Even with "None" in "Library low-level interface implementation" SWO was active.
    On your Information about not touching the J-Link control bits, I opened J-Link.exe and typed SWOStop.

    Then SWO is no longer available, even when changing the "Library low-level interface implementation" to "SWO Semihosting", as long as I use J-Link.exe and type SWOStart.

    I provide this Information to IAR, as I think the IDE should activate or deactivate SWO depending on the Project Settings.

    Thank you for your information helping me solving my problem.