Skip to main content
Visitor II
August 20, 2023
Solved

CubeMonitor: probe declaring [not connected ! Device not opened (5)]

  • August 20, 2023
  • 1 reply
  • 2511 views

Greetings to all, new to the STM32Cube environment hence the baby pic profile.  

I created my project, a medium-complexity scale wherein 5 HX711s are feeding my STM32, and uploaded to my target, a Nucleo-L152RE.  

Software compiles without error, for what that's worth.  It loads, declares victory and terminates where it should just run indefinitely.  To see what is happening I loaded CubeMonitor.

At first I got [not connected ! JTAG/SWD error (f5)] so I added this to my code:

#define DEBUGGER_ON 1 //REMOVE BEFORE FLIGHT

#define LOW_POWER_DISABLE 1 //REMOVE BEFORE FLIGHT

 

I had to run the script in debug mode for this to take affect and, interestingly, it did not terminate, nor did it run.  It paused somewhere and gave me this error in the CubeMonitor

     [not connected ! Device not opened (5)]

Skyko_2-1692564119071.png

Probe_in and Probe_out are the same and defined like this:

Skyko_3-1692564278145.png

I can hit the 'Blink the LED' and that works.

Back to the IDE, when I hit the debug button I get these results:

STMicroelectronics ST-LINK GDB server. Version 7.4.0

Copyright (c) 2023, STMicroelectronics. All rights reserved.

 

Starting server with the following options:

Persistent Mode : Disabled

Logging Level : 1

Listen Port Number : 61234

Status Refresh Delay : 15s

Verbose Mode : Disabled

SWD Debug : Enabled

InitWhile : Enabled

 

Waiting for debugger connection...

Debugger connected

Waiting for debugger connection...

Debugger connected

Waiting for debugger connection...

-------------------------------------------------------------------

STM32CubeProgrammer v2.14.0

-------------------------------------------------------------------

 

Log output file: C:\Users\xxxx\AppData\Local\Temp\STM32CubeProgrammer_a07164.log

ST-LINK SN : 066DFF383834434257153214

ST-LINK FW : V2J43M28

Board : NUCLEO-L152RE

Voltage : 3.26V

SWD freq : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID : 0x437

Revision ID : Rev Z

Device name : STM32L15xxE/STM32L162xE

Flash size : 512 KBytes

Device type : MCU

Device CPU : Cortex-M3

BL Version : 0x40

Debug in Low Power mode enabled

 

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a07164.srec

File : ST-LINK_GDB_server_a07164.srec

Size : 162.37 KB

Address : 0x08000000

 

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 649]

Download in Progress:

File download complete

Time elapsed during download operation: 00:00:07.771

Verifying ...

Download verified successfully

 

I note that the IDE brings up the main.c file with the HAL_init() highlighted.

Skyko_4-1692564823341.png

I note that the SWD freq mentioned by my IDE does not match any of the options available in the Monitor.  Is that my issue?  If so, how do I change it?

{{Update: I set the SWD Freq to 950 kHz and the CubeMonitor Probe to 950kHz.  Nothing changed.  The device is still not registering as 'opened'}}

Any hints to get me moving would be greatly, greatly appreciated.

 

 

 

    This topic has been closed for replies.
    Best answer by Skyko

    Resolved!  I had a conflict on pins PA13 and PA14 which are used by SWD

    1 reply

    SkykoAuthor
    Visitor II
    August 20, 2023

    The method for changing the SWD Frequency is

    In the CubeIDE on the action ribbon the Debug is a pull-down menu.  

    • pulled it down and selected Debug Config
    • selected the Debugger tab
    • changed the Frequency to 1000
    • Changed the Debug in low power modes to Enabled
    • ST-LINK SN : 066Dblahblahblah

      ST-LINK FW : V2J43M28

      Board : NUCLEO-L152RE

      Voltage : 3.27V

      SWD freq : 950 KHz

    In CubeMON

    • doubled clicked on the probe (acq in)
    • hit the light bulb and see the led light flash (taking a win wherever I can find one)
    • hit the pencil next to Probe Config
    • selected the 950 kHz

    Now they match.  Still no joy

    SkykoAuthorAnswer
    Visitor II
    August 21, 2023

    Resolved!  I had a conflict on pins PA13 and PA14 which are used by SWD