[SOLVED] Keil/J-link Base - connect to the STM32F103VE problem

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

  • [SOLVED] Keil/J-link Base - connect to the STM32F103VE problem

    Hello,
    I use Keil uVision 5 for STM32F103VE programming. I have JTAG: Segger J-Link Base v9.2, but I can not connect to the microcontroller. Since this is my first project, please help me solve the problem.
    These are messages that uVision displays after selected "Start Debug Session":

    Load "C:\\ARM\\Cwiczenia\\Agregat_2\\Objects\\agregat_2_test.axf"
    Set JLink Project File to "C:\ARM\Cwiczenia\Agregat_2\JLinkSettings.ini"
    * JLink Info: Device "STM32F103VE" selected.

    JLink info:
    ------------
    DLL: V6.32h, compiled Jul 5 2018 18:11:19
    Firmware: J-Link V9 compiled Apr 20 2018 16:47:26
    Hardware: V9.20
    S/N : 59201744
    Feature(s) : GDB

    * JLink Info: TotalIRLen = 9, IRPrint = 0x0011
    * JLink Info: JTAG chain detection found 2 devices:
    * JLink Info: #0 Id: 0x3BA00477, IRLen: 04, CoreSight JTAG-DP
    * JLink Info: #1 Id: 0x06414041, IRLen: 05, STM32 Boundary Scan
    * JLink Info: STM32 (connect): Can not attach to CPU. Trying connect under reset.
    * JLink Info: TotalIRLen = 9, IRPrint = 0x0011
    * JLink Info: JTAG chain detection found 2 devices:
    * JLink Info: #0 Id: 0x3BA00477, IRLen: 04, CoreSight JTAG-DP
    * JLink Info: #1 Id: 0x06414041, IRLen: 05, STM32 Boundary Scan
    * JLink Info: TotalIRLen = 9, IRPrint = 0x0011
    * JLink Info: JTAG chain detection found 2 devices:
    * JLink Info: #0 Id: 0x3BA00477, IRLen: 04, CoreSight JTAG-DP
    * JLink Info: #1 Id: 0x06414041, IRLen: 05, STM32 Boundary Scan
    * JLink Info: STM32 (connect): Can not attach to CPU. Trying connect under reset.
    * JLink Info: TotalIRLen = 9, IRPrint = 0x0011
    * JLink Info: JTAG chain detection found 2 devices:
    * JLink Info: #0 Id: 0x3BA00477, IRLen: 04, CoreSight JTAG-DP
    * JLink Info: #1 Id: 0x06414041, IRLen: 05, STM32 Boundary Scan
    ***JLink Error: STM32: Connecting to CPU via connect under reset failed.
    Error: Flash Download failed - Target DLL has been cancelled
    Flash Load finished at 10:08:51
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Could you provide a screenshot of a connect sequence using J-Link Commander?
    wiki.segger.com/J-Link_cannot_…ty_using_J-Link_Commander
    Are you using custom hardware or an eval board?
    Is the reset pin connected to the J-Link interface?

    Best regards,
    Nino
    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.
  • Thank you for your answer.
    In the J-Link Commander it looks similar. I attach screenshots.
    I'm not sure if the used connect sequence is correct. I used the default values.
    I'm using custom hardware. The connection diagram of the microcontroller has been attached.
    Images
    • j-link commander 1.png

      166.67 kB, 835×1,029, viewed 1,277 times
    • j-link commander 2.png

      60.6 kB, 841×551, viewed 930 times
    • schemat.png

      39.71 kB, 717×947, viewed 899 times
  • Hello,

    On first glance the schematics you provided look correct.
    We tried to reproduce the issue using a STM32F10X-128K-EVAL board that has JTAG connected. Attached you can find the connect sequence. Everything was working as expected.
    So from J-Link perspective everything is working fine.
    We recommend comparing your connection layout to the one of the eval board to see if there are any differences.
    Is an application already running on the target device that might disable debug connection?
    Is you application using any sleep modes?
    Are you using any non standard cables between J-Link and your target device?
    Does the issue resolve when changing the cables?

    Best regards,
    Nino
    Images
    • Capture.PNG

      29.99 kB, 677×474, viewed 809 times
    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,
    I have connected with the STM32 microcontroller. The problem was that I did not connect power supply to the analog part of the microcontroller. I had connected VDDA and REF + to 3.3V and REF- to GND and it has run. I guess, the key was connect VDDA to power supply. Thank you for your help.
    Images
    • j-link commander 3.png

      69.86 kB, 843×629, viewed 817 times