J-LINK STM32 NUCLEO-G474RE Connection Problem

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

    • J-LINK STM32 NUCLEO-G474RE Connection Problem

      Hello, I have JLink Ultra+ and STM32 Nucleo-G474RE. When I try to connect I am having this error.

      Debug.Start();
      Device "STM32G474RE" selected.
      InitTarget() start
      SWD selected. Executing JTAG -> SWD switching sequence.
      Error: Failed to initialized DAP.
      Can not attach to CPU. Trying connect under reset.
      SWD selected. Executing JTAG -> SWD switching sequence.
      Error: Failed to initialized DAP.
      Connecting to CPU via connect under reset failed.
      InitTarget() end - Took 306ms
      Connect failed. Resetting via Reset pin and trying again.
      InitTarget() start
      SWD selected. Executing JTAG -> SWD switching sequence.
      Error: Failed to initialized DAP.
      Can not attach to CPU. Trying connect under reset.
      SWD selected. Executing JTAG -> SWD switching sequence.
      Error: Failed to initialized DAP.
      Connecting to CPU via connect under reset failed.
      InitTarget() end - Took 307ms
      InitTarget() start
      SWD selected. Executing JTAG -> SWD switching sequence.
      Error: Failed to initialized DAP.
      Can not attach to CPU. Trying connect under reset.
      SWD selected. Executing JTAG -> SWD switching sequence.
      Error: Failed to initialized DAP.
      Connecting to CPU via connect under reset failed.
      InitTarget() end - Took 305ms
      Connect failed. Resetting via Reset pin and trying again.
      InitTarget() start
      SWD selected. Executing JTAG -> SWD switching sequence.
      Error: Failed to initialized DAP.
      Can not attach to CPU. Trying connect under reset.
      SWD selected. Executing JTAG -> SWD switching sequence.
      Error: Failed to initialized DAP.
      Connecting to CPU via connect under reset failed.
      InitTarget() end - Took 307ms

      Then I tried with J-Link Commander and seeing same error. How can I fix that? Thanks.

      Ali
    • Hi Ali,
      Did you already check out the troubleshooting guide?
      wiki.segger.com/J-Link_cannot_…the_CPU#Target_connection

      Please note that the connection can not be established if RDP was set to Level 2:
      wiki.segger.com/ST_STM32#Device_security

      Best regards,
      Fabian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Hello Fabian,



      Here is option bytes, after getting this information from ST-LINK I disconnected onboard debugger and saw ST-LINK couldn't connect.



      There is voltage on micro-controller. I tried interface settings of 100 kHz, 4000 kHz and 8000 kHz, it didn't work.



      This is the result. ST-LINK connection type was "connect under reset" and it could connect. But J-Link says connection under reset failed. Thanks.
      Ali