[ANSWERED / SOLVED] Jlink - keeping target MCU in reset

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

  • [ANSWERED / SOLVED] Jlink - keeping target MCU in reset

    Hello,

    is it possible to configure the JLink device to reset target MCU and keep in reset state if there is not running any application (e.g. JLinkExe, JLinkGDBServer, etc.) using the JLink device?


    Martin

    The post was edited 2 times, last by wella-tabor ().

  • Hi,

    You can reset the target using the "r" command in J-Link Commander. Furthermore, J-Link Commander allows to set the state of the reset pin permanently by entering the "r0" and "r1" command. If any addition individualization is required, the J-Link SDK may be interesting. It allows to create customized application using the J-Link API. For further information regarding the J-Link SDK, please refer to: segger.com/jlink-sdk.html

    - 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.
  • Hi,
    thank You for answer I was not aware of the r[0|1] command. Executing this command, the Jlink set reset pin. However after JLinkExe application quit, the JLink device released the reset and the application loaded in MCU started to execute. I would prefer some kind of non-volatile flag in the JLink device which would tell the JLink to keep the target in reset in case of no app (or using Segger dll) is communicating with it. Or rather keep it in reset if there is no communication over USB (in my case JLink Base). I would be fine even with answer it is not possible to save my time trying to investigate how to do it by reading manuals playing with it. Currently I "think" it is not possible unless there is some undocummented feature in the configuration bytes area (JLinkExe rconf) of the JLink.

    Martin

    SEGGER - Erik wrote:

    Hi,

    You can reset the target using the "r" command in J-Link Commander. Furthermore, J-Link Commander allows to set the state of the reset pin permanently by entering the "r0" and "r1" command. If any addition individualization is required, the J-Link SDK may be interesting. It allows to create customized application using the J-Link API. For further information regarding the J-Link SDK, please refer to: segger.com/jlink-sdk.html

    - Erik
  • Hi Martin,

    I would be fine even with answer it is not possible to save my time trying to investigate how to do it by reading manuals playing with it.

    It is not possible.
    As soon as the J-Link DLL/library disconnects from J-Link, the complete target interface is disabled, as J-Link is not allowed to influence the device while nobody is controlling J-Link.
    Also, we do not see any reason for this feature (keeping the CPU in reset while not working with it) being needed.
    If you can explain for what you need it, I can bring it up for discussion.


    - 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:

    If you can explain for what you need it, I can bring it up for discussion.
    Thank You Alex.

    Why I had such question: I am programming a custom flash update function, the firmware is loaded into the MCU's internal flash (currently the LPC1788) and is taken from external SPI or Nor Flash. I have tried to write a simple app to test a communicatation with the SPI, Nor Flash and the IAP (NXP LPC In-Application Programming) functionality. The test app performed MCU reset after successful fw download. With the debugger I have put a breakpoint in main and the reset procedure to stop downloading again and again. After finishing my working hours I let the computer switched on because I work from home via VPN sometimes. Because I have closed all applications and the target was released from debug state (with reset) and performed flash update again and again over all night .... That's my fault I know, I do not argue.

    I can imagine plenty of use cases where this feature (enabled by default) would bother others. Anyway, maybe the following behaviour is only with our board design, but when I disconnect the usb cable from the J-Link, the target is kept in reset.

    BR
    Martin