Closed rusefillc closed 3 years ago
Auto DFU tests USB power only.
-3 boards selected with different chips and build dates. Each board was power cycled and tested 5 times for Automatic DFU functionality.
H72c w/F429- Pass-5 Fail- 0 H64a w/F407- Pass-0 Fail- 5 H64b w/f407- Pass-1 Fail- 4
H72c
H64a
H64b
not hellen with old 407 SW dfu jump works!
that's inconclusive
i also have 2nd 176 407 from same pack of samples
that opens many possibilities but i would compare designs arounds caps etc before we go swapping parts
maybe up some caps?
@dron0gus
With the PROG button held (ie, MCU always enters system ROM at reset), the reset line is triggering every exactly 1 second, so something is triggering a hardware reset after ~1 second
Reset is low, not reset is high:
The large period at the left is me pressing the physical reset button, then the ~1 second spaced blips are the MCU resetting itself (internal resets are implemented on the STM32 by physically pulling the nRST pin low internally with a transistor).
When attaching a debugger to a completely blank chip when boot looping the bootloader, it says the software reset bit is set in RCC register CSR.
Here are an old MRE (f407), f4 disco, and hellen probed at the OSCOUT (PH1) pin:
hellen:
microRusEfi:
F4 discovery:
OMG
I replaced $0.2 part with a "crystal and caps" that is guaranteed to oscillate well within the allotted time (edited)
the bootloader waits 800us for the clock to start
if the clock doesn't start in 800us, it triggers a system reset
our clock is locking in ~900us or so
The above photo is injecting an 8mhz sine wave in to the OSC_IN pin - so that we can guarantee the "crystal" will have locked
Evidently the F42x bootloader waits longer, because on a random proteus board it takes even longer, but the bootloader still works perfectly
With the F407 discovery's oscillator transplanted on to the hellen121a PCB:
...and of course DFU works perfectly, both with the button and software reset.
There are some JLC drop-in alternatives to consider:
Here's a similar topic already discussed: https://community.st.com/s/question/0D53W000004lc5NSAQ/dfu-over-usb-not-working-hse-not-detected
This will add support for alternate crystal speeds without different firmware: https://github.com/rusefi/rusefi/pull/2952
Also there are some JLC drop-in alternatives to consider: C122522 C172361 C111120 C90881
You may also try fitting 3225-2pin package on 5032 footprint
NX3225GD-8MHZ-STD-CRA-3
higher freq crystals require less drive and are physically smaller, so should be able to start faster
520-200-12-30-AEM-TR
Maybe this is linked to the embedded bootloader version:
V3 on STM32F407 and STM32F401 V7 on STM32F427 V9 on STM32F446
Check AN2606 for details
digikey stuff in stock
H130A-8.000-8-2030-TR 8 MHz 2845-WTL5G60390VH-ND 8 MHz 535-9105-1-ND (20 MHz ESR 30 Ohm) CTX1436CT-ND (16 MHz, ESR 40 Ohm) 644-1037-1-ND (16 MHz, ESR 120 Ohm)
Ordered a stack of 16 and 20MHz options from digikey, will test soon on 121vw
@BeerMoneyMotorsports please order qty 20 of
ABM3-20.000MHZ-B2-T 535-9105-1-ND 20 MHz ESR 30 Ohm
I believe that we have major improvement in Hellen72 rev D behavior
@mck1117 says that 20MHz crystal ABM3-20.000MHZ-B2-T starts in ~250us
looks like minimal fix for Hellen MCU is to jump from 8MHz to 20MHz and move on?
@andreika-git @mck1117
We have reports of two or three kinds of Hellen boards failing to reboot into DFU via "reboot_dfu" command
Same reboot to DFU procedure could be initiated by rusEFI console using "Program" button while "Automatic DFU" is selected
This issue is NOT about "reset" or "PROD" button, the scope of this issue is ONLY software-based reboot to DFU
Steps to reproduce: 1) have a Hellen board with 407 chip 2) have Hellen board with 407 blink blue LED 3) connect via USB 4) hit "automatic DFU" in rusEFI console
expected result: DFU process starts
actual result: board reboots into normal operation