Skip to main content
Visitor II
July 16, 2024
Solved

Is there a way to read the ITM port on an STM32U5 with RDP level 1 set?

  • July 16, 2024
  • 1 reply
  • 970 views

I'm using an area of Flash in an STM32U5 to store some information that I need to retrieve connecting the board to the SWD port. Data is sent out using the ITM port. All is working as expected connecting the board using the STM32 Cube Programmer, allowing to save data to a file. The CPU can be run and halted.

By setting RDP1 this is not possible anymore. Once the board is connected the CPU is locked and I found no way to run the firmware. I suspect this is the normal behaviour to protect access to the Flash, is this correct? I couldn't find specific information on the manuals. Or is there a sequence to have the firmware run when connected to the programmer?

I also expect that there's no way to exclude an are of flash from being protected by RDP.

    This topic has been closed for replies.
    Best answer by AScha.3

    AScha3_0-1721147107797.png

    Without any detail : as long as you need/want debug, dont activate anything, to block debug access. (stay on rdp0)

    If you just want send printf "debug" messages , use a UART to send.

    If product is ready , dont need debug, then set protection, stop debug . (rdp1 or 2 (if you know, what you do!))

    1 reply

    AScha.3Answer
    Super User
    July 16, 2024

    AScha3_0-1721147107797.png

    Without any detail : as long as you need/want debug, dont activate anything, to block debug access. (stay on rdp0)

    If you just want send printf "debug" messages , use a UART to send.

    If product is ready , dont need debug, then set protection, stop debug . (rdp1 or 2 (if you know, what you do!))

    paologAuthor
    Visitor II
    July 16, 2024

    Thank you, @AScha.3 : all clear. UART seems to be the best solution.