MCUDev Black STM32F407VET6 + STM32F407ZET6 dev boards

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
User avatar
dhylands
Posts: 3198
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by dhylands » Tue Aug 15, 2017 10:48 pm

You can also just put the board in DFU mode by moving the green jumper. By default its connected between BT0 and GND. If you move it to BT0 and 3.3v and plug in the USB cable, then you can program MicroPython using DFU.

User avatar
benalb
Posts: 22
Joined: Fri May 19, 2017 1:23 pm

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by benalb » Wed Aug 16, 2017 9:34 am

benalb@t410 ~/tmp/micropython/firmwares
sudo dfu-util --alt 0 -D firmware.dfu
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Match vendor ID from file: 0483
Match product ID from file: df11
Deducing device DFU version from functional descriptor length
dfu-util: No DFU capable USB device available

dfu-util -l does not show anything when board is plugged in.

Also tried with ST-Link V2 - JTAG connector:

benalb@t410 ~
sudo stm32flash /dev/ttyS0
stm32flash 0.5

http://stm32flash.sourceforge.net/

Interface serial_posix: 57600 8E1
Failed to init device.

:?:

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

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by dhylands » Thu Aug 17, 2017 1:46 am

Just to be totally clear, I attached a photo which shows the green jumper in the correct position to be in DFU mode.
IMG_0684b.JPG
IMG_0684b.JPG (178.86 KiB) Viewed 2902 times
Assuming that you're using linux, when the board is in DFU mode, what does lsusb show?

You should see an entry like this:

Code: Select all

Bus 005 Device 002: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Given the above (005 after Bus and 002 after Device), what permissions does /dev/bus/usb/005/002 have (substitute the actual numbers from your lsusb output)? Mine look like:

Code: Select all

610 >ls -l /dev/bus/usb/005/002
crw-rw-rw- 1 root root 189, 513 Aug 16 18:39 /dev/bus/usb/005/002
By default the 3rd rw will be missing, and you'll need to add some udev rules. This page: https://github.com/micropython/micropyt ... -Discovery has instructions on creating udev rules which should correct the permissions.

User avatar
benalb
Posts: 22
Joined: Fri May 19, 2017 1:23 pm

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by benalb » Thu Aug 17, 2017 7:20 am

The pinout on my board is different from yours, but yes, BT0 is attached to 3V3:
https://i.imgur.com/Vm6711V.jpg

I am using linux (debian 4.12.0-1-amd64), and lsusb does not show the device, with syslog showing the " usb 1-1.2: device not accepting address 89, error -32" and " usb 1-1-port2: unable to enumerate USB device" messages every time I plug the board in.

I think that the board is really defective. I will try to contact the seller.
Anyway, thank you very much for your answers.

User avatar
mcauser
Posts: 385
Joined: Mon Jun 15, 2015 8:03 am

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by mcauser » Mon Sep 04, 2017 12:31 am

The pinout difference is your board is a VET6 and dhylands photo is a ZET6.
VET6 has the Micro USB port on the top left, ZET6 top right.
Both have boot pin jumpers in the top right.

User avatar
benalb
Posts: 22
Joined: Fri May 19, 2017 1:23 pm

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by benalb » Mon Sep 04, 2017 9:26 am

Ok, the board was, indeed, defective. Got another one, up and running. Thank you.

manikanta_raju
Posts: 4
Joined: Sun Oct 22, 2017 5:56 pm

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by manikanta_raju » Sun Oct 22, 2017 6:00 pm

Hey guys, I got a black STM32F407VET6 board and it is up and running! Thanks to your efforts guys. I see that the board has a flash chip W25Q16. Has anyone tested the flash module? How can I communicate with it? I see that it is wired via SPI bus.

SpotlightKid
Posts: 380
Joined: Wed Apr 08, 2015 5:19 am

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by SpotlightKid » Mon Oct 23, 2017 6:36 am

I don't know whether anybody has already written a MicroPython library for this type of flash chip, but there's an Arduino library for it here:

https://github.com/derekevans/W25Q16

Together with the datasheet (easy to find) and the MicroPython SPI docs, it shouldn't be too hard to write a similar library for the chip in MicroPython.

User avatar
mcauser
Posts: 385
Joined: Mon Jun 15, 2015 8:03 am

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by mcauser » Mon Oct 23, 2017 2:06 pm

The W25Q16 2MB SPI flash is connected to the SPI(3) bus on the VET6 and ZET6 boards.
This script works, with a few modifications:
https://github.com/manitou48/pyboard/bl ... piflash.py

Replace:
cs = pyb.Pin('X5')
With either:
cs = pyb.Pin('PB0') #VET6
cs = pyb.Pin('PB14') #ZET6

Replace:
spi = SPI(1, SPI.MASTER, baudrate=42000000,polarity=0,phase=0)
With:
spi = SPI(3, SPI.MASTER, baudrate=42000000,polarity=0,phase=0)

Code: Select all

W25Q16   VET6   ZET6
1 CS     PB0    PB14
2 MISO   PB4    PB4
3 WP     3V3    3V3
4 GND    GND    GND
5 MOSI   PB5    PB5
6 CLK    PB3    PB3
7 HOLD   3V3    3V3
8 VCC    3V3    3V3

Code: Select all

>>> import spiflash
SPI flash
b'ef4015'
b'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
b'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff')
erase 4k 25579 us
write 256 1070 us 1.914019 mbs 
write/read ok
read 32768 12596 us 20.81169 mbs 
>>> 

manikanta_raju
Posts: 4
Joined: Sun Oct 22, 2017 5:56 pm

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

Post by manikanta_raju » Mon Oct 23, 2017 6:32 pm

[quote=mcauser post_id=22695 time=1508767571 user_id=732]
The W25Q16 2MB SPI flash is connected to the SPI(3) bus on the VET6 and ZET6 boards.
This script works, with a few modifications:
https://github.com/manitou48/pyboard/bl ... piflash.py

Replace:
cs = pyb.Pin('X5')
With either:
cs = pyb.Pin('PB0') #VET6
cs = pyb.Pin('PB14') #ZET6

Replace:
spi = SPI(1, SPI.MASTER, baudrate=42000000,polarity=0,phase=0)
With:
spi = SPI(3, SPI.MASTER, baudrate=42000000,polarity=0,phase=0)

[code]
W25Q16 VET6 ZET6
1 CS PB0 PB14
2 MISO PB4 PB4
3 WP 3V3 3V3
4 GND GND GND
5 MOSI PB5 PB5
6 CLK PB3 PB3
7 HOLD 3V3 3V3
8 VCC 3V3 3V3
[/code]

[code]
>>> import spiflash
SPI flash
b'ef4015'
b'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
b'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff')
erase 4k 25579 us
write 256 1070 us 1.914019 mbs
write/read ok
read 32768 12596 us 20.81169 mbs
>>>
[/code]
[/quote]

Well that works just fine :)

Post Reply