Skip to main content
Senior
July 28, 2022
Question

Disable SWD and JTAG by default for STM32F4 MCU

  • July 28, 2022
  • 2 replies
  • 1195 views

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

This topic has been closed for replies.

2 replies

Danish1
Lead III
July 28, 2022

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

Kenji1Author
Senior
July 28, 2022

Hi Danish

I checked the document again.

And it seems you are right about RDP1.

I will re-check the bootloader behavior.