[SOLVED][STM32F4xx] How can I get the minimal port running?

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
danny_h
Posts: 8
Joined: Wed Apr 03, 2019 8:10 am

[SOLVED][STM32F4xx] How can I get the minimal port running?

Post by danny_h » Wed Apr 17, 2019 8:19 am

Hey there,

I'm trying to get the minimal port running on a STM32F4DISC and a STM32 NUCLEO-F411RE but both of them run into low power mode right after programming them. I tried it with ST-LINK and DfuSeDemo but both of them have the same result.

This is what ST-LINK says after programming:

Code: Select all

10:01:54 : Debug in Low Power mode enabled.
10:01:54 : Device ID:0x431 
10:01:54 : Device flash Size : 512KBytes
10:01:54 : Device family :STM32F411xE
10:02:02 : [firmware.bin] opened successfully.
10:02:06 : Flash memory programmed in 2s and 532ms.
10:02:06 : Verification...OK
10:02:08 : Disconnected from device.
10:02:08 : Connection to device is lost: check power supply and debug connection.
10:02:08 : If the target is in low power mode, please enable "Debug in Low Power mode" option from Target->settings menu.
So after trying two different kinds of programming on two different boards, I assume that I maybe have to change some configurations within the minimal port files.
Can someone point me to a documentation how to set up those files or describe it to me?
Thank you!
Last edited by danny_h on Mon May 06, 2019 7:22 am, edited 1 time in total.

User avatar
dhylands
Posts: 3198
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: [STM32F4xx] How can I get the minimal port running?

Post by dhylands » Fri Apr 26, 2019 3:37 am

I just tried it with my STM32F4DISC and it seems to be working fine.

I built the image using:
```
make CROSS=1
```
I programmed it via DFU, which means I had to connect PA9 to 5V and use the micro USB connector (not the mini USB connector), and connect BOOT to VDD. I removed the jumper

The minimal port uses UART1, and on the STM32F4DISC, UART1_TX is on PB6 and UART1_RX is on PB7 at 9600 baud.

I connected a USB-serial converter and got this when I pressed reset and got this:
```
MicroPython v1.10-290-g8402c26cf-dirty on 2019-04-25; minimal with unknown-cpu
>>> print('This is a test')
This is a test
>>>
```
Pressing Control-D (soft-reset) hung things which isn't surprising given that there isn't any support for it in main.c

danny_h
Posts: 8
Joined: Wed Apr 03, 2019 8:10 am

Re: [STM32F4xx] How can I get the minimal port running?

Post by danny_h » Mon Apr 29, 2019 7:43 am

Thank you, Dave!

I think my problem was that I still had the Mini-USB cable plugged in as a power supply. After I did like you said I got the same results.

Post Reply