[NUCLEO-H743ZI / STM32H743]

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
lxrobotics
Posts: 3
Joined: Wed Mar 20, 2019 3:57 pm

[NUCLEO-H743ZI / STM32H743]

Post by lxrobotics » Thu Mar 21, 2019 6:17 am

Hi all,

I've been trying to get MicroPython to work on the NUCLEO-H743ZI ( https://www.st.com/b/en/evaluation-tool ... 743zi.html ). Unfortunately I'm not able to get a working REPL. Those are the steps performed:

Download/Build/Install the latest OpenOCD ( https://sourceforge.net/p/openocd/code/ ... 4038ab77c/ )

Code: Select all

  git clone https://git.code.sf.net/p/openocd/code openocd
  cd openocd/
  ./bootstrap
  ./configure
  make -j8
  sudo make install
Download/Build the latest MicroPython ( https://github.com/micropython/micropyt ... 24703776f1 )

Code: Select all

    git clone https://github.com/micropython/micropython
    cd micropython
    make -C mpy-cross
    cd ports/stm32
    make BOARD=NUCLEO_H743ZI /* This step needs to be performed twice - due to linker errors on the first execution - probably the linker path not set correctly */
Create file micropython/ports/stm32/boards/openocd_stm32h743.cfg

Code: Select all

    source [find interface/stlink.cfg]
    transport select hla_swd
    source [find target/stm32h7x_dual_bank.cfg]
    reset_config srst_only

    proc stm_flash { BIN0 ADDR0 {BIN1 ""} {ADDR1 ""} } {
        init
        reset init
        halt
        adapter_khz 1000
        sleep 100
        flash write_image erase $BIN0 $ADDR0
        sleep 100
        verify_image $BIN0 $ADDR0
        sleep 100
        if {$BIN1 ne ""} {
            flash write_image erase $BIN1 $ADDR1
            sleep 100
            verify_image $BIN1 $ADDR1
            sleep 100
        }
        reset run
        shutdown
    }
Modify micropython/ports/stm32/Makefile

Code: Select all

    -OPENOCD_CONFIG ?= boards/openocd_stm32f4.cfg
    +OPENOCD_CONFIG ?= boards/openocd_stm32h743.cfg
Download via OpenOCD

Code: Select all

    make V=1 BOARD=NUCLEO_H743ZI deploy-openocd
The blue LED (LD2) is a weakly illuminated. No REPL available on UART3 available via virtual COM via st-link.

Any insights/help appreciated.
Cheers, Alex

chrismas9
Posts: 124
Joined: Wed Jun 25, 2014 10:07 am

Re: [NUCLEO-H743ZI / STM32H743]

Post by chrismas9 » Thu Mar 21, 2019 10:26 pm

What state is the boot pin in? Faint LEDs is often a sign that the STM32 started in bootloader mode because the bootloader enables weak pull-ups on a lot of pins, eg all the SPI ports.

lxrobotics
Posts: 3
Joined: Wed Mar 20, 2019 3:57 pm

Re: [NUCLEO-H743ZI / STM32H743]

Post by lxrobotics » Fri Mar 22, 2019 6:09 am

Thank you for your input. Both BOOT0 and BOOT1 are in the default state in which I've received the board:

* BOOT0 is pulled to GND which according to the reference manual indicates that the execution starts from the beginning of tha flash at 0x0800 0000.
* BOOT1 is floating.

If I press the USER button and keep pressing RED/BLUE blink alternatingly with bright light. After release BLUE blinks rapidly for a short time and then returns to the low level of illumination. Something is happening != the minimal demo firmware it was shipped with.

chrismas9
Posts: 124
Joined: Wed Jun 25, 2014 10:07 am

Re: [NUCLEO-H743ZI / STM32H743]

Post by chrismas9 » Sat Mar 23, 2019 2:38 am

You may need to reset the filesystem. On pyboard you release the USR button at 3 which is green and yellow on (binary indication of 3). On boards with not enough LEDs it is tricky to get the release time right. When you release USR st 3 the red LED will stay on for a few seconds while it erases and rewrites the filesystem.

lxrobotics
Posts: 3
Joined: Wed Mar 20, 2019 3:57 pm

Re: [NUCLEO-H743ZI / STM32H743]

Post by lxrobotics » Mon Mar 25, 2019 6:04 am

Good idea :) I've followed the instructions at https://docs.micropython.org/en/latest/ ... reset.html as well as looked at this video https://www.youtube.com/watch?v=Kf8SG6N_5cs .

I was able to release the USR button in state #3 (Red+Blue = ON), both Red/Blue LED blink 4 times as described after Release of USR button - then it's back again to low Blue and no REPL :( Alsot there is no third LED being active at any point in time.

Post Reply