[SOLVED] RTT can't connect to STM32F407-DISCO1

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RTT can't connect to STM32F407-DISCO1

      I'm able to upload and debug, but connecting with a viewer doesn't work.

      Here's the output of the J-Link Commander V7.00. I've also tried 1000 kHz with the same result.


      SEGGER J-Link Commander V7. 0 (Compiled Apr 8 2021 14:31:32)
      DLL version V7.00, compiled Apr 8 2021 14:30:05

      Connecting to J-Link via USB...O.K.
      Firmware: J-Link STLink V2 compiled Aug 12 2019 10:28:03
      Hardware version: V1.00
      S/N: 778399013
      VTref=3.300V

      Type "connect" to establish a target connection, '?' for help
      J-Link>connect
      Please specify device / core. <Default>: STM32F407VG
      Type '?' for selection dialog
      Device>
      Please specify target interface:
      J) JTAG (Default)
      S) SWD
      T) cJTAG
      TIF>S
      Specify target interface speed [kHz]. <Default>: 4000 kHz
      Speed>
      Device "STM32F407VG" selected.

      Connecting to target via SWD
      InitTarget() start
      ERROR: Unknown DEV_ID found: 0x00000411
      Failed to unlock device.
      Can not attach to CPU. Trying connect under reset.
      ERROR: Unknown DEV_ID found: 0x00000411
      Failed to unlock device.
      Connecting to CPU via connect under reset failed.
      InitTarget() end
      InitTarget() start
      ERROR: Unknown DEV_ID found: 0x00000411
      Failed to unlock device.
      Can not attach to CPU. Trying connect under reset.
      ERROR: Unknown DEV_ID found: 0x00000411
      Failed to unlock device.
      Connecting to CPU via connect under reset failed.
      InitTarget() end
      InitTarget() start
      ERROR: Unknown DEV_ID found: 0x00000411
      Failed to unlock device.
      Can not attach to CPU. Trying connect under reset.
      ERROR: Unknown DEV_ID found: 0x00000411
      Failed to unlock device.
      Connecting to CPU via connect under reset failed.
      InitTarget() end
      InitTarget() start
      ERROR: Unknown DEV_ID found: 0x00000411
      Failed to unlock device.
      Can not attach to CPU. Trying connect under reset.
      ERROR: Unknown DEV_ID found: 0x00000411
      Failed to unlock device.
      Connecting to CPU via connect under reset failed.
      InitTarget() end
      Cannot connect to target.
    • [SOLVED] RTT can't connect to STM32F407-DISCO1

      The problem was because the chip was incorrectly identified as STM32F215 / 217.

      Here's identification from STM32CubeProgrammer.



      The chip is on an official STM32 Discovery board, so I suspect it is in fact STM32F407, but it is somehow being misidentified. It works with SEGGER RTT now when treated as STM32F215 / 217.