Page 1 of 1

MicroPython kills ST-LINK on STM32-H743ZI2?

Posted: Tue Feb 02, 2021 10:55 am
by codedump
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

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

Posted: Tue Feb 02, 2021 11:25 am
by Damien
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.

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

Posted: Tue Feb 02, 2021 12:16 pm
by codedump
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.

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

Posted: Tue Feb 02, 2021 8:58 pm
by Damien
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.