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
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
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: https://www.segger.com/jlink-sdk.html
- Erik
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
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: https://www.segger.com/jlink-sdk.html
- Erik
Hi Martin,
QuoteI 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
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
Don’t have an account yet? Register yourself now and be a part of our community!