cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F40x DFU Requirements

craig
Associate II
Posted on January 20, 2015 at 17:49

I've made my first PCB with the STM32F405RGT6 but unfortunately the DFU isn't working.  The device is never detected despite booting with the appropriate BOOT0/BOOT1 and FS_DP, FS_DM, and FS_ID connected.  I'm trying to troubleshoot and I have a few questions.

1. Anecdotal posts I've found along with docs for other STM32 parts seem to suggest that OTG_FS_VBUS needs to be >4V during selection (in addition to DP, DM, and ID) for DFU to work.  However, page 48 of AN2606 doesn't list OTG_FS_VBUS as a requirement for the STM32F40x.  A lot of designs I've reviewed have OTG_FS_VBUS (PA9) connected though suggesting it may be required.  Some examples of related chatter on this are:

https://groups.google.com/forum/♯!topic/phoenixpilot/B2q-Cwxx9fs

http://forum.chibios.org/phpbb/viewtopic.php?f=16&t=1080

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F105%20PA9OTG_FS_VBUS%20Issues

2. Page 17 of AN2606  (general section) depicts DP being pulled high using OTG_FS_VBUS.  I can't find what they're talking about in the note below to determine if I need this.  FWIW, all designs I've reviewed for STM32F40x parts don't implement this pull-up so I didn't either.

3. The DM/DP/ID traces are 10/10mil and only about 150mil long and the length of DP/DM are within 5mil of each other.  I haven't calculated controlled impedance but I figured I would be fine sticking with only USB FS (not HS).  Is it possible the problem could be here or does this sound fine?  I'm hoping I don't have to dig in too deep in this area since it's outside my current PCB skills.

4. ...any other troubleshooting steps I should take?

#usb #dfu #stm32
2 REPLIES 2
Posted on January 20, 2015 at 17:52

Do you have an external oscillator? What frequency? Does it start properly?

Have you run any code on this platform? Via SWD/JTAG

Does USART1 or USART3 work properly from the System Loader mode?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
craig
Associate II
Posted on January 20, 2015 at 18:02

(Note I edited my original post to correct the application note to AN2606).

I have 8MHz XTAL on PH0/PH1 and the system runs perfectly at 168MHz.  I've checked various clock outputs on my scope and everything checks out.  Code runs great via SWD and is what I'm currently using.  It's been running stable for months during development.  I just decided it's time to figure out what's going wrong with DFU as I get another hardware rev ready.

I haven't tested any USART.  I went straight for DFU and unfortunately don't have any pins available to test that.  I already looked and it will cause a couple routing nightmares to move things around in a future rev to free up a TX/RX.  As of now I can't but if it's critical I guess I could spin a board just to try that.

Once we reach a final pcb rev SWD will have to be removed for space and USB is the only user-accessible peripheral.