2021-07-27 03:41 AM
I tried the STM32Cube Programmer but it could not connect to the board. I'm on Linux Manjaro. Many thanks
2021-07-27 08:39 AM
Hello @ardulfino ,
Let me first welcome you to the Community :)
What exactly did the error message say? You can share a screenshot to better understand your issue.
Make sure to use the latest release of STM32CubeProgrammer V2.8.0.
Imen
2021-07-27 09:56 AM
Many thanks for your warm welcome, Imen!
Yes, I can confirm I have STM32CubeProgrammer V2.8.0.
The error is "Error: Cannot open port ttyACM0, it may be used by another application or port name is invalid." I attach a screenshot.
I rebooted my PC and made sure the Arduino IDE didn't hog the port ttyACM0. I've used this port to upload sketches from Arduino IDE and to forward serial comms with socat, so I know it works. The system can see the port:
[ulf@ulf-manj ~]$ ls /dev | grep ACM
ttyACM0
I tried all the four ways to connect, but with the same error message. If you believe that the Portenta H7 board should work with for instance kubuntu 20.04 or even Windows 10, I could give this a go too.
Many thanks,
Ulf
2021-07-27 09:58 AM
2021-07-27 10:44 AM
Further to the above, I managed to get rid of that error message by running the Cube CLI as super user:
normal user:
[ulf@ulf-manj bin]$ ./STM32_Programmer_CLI --connect port=ttyACM0 P=NONE br=9600
-------------------------------------------------------------------
STM32CubeProgrammer v2.8.0
-------------------------------------------------------------------
Error: Cannot open port ttyACM0, it may be used by another application or port name is invalid.
sudo:
[ulf@ulf-manj bin]$ sudo ./STM32_Programmer_CLI --connect port=ttyACM0 P=NONE br=9600
-------------------------------------------------------------------
STM32CubeProgrammer v2.8.0
-------------------------------------------------------------------
Serial Port ttyACM0 is successfully opened.
Port configuration: parity = none, baudrate = 9600, data-bit = 8,
stop-bit = 1.0, flow-control = off
Timeout error occured while waiting for acknowledgement.
I tried parity even, baudrate 115200 too, even --go noack, but the timeout error persists
2021-07-27 10:49 AM
Thanks for sharing more details. It seems your issue is related to Cubeprogrammer tool.
I will escalate this to our Tools team for check and analysis.
If possible to share the complete log file for more investigation.
Imen
2021-07-27 10:50 AM
Thank you! Where can I find the log file you need?
2021-07-27 11:12 AM
You can use the log option: -log [filePath.log] on the STM32CubeProgrammer_CLI.
Please refer to this UM2237 for more details about the command used.
Imen
2021-07-27 11:23 AM
logfile content:
19:22:28:441 -------------------------------------------------------------------
19:22:28:442 STM32CubeProgrammer v2.8.0
19:22:28:442 -------------------------------------------------------------------
19:22:28:442
19:22:28:442 Log output file: /home/ulf/cube_log.txt
19:22:28:442 Command line: --connect port=ttyACM0 p=none br=115200 -log /home/ulf/cube_log.txt
19:22:28:442
19:22:28:444 Serial Port ttyACM0 is successfully opened.
19:22:28:444 Port configuration: parity = none, baudrate = 115200, data-bit = 8,
stop-bit = 1.0, flow-control = off
19:22:28:444 No Init bits value is : 0
19:22:28:444 Sending init command:
19:22:28:444 byte 0x7F sent successfully to target
19:22:30:445 Wait ends after 1 loop, dataready = 0, delay = 2001
19:22:30:445
Timeout error occured while waiting for acknowledgement.
19:22:30:445 No response from target received
19:22:31:446 waitForBytesWritten Error : Operation timed out
Note: logfile paths with uppercase letters will fail
2021-07-27 03:01 PM
The STM32 Serial Boot Loader uses EVEN parity, 8E1
Only works once out of reset, so BOOT0 needs to be HIGH, device reset, UART connectivity
AN2606 should indicate viable UART pins on the H7