cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, do any of you know how to achieve the advertised MHz ADC sampling rates on the Arduino H7 Portenta board, which I believe has STM32 H7?

ardulfino
Associate II

I tried the STM32Cube Programmer but it could not connect to the board. I'm on Linux Manjaro. Many thanks

10 REPLIES 10
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
ardulfino
Associate II

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

ardulfino
Associate II

.. better screenshot, sorry grabbed the wrong file

ardulfino
Associate II

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

Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
ardulfino
Associate II

Thank you! Where can I find the log file you need?

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
ardulfino
Associate II

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

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

https://www.st.com/resource/en/application_note/cd00264342-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..