WeAct STM32F411CEU6 black pill

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.
jppang
Posts: 1
Joined: Tue Feb 04, 2020 8:18 am

Re: WeAct STM32F411CEU6 black pill

Post by jppang » Tue Feb 04, 2020 8:32 am

gersch07 wrote:
Mon Feb 03, 2020 10:59 pm
Dear all,

I’ve followed the steps above to compile MicroPython (including support for a Winbond W25Q128 Flash Chip) and successfully flashed it using the ST-Link Utility. However, the ST Virtual COM port has so far only appeared twice after plugging in the USB cable... most of the time the device remains undetected, showing „Error 43“ in the Windows device manager. I‘m not sure if this is related, but in the „STM32duino“ forum people have reported that running the MCU at 100 MHz causes the USB clock to be slightly off...
Has anyone of you had similar trouble? I’ve also opened an issue on GitHub.

Thanks for your help!
I had tried 100MHz clock but failed too, USB communication was unstable.
96MHz clock is a good option for micropython.
Hope this can help.

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

Re: WeAct STM32F411CEU6 black pill

Post by mcauser » Mon Feb 10, 2020 4:10 am

In the board definition mpconfigboard.h, HSE is set to 25MHz and the CPU freq set to 96MHz (192/2) and USB 48MHz (192/4):

Code: Select all

#define MICROPY_HW_CLK_PLLM (25)
#define MICROPY_HW_CLK_PLLN (192)
#define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV2)
#define MICROPY_HW_CLK_PLLQ (4)
I noticed on the Arduino_Core_STM32 fix they increased the flash latency from 2 to 3. I'll try adding that:

Code: Select all

#define MICROPY_HW_FLASH_LATENCY    FLASH_LATENCY_3

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

Re: WeAct STM32F411CEU6 black pill

Post by SpotlightKid » Thu Jun 25, 2020 9:04 pm

I just got three of these today from China and successfully flashed MP onto the first one. Having only ~45 kB left on the flash FS is a bit of a bummer, though.

* If I add frozen modules to my firmware build, will they further decrease the flash FS size?
* If I disable some builtin modules I don't use, can I increase the flash FS size?
* I have a breakout board with a microsd slot. This has only the usual SPI pins (MISO, MOSI, SCK, CS) and VCC/GND but no card detect pin. Can I use this as the boot FS? If yes, which SPI bus do I use and what do I need to add to mpconfigboard.h?
Last edited by SpotlightKid on Thu Jun 25, 2020 9:47 pm, edited 2 times in total.

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

Re: WeAct STM32F411CEU6 black pill

Post by dhylands » Thu Jun 25, 2020 9:42 pm

According to the datasheet, 3 wait states should be used for 90-100 MHz with a voltage of 2.7V to 3.6V.

2 wait states is recommended for 64-90 MHz (same voltage range).

User avatar
rcolistete
Posts: 205
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil

Re: WeAct STM32F411CEU6 black pill

Post by rcolistete » Fri Jun 26, 2020 8:58 pm

SpotlightKid wrote:
Thu Jun 25, 2020 9:04 pm
I just got three of these today from China and successfully flashed MP onto the first one. Having only ~45 kB left on the flash FS is a bit of a bummer, though.
See the 1st page of this topic. It is very simple to add a W25Q128 (16 MBytes) SPI flash.

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

Re: WeAct STM32F411CEU6 black pill

Post by SpotlightKid » Sat Jun 27, 2020 6:06 am

Yes, I read that. I was looking though to make the most of the existing flash or extending it without having to order extra parts.

Post Reply