cancel
Showing results for 
Search instead for 
Did you mean: 

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

PREDATOR
Associate II

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

9 REPLIES 9
dbgarasiya
Senior II

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

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
Associate II

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

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
Associate II

STM32H743ZI

alister
Lead

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
Associate II

How to find out swd pins in STM32CubeMX?

PREDATOR
Associate II

How to set SWD pins as GPIO pins in STM32H743ZI ?

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