Very slow start on STM32F437ZG (1min 4s) #13347
-
Hi everyone! Just a quick note before everything. I am really new to this. This may be not looking like a very related question. So I am working on a port for specific dev board. I am using STM32F437ZG. That MCU has very similar specifications to other MCU that MicroPython community ported (STM32F407VGT6). On that MCU, the following working configuration is:
That are default settings. So as I mentioned, I have STM32F437ZG, and when executing with default configurations, everything on board works, but it is so so slow and unresponsive. Also I looked at the NUCLEO_F412ZG, and configuration below that I wrote is really really similar. But the problem, with configuration below, I cannot get USB port to show on my PC, and I can't even execute some LED blinking on startup. Also on the MICROPY LED2, I get blinking LED for loading, and it seems to load faster than the previous clock configuration, but as I said, not an single mark of booting.
That is some default configuration for that MCU (most of the time). Does anyone know what I am doing here wrong? If anyone really needs code, I could publish it, but it is not to the code, but to the clock configuration (i am almost fully sure). Specifically, I am using this MCU CARD: https://www.mikroe.com/mcu-card-for-stm32-stm32f437zg. Thanks in advance. And again sorry if this really undeclared and not relevant question. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Quick update, on Windows when "loaded", it shows USB device not properly working. When using clock config from STM32F407VGT6, bootup time is 1min 4secs. Also, sometimes even code like blinking LED for 5 times, when executed in Thonny, I wait about 5secs (or less) before code execution starts, after uploading file. Only difference is that with my clock config, bootup time is less, but again very big, and with my clock config, MP does not work. |
Beta Was this translation helpful? Give feedback.
-
So, I fixed the oscillator problem. As the USB protocol and STM32 requires very specific clock setup, this is what I got and what is required:
When looking at schematics of my MCU card, I noticed there is 25 MHz HSE oscillator, but in some software of that company, I get wrong values (that is HSE 16 MHz). This may help others. Only problem is that bootup time is VERY VERY big (1min 4s until USB device pops up)! Do any of you know what is here problem, and how to fix it. Maybe I should mess around HSE_STARTUP_TIMEOUT & LSE, and at RTC config? Please help. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Resloved in #13366. The USRSW pin was a problem. Check last comment. |
Beta Was this translation helpful? Give feedback.
Resloved in #13366. The USRSW pin was a problem. Check last comment.