Skip to main content
PREDATOR
Associate II
February 18, 2020
Question

How to permanently disable j-tag without enabling readout protection level 2?

  • February 18, 2020
  • 7 replies
  • 2033 views

Need to protect data access through j-tag, but need to program flash through inbuilt boot loader

This topic has been closed for replies.

7 replies

dbgarasiya
Senior
February 18, 2020

it is mostly for temporary . after reset it will automatically enable

oleksandr.karbivsky
Senior II
February 18, 2020

Hi. If you want permanently disable j-tag, you must develop your own bootloader and set RDP level 2.  In-build bootloader is not 100% safety. It is already hacked.

PREDATOR
PREDATORAuthor
Associate II
February 18, 2020

Is there any other option other than RDP level changing to disable j-tag in stm32?

oleksandr.karbivsky
Senior II
February 18, 2020

Only RDP level 2 can disable debug access to uC permanently. Other types is easy to hack. Here some info.

What device do you use?

PREDATOR
PREDATORAuthor
Associate II
February 19, 2020

STM32H743ZI

alister
Senior III
February 19, 2020

You've decided not to RDP level 2.

You next most secure option is to RDP level 1 AND configure your JTAG/SWD pins as GPIO inputs at run-time.

PREDATOR
PREDATORAuthor
Associate II
February 19, 2020

How to find out swd pins in STM32CubeMX?

PREDATOR
PREDATORAuthor
Associate II
February 24, 2020

How to set SWD pins as GPIO pins in STM32H743ZI ?

Danish1
Lead III
February 24, 2020

Have a look in the Reference Manual for your stm32. I know it is a big and daunting document, but this is where the answers to most questions are most completely given.

In there is a chapter on GPIO. In there you will discover how to set the MODE to be either digital input, digital output, alternate-function or analog input. SWD is one of the alternate-function options.

Hope this helps (I know you'd solve _this_ question more quickly if I just answered _this_ question. But once you know your way around the Reference Manual you won't need to ask us nearly as many questions),

Danish