Skip to main content
Graduate
December 12, 2023
Question

Disabling JTAG

  • December 12, 2023
  • 1 reply
  • 2527 views

What are the different ways of disabling the JTAG in STM32G4 series? Is Direct Register Programming an option?

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    December 12, 2023

    Hello @Tushar_4 

    if you want to disable the JTAG-DP and enable the SW-DP you have to use the following instructions according to the RM0440:

    STTwo32_0-1702364703555.png

    But if you want to just disable the JTAG you can do that by selecting any mode (input, output or analog) except alternate function mode for all JTAG pins.

    Best Regards.

    STTwo-32

    Tushar_4Author
    Graduate
    December 12, 2023

    Thank You,

    Just wanted to ask one more thing , how can use some use some sort of protection like whenever we want to use the JTAG we enable that and debug , but someone other than me should not be able to Debug ,they have to  like require a key or something.

    There is a section in the reference manual (RM0440) MCU device ID code , in that we have DEV_ID and REV_ID , how can we give that our own password , because i think that the dev ID only identifies the device as a particular ID not a unique code or something.

     

    Can we use some sort of encryption with option bytes that are built in already?

    Technical Moderator
    December 13, 2023

    Hello again @Tushar_4 

    For more information about enabling / disabling the Debug on STM32G4, I suggest you take a look at the Read protection (RDP) part of the RM0440.

    PS: Be careful, once in level 2, it is no more possible to modify the Read protection level.

    Best Regards.

    STTwo-32