Skip to main content
EKosa.1
Associate II
Dec 23, 2021 8:11 AM UTC
Question

Using Segger Jlink pins as GPIO's

I am developing a project that has M7 processor. I want to use Segger Jlink pin which is JDTI as GPIO.

I want to keep it low until I set it. But, while flashing the code to my MCU, JDTI pin becomes high until passing the hal_initialize() function. So my corresponding hardware in JDTI pin powers itself due to pins setting itself situation while flashing the code. After passing hal_initialize() function it becomes low as expected and I can set and use it as GPIO pin.

So, is there any way to keep this pin low while flashing the code to my MCU.

Preferably, I want to solve this situation by software. It may need a hardware development too. If it is, please share your idea and lets discuss it. Any idea will be appreciated.

This topic has been closed for replies.

7 replies

Uwe Bonnes
Chief
Dec 23, 2021 9:52 AM UTC

JTDI has an internal pull up, enabled by default even in reset. You need a stronger external pull-down to keep JTDI low during reset.

EKosa.1
EKosa.1Author
Associate II
Dec 23, 2021 10:22 AM UTC

Can you share a documantation about this information?

https://www.segger.com/doc/UM20005_Linker.html

Probably there is but I cant found it.

Uwe Bonnes
Chief
Dec 23, 2021 11:33 AM UTC

E.g. in RM0399, 63.4.1 Serial-wire and JTAG debug port (SWJ-DP):

"By default, the JTAG-DP is selected on system or power-on reset. The five IOs are

configured by hardware in debug alternative function mode. The SWJ-DP incorporates pull-up resistors on the JTDI, JTMS/SWDIO, and nJTRST lines, as well as a pull-down resistoron the JTCK/SWCLK line."