Page 2 of 2

Re: WeAct STM32F411CEU6 black pill

Posted: Tue Feb 04, 2020 8:32 am
by jppang
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.

Re: WeAct STM32F411CEU6 black pill

Posted: Mon Feb 10, 2020 4:10 am
by mcauser
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

Re: WeAct STM32F411CEU6 black pill

Posted: Thu Jun 25, 2020 9:04 pm
by SpotlightKid
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?

Re: WeAct STM32F411CEU6 black pill

Posted: Thu Jun 25, 2020 9:42 pm
by dhylands
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).

Re: WeAct STM32F411CEU6 black pill

Posted: Fri Jun 26, 2020 8:58 pm
by rcolistete
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.

Re: WeAct STM32F411CEU6 black pill

Posted: Sat Jun 27, 2020 6:06 am
by SpotlightKid
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.