2023-07-17 03:29 AM
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?
Solved! Go to Solution.
2023-07-17 06:54 AM
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.
2023-07-17 06:54 AM
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.
2023-07-17 07:37 AM
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.