Page 1 of 1

UAEFI vs 407disco (actual) startup times difference - SOLVED

Posted: Tue Mar 12, 2024 2:49 pm
by gurov
kind of comparing apple to rotten potatoes here, but would be neat to have a reason for why delay after 12v is applied is different on UAEFI compared to basically same 407 disco setup:

UAEFI startup sequence, 4 super bright LEDS are stepper motor coils https://rusefi.com/online/view.php?msq=1623



407 disco actual based https://rusefi.com/online/view.php?msq=1624



the delay between switch on (+12v) and when the 4 leds start flashing (stepper motor moving home) is significantly longer on the 407 disco.

what could be the cause of that ? sdcard logging is turned off on 407 disco ecu. i tried turning spi busses off as well, and that made no difference.

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Tue Mar 12, 2024 2:59 pm
by AndreyB
Try running uaEFI firmware on f407disco and vice versa?

A ton of compile time options are different between these two firmware one would be around https://github.com/rusefi/rusefi/commit/e8b1fc302f71a3df2162235dba02f0e3f91bf01f

One day someone should add some timestamps into start-up console message but for now maybe try once this change builds https://github.com/rusefi/rusefi/commit/05d744b8f29549af6a11e24fe2ffa3ab343cc63d

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Tue Mar 12, 2024 3:06 pm
by gurov
hmm, perhaps once i get better gate drivers for the ignition setup on there that doesn't need to start inverted.

the pinout isn't quite the same between these two setups, so maybe disco firmware on uaefi could work if i set just a basic proof of life sign up.

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Tue Mar 12, 2024 3:14 pm
by AndreyB
gurov wrote:
Tue Mar 12, 2024 3:06 pm
hmm, perhaps once i get better gate drivers for the ignition setup on there that doesn't need to start inverted.
Ohh that's what this is all about? Ignition setup depending on start-up time seems like a signal of danger ahead.

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Tue Mar 12, 2024 3:51 pm
by gurov
i'm using a low-side driver to drive the coils, uln2803a IC to pull down 5v low. ignition is in "inverted" mode in ignition setup.

so the startup time impacts that portion of the init sequence

in this video:

the LED array on the left is ignition coils (L2=cyl1, L3=cyl2, L4=cyl3, etc)

you can see they light up after switch on, and then go dark.

so a small quick blip would be fine, but charging for a few seconds before the "inverted" sets the right output to the pins:

image.png
image.png (6.15 KiB) Viewed 1767 times

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Tue Mar 12, 2024 4:01 pm
by AndreyB
It would be off "startup times difference" topic to start discussing pull-ups etc.

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Tue Mar 12, 2024 4:08 pm
by gurov
it's not, that's just a way to generate a +5v signal for coils using this kind of driver and using "inverted" ignition setting.

that part works fine, and it works fine once it's initialized.

this is how old megasquirt1/2 would set up smart coil ignition from the front LED that were driven by low-side drivers.

regardles of this particular hardware setup.

problem statement: "Inverted ignition" setting takes too long to apply to running pin state

expectation is that default pin state would be the very very super first thing configured after power on, maybe right after saying hello, because it's set to inverted for a reason.

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Tue Mar 12, 2024 4:18 pm
by AndreyB
At the moment that's DEFINITELY TOTALLY NOT THE CASE, PROCEED WITH CAUTION.

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Tue Mar 12, 2024 4:23 pm
by Dron_Gus
Good practice is to have HW protection against unwanted state during power on. So cpu can stay under reset/flashing state without any hw harm.
Default pins states are defined in STM32 manual.
Yes it takes some time for FW to start, init, load settings and apply this settings to pins.
If reset state of STM32 gpios cause some unwanted activity on ECU output - better to review HW, add inverters, pull-downs/pull-ups, EN signals and so on.

Re: UAEFI vs 407disco (actual) startup times difference

Posted: Fri Apr 12, 2024 12:24 am
by gurov
the startup time difference is solved by soldering sb10 on disco board bottom:

https://rusefi.com/forum/viewtopic.php?f=4&t=2747