[SOLVED] Jlink Resettype, Monitor mode

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

  • [SOLVED] Jlink Resettype, Monitor mode

    Hello.

    I put STM32f407IG into deepsleep mode. Then i can connect with jlink. WHY? Why reset metod for connection can be settable?

    What i need to test Monitor debug mode? I try to use it with same STM. but i get info that this mode can be used with my JLINK.
    In monitor mode it is posible to get real time variable watch?? (GDB +ECLIPSE).
  • Hello,

    Then i can connect with jlink. WHY? Why reset metod for connection can be settable?

    Could you describe the situation, the expected outcome and the practical outcome in more detail?

    What i need to test Monitor debug mode?

    Monitor mode is described here: segger.com/monitor-mode-debugging.html
    Quote of the important part:
    How it works

    In contrast to halt mode debugging, in monitor mode debugging the target CPU does not halt on a debug request but takes a debug interrupt instead and jumps to a specific debug interrupt handler which then handles the communication with J-Link and also some low-level application maintenance that may be needed to be done while the application is halted. So technically, the CPU is still running and executing code while the application itself is halted, allowing it to still handle some interrupts as well as some synchronous maintenance operation that can be done within the monitor code.

    The monitor code consists of the following parts:
    • A generic monitor that handles communication with J-Link. This part is delivered by SEGGER and should not be modified by the user.
    • A custom monitor part providing some functions that can be filled in by the user. SEGGER delivers a template for this part.


    The custom monitor part provides the following functions where the user can add functionality/maintenance which needs to be done in debug mode:

    • JLINK_MONITOR_OnExit(): Called once just before leaving the monitor and restarting the target application.
    • JLINK_MONITOR_OnEnter(): Called once just before entering the monitor. Target application is already stopped at this point.
    • JLINK_MONITOR_OnPoll(): Called periodically while the CPU is in debug mode.

    The monitor modules simply need to be compiled, linked and downloaded with the application. For limitations to what can be done in the different functions of the custom monitor part, please refer to the J-Link User Guide.


    Cortex-M4 is supported.

    I try to use it with same STM. but i get info that this mode can be used with my JLINK.

    I do not understand this sentence.

    In monitor mode it is posible to get real time variable watch?? (GDB +ECLIPSE).

    I am not really sure what exactly you want to know here either.
    What technique do you currently use for "real time variable watch"?
    RTT works with monitor mode.

    Best regards,
    Niklas
    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.
  • I use this all files from your site. Al it's OK. but when I connect by GDB server, I get message that this jlink (EDU V8 ) not support monitor mode.


    Real time watch means that variable value will be visible with all changes when program runs not only when halt.

    If CPU is in deep sleep, Jlink assumes that STM32 is locked. WHY? I don't now.
  • Hi,

    Monitor mode is supported by
    J-Link EDU* / BASE* / PLUS v9 or higher
    J-Link ULTRA+ / PRO v4 or higher
    *Evaluation only

    Best regards,
    Niklas
    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.
  • OK. From some time i thinking about buy jlink (not edu). But this connection problem is important to me. Usually I develop Low power aplications. If cennection with target will be impossible, i will need to find tool that can this.

    Can someone tell me what ather futures have monitor debug mode? It's clear for me that i can set breakpoint without stoppig apllication. What else? (consider GDB).

    What highiest SWD frequency for STM32F4 can be set? 4000kHz With Jlink EDU (software implementation) but with others?


    I thinking about what i will get with full jlink version (ULTRA for example). I'm notice comersial usage, and some licences.

    Acording JLINK documentation v5.12 rev 0 page 32 - cortex m4 aren't suporrted?, stange I work from 2 years with this version on M4. M7? (typo??)..

    I wonna to check if STM32L011 i supported? i try to check this in beta version but manual looks like from stable release.
  • Hi,

    Usually I develop Low power aplications. If cennection with target will be impossible, i will need to find tool that can this.

    This depends on multiple thinks. In some cases, we can provide support to debug in low power mode (and we have been doing so).
    In case a low power mode disables the debug unit - than there is not much a J-Link or any other debug probe can do.
    Sometimes a debug probe can disable the low power mode by sending a special sequence via a debug interface and then connect to the target - but what is the point of turning the low power mode on in the first place?

    Can someone tell me what ather futures have monitor debug mode?

    I do not have much to add to what is said on the website.
    However, J-Link PLUS and ULTRA+ will come with licenses for
    Ozone (J-Link Debugger) segger.com/ozone.html
    J-Flash segger.com/jflash.html

    Buying and current generation Debugger will granting you access to the following features:
    SEGGER RTT segger.com/jlink-rtt.html
    SEGGER System View segger.com/systemview.html (Awesome in order to optimize performance and power consumption)
    SEGGER J-Scope segger.com/j-link-j-scope.html (Live global / static watch, up to 100k samples per second)

    Differences between BASE / PLUS and ULTRA+ have also been listed by my colleague Johannes here: Hardware upgrade.

    What highiest SWD frequency for STM32F4 can be set? 4000kHz With Jlink EDU (software implementation) but with others?

    J-Link BASE / PLUS v10: 15000 kHz
    J-Link ULTRA+: 50000kHz possible. STM32F4 target: At least 25000 kHz - 30000 kHz

    Acording JLINK documentation v5.12 rev 0 page 32 - cortex m4 aren't suporrted?,

    This is a mistake, thanks for pointing this out. Cortex-M4 is fully supported since Version 8.0
    I wonna to check if STM32L011 i supported?

    This can be looked up on our website: segger.com/jlink_supported_devices.html?m=ST#sel
    We currently do support the STM32L0 series, but not the STM32L011 device, as they are quit new.
    Support for STM32L011 us planned for the future, but without a fixed release date yet.

    Best regards,
    Niklas
    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.
  • SEGGER - Niklas wrote:

    Sometimes a debug probe can disable the low power mode by sending a special sequence via a debug interface and then connect to the target - but what is the point of turning the low power mode on in the first place?
    In realease version i need do some measurments. With debeger connected it isn't posibble to do this (in STM we get extra 300uA consumption). But when i try to connet to device i LP mode i should be posiible.
    STlink (Openocd give mi posiibility to connect under reset) In keil i it posible to set connect under reset (ResetType 3 - according to JLink dokumentation). Buy it is strange that this type of reset can be set before conection. This isn't logical.

    Differences between BASE / PLUS and ULTRA+ have also been listed by my colleague Johannes here: Hardware upgrade.
    This is very general info, only JLINK related. My question is target related, becose maybe target will have some restrictions. And as you mention earlier, for example monitor mode will not work etc. Jlink support much more MCU i need so...

    Try to understand. I want to know for what i will pay.

    The post was edited 1 time, last by tadzik85 ().

  • Hi,

    This is very general info, only JLINK related. My question is target related, becose maybe target will have some restrictions. And as you mention earlier, for example monitor mode will not work etc. Jlink support much more MCU i need so...

    Maybe I was not clear enough:
    Monitor mode is not supported with Hardware version 8.0, but it is supported with Version 9 (BASE /PLUS) or higher or ULTRA+ / PRO version 4 or higher.
    All features / tools I listed as an example (Ozone, J-Flash, RTT, Systemview, J-Scope) can be used with a J-Link ULTRA v4 and a STM32F4 target. (And with any other (and not limited to only that) Cortex-M0/M3/M4/M7 target listed here)

    I also said you can expect a SWD speed of 15000 kHz with BASE / PLUS and 25000 kHz or higher using a J-Link ULTRA+/PRO with a STM32F4 target.

    Best regards,
    Niklas
    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,

    Connect under reset should work even with version 8.0 - if you are using the newest software version segger.com/jlink-software.html .
    You do not need to configure this, it connect under reset is executed as a fallback if normal connect does not work.

    J-Link will force to hold the connection, even if the STM32 is running low power modes.

    Best regards,
    Niklas
    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,

    J-Link makes sure that it does not loses connection to the STM32 if it enters a low power mode.
    Fortunately, this is possible at all on an STM32. (On many CPUs the debug connection is simply lost in low power modes)

    However, while the target is in a low power mode, you may not be able to watch variables etc. because the RAM might get be inaccessible (powered off).
    This is something you have to live with or you use another low power mode while debugging (a one that does not remove power from the RAM).
    In general, it does not make much sense to use low power modes during debug, because:
    1) On almost all targets you will lose the connection to the target
    2) On the ones where you do not (e.g. STM32), you will see a significantly higher power consumption while a debugger is connected, so it makes absolutely no sense to measure power consumption here


    Best regards
    Alex
    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.
  • SEGGER - Alex wrote:

    J-Link makes sure that it does not loses connection to the STM32 if it enters a low power mode.
    Fortunately, this is possible at all on an STM32. (On many CPUs the debug connection is simply lost in low power modes)

    However, while the target is in a low power mode, you may not be able to watch variables etc. because the RAM might get be inaccessible (powered off).
    This is something you have to live with or you use another low power mode while debugging (a one that does not remove power from the RAM).
    In general, it does not make much sense to use low power modes during debug, because:
    1) On almost all targets you will lose the connection to the target
    2) On the ones where you do not (e.g. STM32), you will see a significantly higher power consumption while a debugger is connected, so it makes absolutely no sense to measure power consumption here


    Best regards
    Alex
    I'm not talking about this. For this is relative bit in DBGMCU.

    I'm talkich about connection stage , not debuggieng. This same behavior is when i try to reprogramo erace etc STM32. Jlink.exe once get warning about posibility that taget is blocked. But gdb server never will connect.

    This is clear. Connect under reset not work.
  • I'm not talking about this. For this is relative bit in DBGMCU.

    I'm talkich about connection stage , not debuggieng. This same behavior is when i try to reprogramo erace etc STM32. Jlink.exe once get warning about posibility that taget is blocked. But gdb server never will connect.

    This is clear. Connect under reset not work.


    Sorry, but I have no idea what you are trying to tell me here.

    You write:

    PWR->CR |= PWR_CR_PDDS;
    SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
    __WFI();

    In this mode cennection isn't posible.


    This is not true. Works fine.
    Of course you need to have the reset pin of the CPU connected to J-Link, to allow it to do a "connect under reset" to gain control of the CPU again.
    We have many customers using this.


    Best regards
    Alex
    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.