Search found 125 matches

by mk e
Wed Jan 22, 2020 6:47 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

I may have more going in what I call fuel calculations and the you do. This is the fuel script that assembles the subroutines I call (with there inputs listed) I think this is all fuel other than the .\Cylinder_Trim.elcfg item and remember its a higher level language that best I can tell is just cal...
by mk e
Wed Jan 22, 2020 3:44 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

I guess I could add a timer to the thread itself which would clear up how long it waits in Que.....I'll have to thin(k) about that because as I said its library based so easy in C is not always easy. I looked at it a little and so far haven't come up with anything as I only have access at the upper...
by mk e
Wed Jan 22, 2020 2:53 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

I guess I could add a timer to the thread itself which would clear up how long it waits in Que.....I'll have to thin(k) about that because as I said its library based so easy in C is not always easy. I looked at it a little and so far haven't come up with anything as I only have access at the upper...
by mk e
Wed Jan 22, 2020 12:37 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

What ECU is that? Remember that we have many threads (on the order of 15) that are all completely independent. Most of them are rate limited, but a few (Tunerstudio, for example) are not. So if TS isn't connected it uses exactly zero cycles. A bunch of stuff that might be on the same thread for you...
by mk e
Tue Jan 21, 2020 2:05 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Here's the thread times on the real HW for comparison. Thread 2 is the main fuel/spark calcs and I lied, the units are seconds. It's a simple dt, so time since last run and the thread is on a 7ms sleep. so actual run time is about (forgot to check actual sleep times) 9.64msec-7msec = 2.64msec on the...
by mk e
Tue Jan 21, 2020 12:14 am
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Here are my thread times running in the simulator on a PC.....I have a timer on each thread just cause....I'll try to load it into the HW and show the difference and clearly I need to fix the min. Times are msec.
by mk e
Mon Jan 20, 2020 4:13 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

do they have fpu? :-) of course....along with all the other stuff MCU chips normally have...built in watchdog, AN signals read, converted, moved to memory with no CPU action needed, buckets of timers in a time processing unit...purpose built for MCU use hence my confusion. The freescale MPC5xxx chi...
by mk e
Mon Jan 20, 2020 1:07 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

It's not a tight loop. We do the math in ~150us, then wait until it's time to run again, to rate-limit to 200hz. That is very fast. Is that just the calcs or does it include updating the sensor values, comms, and everything else while its being interrupted with time critical stuff? That is much fas...
by mk e
Mon Jan 20, 2020 2:40 am
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Yes - we already have this, in the form of the performance tracing. The processor loading is not bad at all. Our 200hz callback to compute things like ignition timing, fuel quantity, etc usually takes only a few hundred microseconds, even when running an engine at speed like in these tests. I can g...
by mk e
Mon Jan 20, 2020 12:23 am
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

I don't mean that it's necessarily exactly normal, but it's normal-ish to within the ability of my logic analyzer to measure. Of course (barring the long linear part) it has a longer tail on the slow side than the fast side, but it is at least bell curve shaped. Here's a zoom in on region 1: That p...
by mk e
Sun Jan 19, 2020 10:31 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

First, excellent data, well done collecting it. Don't let this thought be lost when I start talking about what I think I see. Looking at the data...there is no normal region, here is cause 1 and cause 2. I did some work years ago with 1 sided distribution (weld strength limited by the a hard stop at...
by mk e
Sat Jan 18, 2020 11:53 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Yes - more data coming. The existing improvements I made last week seemed to actually make my engine noticeably smoother - turns out reducing ignition timing jitter by an order of magnitude works wonders. I've been looking in to where the long tail in the timing inaccuracy is coming from, and the d...
by mk e
Sat Jan 18, 2020 5:46 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

I swear we're all somehow saying the same things? but when I read this: It's possible to build a zero jitter, zero error system even when using interrupts, provided your hardware timers are arranged properly. I know we are. Because the current solution does not do this, the whole FPGA idea now is t...
by mk e
Fri Jan 17, 2020 12:44 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Forgot...first things first, figure out where the current system limits are. It certainly works under some or maybe most conditions so its absolutely worth figuring out where the limits are before making it more expensive and complicated. How many channels are on the logic analyzer? 4? I ask becaus...
by mk e
Fri Jan 17, 2020 2:49 am
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Forgot...first things first, figure out where the current system limits are. It certainly works under some or maybe most conditions so its absolutely worth figuring out where the limits are before making it more expensive and complicated.
by mk e
Fri Jan 17, 2020 12:14 am
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

It just seems like a bad idea to pass time critical info between crazy fast and not so fast systems.....way back I learned the expression "put the aces in their places" and it's usually the right answer.
by mk e
Thu Jan 16, 2020 11:25 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

mck1117 wrote:
Thu Jan 16, 2020 11:09 pm
It's significantly more area and power required for not really any real performance benefit.
The benefit is crank decoding and spark have virtually no lag and no meaningful distribution tail. Interrupts are the devil.
by mk e
Thu Jan 16, 2020 2:23 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Dron_Gus wrote:
Thu Jan 16, 2020 2:13 pm
... But stm does not have such advanced timers. ....
[/quote]

hence the fpga thread
viewtopic.php?f=13&p=35305#p35305
by mk e
Thu Jan 16, 2020 1:42 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

I don't think so. If you're an OEM then you have no choice but to comply with any and all applicable standards but as a hobby yo have a lot more flexibility....as long as you've made an honest effort to go through and look at what could go wrong and addressed any that are a safety related I'd say y...
by mk e
Wed Jan 15, 2020 2:24 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Safety analysis would force you to use an automotive processor with support for ISO26262, in which case there are a large number of single and multi-core processors with advanced timers and many other features that are specifically designed to support engine management functions. I don't think so. ...
by mk e
Tue Jan 14, 2020 12:05 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

I think you said any PWM is also in this interrupt "line" but at a lower priority so as RPM increases at some point the lower priority PWM and SPI many not work......it would be very bad to leave the throttle on. Probably best to figure out where that happens so it can be avoided. The point will cha...
by mk e
Tue Jan 14, 2020 1:41 am
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

I was misreading the histogram :P ....now I'm most confused. Where is the data -2.9 - -4.8? Can you include crank teeth? Are they on the same priority or higher than what you're showing? If the higher priority choke out the low maybe worth logging something like TS that should be relatively low prio...
by mk e
Mon Jan 13, 2020 11:57 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

Note that neither of these things can accelerate the passage of time, which is why the distribution is one sided. It's physically not possible for us to be early (if the math is correct, which it is). This is sort of good that the long tail is in the late direction, since an early spark is very bad...
by mk e
Mon Jan 13, 2020 6:53 pm
Forum: Software
Topic: [info] rusEfi Scheduler Performance & Accuracy
Replies: 55
Views: 1042

Re: [info] rusEfi Scheduler Performance & Accuracy

That looks a LOT better, well done! A single mode shift of 0.2 deg is really not an issue, it will be adjusted for in the tuning. My only slight concern is it really looks like the 0,1us bucket is much bigger than it should be....suggesting a bi-modal distribution. Do you have an software to run a n...
by mk e
Sat Jan 11, 2020 9:28 pm
Forum: Hardware
Topic: TLE7209 or MC33186 H-Bridge Breakout
Replies: 17
Views: 844

Re: TLE7209 or MC33186 H-Bridge Breakout

I uses a pololu board for my throttle and they say add a large cap...I didn't and the board died. I bought a new one with higher current rating and add the cap and it seems good now so one or the other fixed it....but they say use a large cap so I'm guessing that's the answer.
by mk e
Sat Jan 11, 2020 12:17 am
Forum: Misc
Topic: FPGA in ECU
Replies: 31
Views: 3740

Re: FPGA in ECU

The FPGA should do trigger input timing measurement, but doesn't necessarily have to do RPM calculation. What makes you think it couldn't send every crank event to the MCU as required? Suppose you want to read 128 bits of stuff (rpm, timestamp, status, whatever) after every crank event at 8MHz spi ...
by mk e
Sat Jan 11, 2020 12:00 am
Forum: Misc
Topic: FPGA in ECU
Replies: 31
Views: 3740

Re: FPGA in ECU

I would think you could measure time between crank pulses on an fpga, send this to mcu to calculate rpm, fuel/spark timing and pulse widths and send this information back to the fpga to control the outputs. This should easily be achievable using spi since the data sent back and forth is minimal. Th...
by mk e
Fri Jan 10, 2020 8:55 pm
Forum: Misc
Topic: Is stm32f4 the right chip?
Replies: 136
Views: 16732

Re: Is stm32f4 the right chip?

My other question would be what happens to stuff ot on the due list like the fuel pulse and ignition timing as the number of time critical events goes up? As a general rule they should be done every 10msec or so......can you add something to track this to you project? If this is also good the you're...
by mk e
Fri Jan 10, 2020 8:24 pm
Forum: Misc
Topic: Is stm32f4 the right chip?
Replies: 136
Views: 16732

Re: Is stm32f4 the right chip?

excellent The way the freescale eTPU code worked some things were most important like: the duration of the fuel pulse is critical but but if start it end bounces around a couple degrees it doesn't much matter. The ignition end angle is critical but charge start and total duration can float a bit The...
by mk e
Thu Jan 09, 2020 8:46 pm
Forum: Misc
Topic: Is stm32f4 the right chip?
Replies: 136
Views: 16732

Re: Is stm32f4 the right chip?

A iCE40 FPGA coprocessor is ~$10 It's not quite that cheap. ... that always seem to be the thing of it in open source world. If it adds $100 to what was a say $200 project then 90% less people seem to want it from my limited experience. I think, for what like that is worth, that you guys have a gre...