2024-12-12 09:11 AM
Hi everyone,
I've designed a custom board using the STM32MP157. Rather than using an ST-Link, I'm planning to flash the code using DFU mode. To do this, I've installed STM32CubeProgrammer on my PC and connected the USB cable to the board. However, CubeProgrammer isn't detecting the STM32MP157, even though I've configured the BOOT pins for DFU mode.
I'm wondering if I'm missing something. Can anyone guide on this issue?
Solved! Go to Solution.
2024-12-13 07:32 AM
Hi,
all the voltage in STPMIC1 will be automatically handled by Linux with correct Device Tree (including overclocking voltage frequency to 1.35V/800MHz when required by the processing).
Btw, I did not see any DDR memory on your schematics. STM32MP15 is barely not usable with external DDR memory (where the Flash code is loaded during boot).
Regards.
2024-12-12 10:00 AM
Does it work on an EVAL/DK1 board?
Does Windows recognize anything being attached?
Check viability of the USB Device implementation on your board, and any clocks the STM32MP157 needs for USB functionality.
2024-12-12 07:52 PM
Thank you for your reply. I haven't used the EVAL/DK1 board. Instead, I've designed my custom board based on the standard schematic provided by STMicroelectronics for the EVAL board, making modifications as needed.
Here are the specific connections:
USB_N | P11 (Y16) |
USB_P | P12 (W16) |
USB_detect | OTG_VBUS |
The USB_detect signal is a 4V signal derived from VBUS, which becomes active when a USB cable is connected. USBFS and USBHS pins receive 3.3V signals.
The board utilizes a 32.768 kHz basic oscillator connected to P2 and P1. Additionally, a 24 MHz oscillator is connected to T2 and T1 pins. Should this 24 MHz oscillator be enabled for USB-based coding in DFU mode?
I'm encountering some difficulties and would appreciate your guidance.
2024-12-12 11:56 PM
Hi,
DFU is not working on OTG_FS pins, you should use OTG_HS ones.
Regards.
2024-12-13 12:00 AM - edited 2024-12-13 12:02 AM
I have activated both FS and HS pins by connecting it with 3.3V. The High Oscillator also working, HSEIN and HSEOUT is 25Mhz. I checked it on an oscilloscope.
2024-12-13 12:15 AM
Hi,
maybe share some schematics.
using EVAL or DK board is ok, but if any changes, you need to follows AN5031.
Did you use STPMIC1 ?
to support USB boot with HSE 25MHz, you needs to fuse OTP (this frequency is not part of auto-detection). Maybe better in a first intent to use the recommended 24MHz.
https://wiki.st.com/stm32mpu/wiki/STM32_MPU_ROM_code_overview#USB_boot_on_STM32MP1_series
Regards.
2024-12-13 02:44 AM
Yes, I am using STPMIC1. It is still not working. I have a simple question: Which signals and pins are required to detect the stm32mp157 through a USB cable in DFU mode?
I used DN/DP and USB_OTG pins of MPU and connected it to a micro USB connector. Will it work?
2024-12-13 02:55 AM - edited 2024-12-13 02:55 AM
Hi,
according to AN5031, only 2 wires are enough
on 18x18 LFBGA448 this is AB14 for USB_DP2 and AA14 for USB_DM2.
Apart supplies, need to have 24MHz HSE crystal or oscillator of 8, 10, 12, 14, 16, 20, 24, 32, 36, 28, 40, or 48 MHz.
Output PA13 should be toggling at about 5Hz when in 'serial boot' mode until attached to a PC with USB or UART. need a pullup on PA13 as driven open-drain by the BootROM.
Regards.
2024-12-13 03:19 AM - edited 2024-12-13 03:22 AM
2024-12-13 04:55 AM
Hi,
you must use USB_DP2 and USB_DM2.
could you please point us where did you find on the EVAL board ?
https://www.st.com/en/evaluation-tools/stm32mp157f-ev1.html
I see this
No USB connected on PA11/PA12 (although it support USB full-speed, it cannot be used for DFU boot)
So, the only possible option with your current board is to program the SD-Card on the PC.
https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command
Regards.