[SOLVED] Enable SWO during Debugging Microcontroller Renesas RA6M5 (R7FA6M5BH) with Jlink Ultra+ causes debugger disconnection and microcontroller in stuck (power cycle is necessary for recovery)

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

  • [SOLVED] Enable SWO during Debugging Microcontroller Renesas RA6M5 (R7FA6M5BH) with Jlink Ultra+ causes debugger disconnection and microcontroller in stuck (power cycle is necessary for recovery)

    I'm trying to use printf over ITM channel (SWO) with microcontroller Renesas RA6M5 (R7FA6M5BH)
    I'm using ozone (version 3.34) and my JLINK Ultra+ with JLINK updated to version 7.96H
    Ozone project is well configured for SWD and SWO (see attached ozone project "R7FA6M5_2Mb.jdebug")


    When i tried to enable SWO, during debug session (Right click on terminal console, "Capture SWO"), this operation causes debugger disconnection and microcontroller in stuck.
    After this operation debug is not possible anymore, even with a microcontroller reset: only a power cycle will recovery

    I captured JLINK DLL logger and i attached here ("LOGGER_OZONE.txt")
    My understanding is something wrong was done in sequence over microcontroller registers for enabling SWO.


    Let me add that instead i was able to use SWO inside Renesas e2studio, using a JLINK embedded on their demoboard (J-Link OB-S124 compiled Oct 30 2023 12:13:12)
    I captured SWO enabling also in this scenario and I attached here ("jlinkOB_seqSWO.txt")
    My understanding is that a difference sequence is performed by combination of e2studio and embedded jlink.
    Files
  • Hi pbizarri,

    could you please provide a complete J-Link log and a complete Ozone log, both recorded in the same debug session where you reproduce the issue? The snippets are too short for an analysis.

    Creating a J-Link log is described here: wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File, creating an Ozone log is described in section 8 of the Ozone user's manual.

    Best regards
    -- AlexD
    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.
  • Hi pbizarri,
    this forum is not a support forum. SEGGER employees look in from time to time but in case there are more pressing topics on our desks responses may be delayed.
    In case you are eligible for support feel free to open a support case.
    Best regards
    -- AlexD
    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.
  • Hi pbizarri,
    looking into the J-Link log you provided I see that writing to the TPIU_SPPR register (and all subsequent writes to debug registers) fail. This happens in the context of enabling SWO in your target. So something goes wrong in that procedure which leads to a state that Ozone cannot handle, thus terminating the debug connection to the target.
    Since this is not in the scope of Ozone I will move this thread to the J-Link forum so the colleagues can have a look.
    Best regards
    -- AlexD
    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.
  • Hi Alex, thanks for reply.
    please take in account this thread: [SOLVED] SWO during Debugging Microcontroller Renesas RA6M5 (R7FA6M5BH) in Renesas demoboard doesn't work using Jlink Ultra+ and instead works with J-Link OB-S124 embedded in demoboard?

    Using JLINK ULTRA+ in Renesas IDE-Debugger (eclipse based) instead of OZONE, everything works.
    This is the reason due i think issue could be related to OZONE

    Let's wait your collegues feedback