cancel
Showing results for 
Search instead for 
Did you mean: 

Disable SWD and JTAG by default for STM32F4 MCU

Kenji1
Senior

Hi Team

Does anyone know how to disable SWD and JTAG by default setting, using HAL library?

To protect the firmware for reverse engineering, I want to disable SWD.

As you know, it is enabled by default after a reset.

Also I know that there RDP to protect the code.

But I will use custom bootloader, so I can't use RDP Level 1 setting.

Because all Flash ROM area erase when return to RDP Level 0.

It also erases the boot loader.

My Conditon:

  • MCU: STM32F405VE

2 REPLIES 2
Danish1
Lead II

Your custom bootloader can run fine with RDP at level 1. It can read and write FLASH and never needs to drop to level 0.

Readout protection is independent of flash write protection - which would need to be turned off during firmware update if it is normally on.

Hope this helps,

Danish

Kenji1
Senior

Hi Danish

I checked the document again.

And it seems you are right about RDP1.

I will re-check the bootloader behavior.