loading STM32F407G-Disc1 issues

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
jrprogrammer
Posts: 7
Joined: Sat Feb 09, 2019 1:51 pm

loading STM32F407G-Disc1 issues

Post by jrprogrammer » Wed Feb 20, 2019 2:50 am

OK, I had an older STM32F4-Discovery board I had loaded micropython without any issues. So today I got a new board (STM32F407G-DISC1) from Mouser. After many attempts to load micropython, the micro USB port is still "dead". (Yes, I converted DFU to HEX using DFuSeDemo) I've been using my trusty Windows 7 machine to load, using STM32 ST-Link utility. I fired up my Linux Raspberry and did the "lsusb" command, but there's nothing there. Can someone tell me what I'm doing wrong? Maybe there's a trick to the newer board?
Thanks,
Jim

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

Re: loading STM32F407G-Disc1 issues

Post by dhylands » Wed Feb 20, 2019 3:16 am

On the old board, you needed to run a jumper from PA9 (VBUS on the micro USB connector) to 5V since the micro USB connector didn't power the board.

I don't have one of the new boards, but I wouldn't be surprised if it needs something similar.

jrprogrammer
Posts: 7
Joined: Sat Feb 09, 2019 1:51 pm

Re: loading STM32F407G-Disc1 issues

Post by jrprogrammer » Wed Feb 20, 2019 3:22 am

I had to use a jumper from PA9 to 5V also... The lights(LEDs) are on, but nobody is home!!!
Thanks,
Jim

fredeady
Posts: 1
Joined: Sat Feb 23, 2019 12:39 am

Re: loading STM32F407G-Disc1 issues

Post by fredeady » Sat Feb 23, 2019 1:43 am

In the troubleshooting process, I isolated the DISC1's ST-Link microcontroller by cutting all of the reset and programming lines to the STM32F407. The 407 still would not enter DFU mode. I also noticed that the DISC1 would not take a load of micropython from the ST-Link USB interface.

Until I can research the problem more deeply, here is a work-around fix:
Follow the instructions at https://www.segger.com/products/debug-p ... -on-board/
to convert your DISC1 from ST-Link to J-Link Onboard. You can then use J-Flash Lite to load micropython via the programming USB port on the DISC1. You will also find that after you convert to J-Link Onboard the DFU works and you can use DfuSe to load via the USB OTG port.

The hardware of the new DISC1 board is identical to the older board. There seems to be something in the new version of ST-Link that is installed on the newer boards that is preventing the DISC1 from entering DFU mode and programming via ST-Link. I have not tested this but I think that it may be possible to revert to an older version of ST-Link on the DISC1 and circumvent this dfu/programming problem as well.

jrprogrammer
Posts: 7
Joined: Sat Feb 09, 2019 1:51 pm

Re: loading STM32F407G-Disc1 issues

Post by jrprogrammer » Sat Feb 23, 2019 5:30 pm

It worked! Thanks to my friend Fred... I got things to work even easier. Here are the steps I used:

1.Download the Segger STLink to Jlink Reflash utility -> https://www.segger.com/downloads/jlink#STLink_Reflash

2.Hook up your DISC board as normal and run the Rflash utility, which will load J-Link where ST-Link was.

3.Go to your DfuSeDemo, you should see your board (assuming you put the jumper on boot0), load your program into DfuSeDemo, then upload.. Success!

We're thinking STM did something to the STLink program to keep us from "Having fun"...

Your mileage may vary,
Jim

Post Reply