MicroPython kills ST-LINK on STM32-H743ZI2?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
codedump
Posts: 2
Joined: Tue Feb 02, 2021 10:43 am

MicroPython kills ST-LINK on STM32-H743ZI2?

Post by codedump » Tue Feb 02, 2021 10:55 am

Hello,

first off, I'm a newbie with MicroPython.

I've managed to install it on an STM32-H7 board (Nucleo-144, H743ZI2) using a developent version of the F/OSS ST-LINK utility (see this thread: https://github.com/stlink-org/stlink/issues/1063).

Now I'm trying to dive deeper into the STM32-H7 programming and extensibility of MicroPython and trying to understand the hardware better. However, when I plug in the USB cable into the ST-LINK port of the board, all I get is this:

Code: Select all

root@7597058af286:~# st-info --probe
Found 1 stlink programmers
 serial:     303032413030334633343338353130433334333133393339
 hla-serial: "\x30\x30\x32\x41\x30\x30\x33\x46\x33\x34\x33\x38\x35\x31\x30\x43\x33\x34\x33\x31\x33\x39\x33\x39"
 flash:      0 (pagesize: 0)
 sram:       0
 chipid:     0x0000
 descr:      unknown device
This essentially means that the board is not recognized anymore by ST-LINK. It's supposed to say something along the lines of:

Code: Select all

 ...
 flash:      2097152 (pagesize: 131072)
 sram:       131072
 chipid:     0x0450
 descr:      H742/743/753
MicroPython works well as far as I can tell (there is a Python-like prompt on a serial device).

Is this supposed to be like this? Is this some kind of deactivating the ST-LINK when MicroPython boots on the device?

How do I get the ST-LINK connection back? I've tried any conceivable combination of pressing / holding / releasing the Reset and User button while power cycling the device, to no avail. If it's supposed to be like this, is there any documentation I can read as to what happens? I've read the README.md in the stm32 port directory, but information there about my situation is not available, and the ST.com documentation doesn't say that anything like this -- hiding the on-board ST-LINK -- could even be possible.

Can anybody point me in the right direction?

Thanks & Cheers

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: MicroPython kills ST-LINK on STM32-H743ZI2?

Post by Damien » Tue Feb 02, 2021 11:25 am

It shouldn't really be possible to kill ST-LINK like that, but I have seen ST-LINK run into issues quite often. I'd suggest simply power cycling everything, even your PC.

Also, the H7 MCU can be a bit of a beast to tame. If you have access to a more "friendly" MCU, like an F7 or F4 then I'd suggest trying that out first.

codedump
Posts: 2
Joined: Tue Feb 02, 2021 10:43 am

Re: MicroPython kills ST-LINK on STM32-H743ZI2?

Post by codedump » Tue Feb 02, 2021 12:16 pm

I've tried it on two different computers -- the original one that I've set up months ago, and on a new PC with a newly set up, containerized, toolchain. Same result.

I'll try posting the same question on the st.com forum. I just want to make sure that MicroPython doesn't do anything sketchy since I don't know its internals, and the ST guys are going to probably ask that question first.

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: MicroPython kills ST-LINK on STM32-H743ZI2?

Post by Damien » Tue Feb 02, 2021 8:58 pm

AKAIK there are a lot of users who have been and are using MicroPython on a NUCLEO_H743ZI board, without any issue. MicroPython doesn't do anything funny that would break ST-LINK.

You can try and getting the board into ST bootloader mode and see if that helps. Use BOOT0 or execute machine.bootloader() at the REPL.

nedkonz
Posts: 24
Joined: Thu Aug 05, 2021 9:58 pm

Re: MicroPython kills ST-LINK on STM32-H743ZI2?

Post by nedkonz » Thu Aug 05, 2021 10:03 pm

I just had the same issue.
I did a

Code: Select all

deploy-stlink
successfully, ran µPython for a bit, then it stopped responding.
When I went to re-program the board I couldn't even see the ST-Link.
I'd previously updated the ST-Link v3 firmware to the latest.

nedkonz
Posts: 24
Joined: Thu Aug 05, 2021 9:58 pm

Re: MicroPython kills ST-LINK on STM32-H743ZI2?

Post by nedkonz » Fri Aug 06, 2021 1:38 pm

I was able to get it back after plugging into a different USB port. Seems that the Mac USB stack had gotten confused somehow.

Post Reply