cancel
Showing results for 
Search instead for 
Did you mean: 

Connect STM32CubeMonitor to ST-LINK/V2 - enterSWD error = 245

Kmax18
Senior

I am new to the STM32CubeMonitor and use it for the first time for acquiring data from a STM32G0B1RETx MCU without using the IDE's Debug mode. The 'probe' is a ST-LINK/V2, connected to pins PA13 (SYS_SWDIO) and PA14 (SYS_SWCLK). The CubeMonitor reports 'p2p connected', see the MON screenshot below. However, the log file (STM32CubeMonitor.log) has many entries stating that an 'Error on connect' occurred. See the the log lines below the screenshot. The result is no data are acquired and no log file was generated.

I have two questions, please:

Question 1: how can a reliable connection to the ST-LINK/V2 and the target MCU be established? Is there a ST tutorial on youtube?

Question 2: beside the Dashboard graphics, does the CubeMonitor offer a simple text window for displaying values, for example numbers in decimal or hex format?

Thank you very much!

Kmax18_0-1706503141572.png

From STM32CubeMonitor.log:

[2024-01-28T17:01:31.150] [ERROR] stlinkprotocol - [stlinkprotocol.js - connectToTarget(1155:12)] - Error on connect device then close probe 50FF70067265575448281867
[2024-01-28T17:01:46.160] [ERROR] stlinkprotocol - [stlinkprotocol.js - connectToTarget(1063:16)] - enterSWD error = 245
[2024-01-28T17:01:46.160] [ERROR] stlinkprotocol - [stlinkprotocol.js - connectToTarget(1155:12)] - Error on connect device then close probe 50FF70067265575448281867
[2024-01-28T17:02:01.167] [ERROR] stlinkprotocol - [stlinkprotocol.js - connectToTarget(1018:12)] - No device for the probeId 50FF70067265575448281867
[2024-01-28T19:23:22.637] [ERROR] stlinkprotocol - [stlinkprotocol.js - getCurrentMode(341:12)] - Device ( 0 ) not possible to get current mode = 5

1 ACCEPTED SOLUTION

Accepted Solutions
stephane.legargeant
ST Employee

Hello

Connection error :

The error you are seeing may be linked to connection issues or conflicts with another application :

  • Connection issue : using long wires or having a "noisy" environment may generate communication issue. It is good to try a lower probe speed to see if connection is improved.  For very noisy environment, Isolated ST-Link will provide stronger protection. (B-STLINK-ISOL)
  • Application conflict : If another tool ( IDE, STM32CubeProgrammer) is using the probe when CubeMonitor is starting, CubeMonitor may detect that probe is busy and log a connection error. It is a temporary error. The solution in this case is to use share mode. STM32CubeMonitor:How to configure shared mode - stm32mcu

How to log data in text :

There is a dashboard node to display text : the "text" node.  You must format the value sent to the widget. There is a special subflow for this : "Single Value". So you need to connect the ouptput of "processing" to "single value" and then connect to "text". the same process is used for gauge and is described here : STM32CubeMonitor:How to send data to a gauge - stm32mcu

Have a nice monitoring and let us know if it is working. 

 

View solution in original post

1 REPLY 1
stephane.legargeant
ST Employee

Hello

Connection error :

The error you are seeing may be linked to connection issues or conflicts with another application :

  • Connection issue : using long wires or having a "noisy" environment may generate communication issue. It is good to try a lower probe speed to see if connection is improved.  For very noisy environment, Isolated ST-Link will provide stronger protection. (B-STLINK-ISOL)
  • Application conflict : If another tool ( IDE, STM32CubeProgrammer) is using the probe when CubeMonitor is starting, CubeMonitor may detect that probe is busy and log a connection error. It is a temporary error. The solution in this case is to use share mode. STM32CubeMonitor:How to configure shared mode - stm32mcu

How to log data in text :

There is a dashboard node to display text : the "text" node.  You must format the value sent to the widget. There is a special subflow for this : "Single Value". So you need to connect the ouptput of "processing" to "single value" and then connect to "text". the same process is used for gauge and is described here : STM32CubeMonitor:How to send data to a gauge - stm32mcu

Have a nice monitoring and let us know if it is working.