Skip to main content
ramses946
Associate II
July 17, 2023
Solved

STM32L4 - are pullups during reset active when RDP level is 2?

Citing from the STM32L431 manual:

The debug pins are in AF pull-up/pull-down after reset:
• PA15: JTDI in pull-up
• PA14: JTCK/SWCLK in pull-down
• PA13: JTMS/SWDAT in pull-up
• PB4: NJTRST in pull-up
• PB3: JTDO in floating state no pull-up/pull-down

Let's take PA15 as an example. What happens if RDP level is set to level 2 (debug interface disabled). Will the debug pin pulls still be active?

This topic has been closed for replies.
Pierre_Paris
Pierre_ParisBest answer
ST Employee
July 17, 2023

Hello @ramses946,

In the RDP level 2 (No Debug), JTAG & SWD connection is killed, you can't use it.

However, until the IO is not reconfigured, reset value is applied as follow:

- GPIOA_MODER = 0xABFF FFFF (So, PA15 in Alternate Funtion mode)

- GPIOA_PUPDR = 0x6400 0000 (So, PA15 in Pull-up)

If you want to use the GPIO, you can configure it through your application.

Best Regards,

Pierre

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

2 replies

Pierre_Paris
Pierre_ParisBest answer
ST Employee
July 17, 2023

Hello @ramses946,

In the RDP level 2 (No Debug), JTAG & SWD connection is killed, you can't use it.

However, until the IO is not reconfigured, reset value is applied as follow:

- GPIOA_MODER = 0xABFF FFFF (So, PA15 in Alternate Funtion mode)

- GPIOA_PUPDR = 0x6400 0000 (So, PA15 in Pull-up)

If you want to use the GPIO, you can configure it through your application.

Best Regards,

Pierre

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
ramses946
ramses946Author
Associate II
July 17, 2023

Okay, the reason I asked was that I want to use this pin to bias the gate of an external P MOSFET (switch it off during reset).

So it seems that this pin can be used for this purpose even in RDP2.