Fred's firmware development diary

Official FreeEMS vanilla firmware development, the heart and soul of the system!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

A chance encounter with some strangers left me a little naturally high, and I couldn't sleep, so I added time based loss of sync to the generic decoder. Another job done, another step towards world domination :-) 5am, time for bed, I think, maybe.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

Today I brought the forum up to date and investigated lang packs for it, nope, sorry, English only for the forum infrastructure.

I also just proved what was going on with the missing packets with MTX here http://issues.freeems.org/view.php?id=179 and created this issue to help diagnose any type of comms incidents: http://issues.freeems.org/view.php?id=279

Apparently interrupt load is too high and the serial interrupt priority is too low and thus bytes are being lost on receive (and delayed on send, though this does not matter) causing packet errors. Fixing that simply involves optimising all other interrupts. Doing that involves profiling what is taking a long time first. Not high priority stuff, but definitely has to be worked on.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I discovered a neat little diagramming tool today:

http://plantuml.sourceforge.net/activity.html

So I had to play with it...

viewtopic.php?p=18114#p18114

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I got a log file from Preston in NZ this morning. He has some noise issues which we're trying to solve, but the log was very useful :-)

Without the timing check code he would have been 50 or 60 degrees too advanced for one or two cycles, max.

http://www.google.com/search?hl=en&safe ... .1.0.1l8l0

Instead it just cut ignition for a few cycles and then carried on.

HotelHappySyncLogic.png :

Image

Though there was some weird V drop style noise (instant drop of 0.25V) with some slow recoveries on his battery signal. We're going to hook up a sense circuit for the power supply AND the battery itself and compare notes. That will tell us if the V drops are vehicle wide or on his board. V drops HotelUnHappyBatteryConnection.png :

Image

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I just spent half an hour and dumped everything that I think I know about wiring up engine management into a thread for people setting up systems for the first time. This should prevent some issues if people actually read it and largely heed the advice within.

viewtopic.php?f=54&t=1349

Last night I was working on Preston's stuff and came to the conclusion that he has a weird setup! :-)

Image

RPM, % input arrival error, which input event.

The reason for the steps in the error plot is just interference patterns due to sampling rate. The fact that it is of a larger magnitude with RPM is of concern. This effectively means that Preston's car has a variable width hall sensor, or that he has a mechanical issue. I can't fix that in software, sadly. Well, not by any reasonable means, anyway. It definitely comes under "won't fix" and/or "fix your car" :-)

The plot is interesting, though.

If it turns out that he doesn't have any mech issues, and it really does that, then we will switch him to a single edge decoder and call it a day. If he locks the dizzy then we will also add a latency setting such that he can get flat timing from idle to redline even with his input moving around like that.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I did a stack of work today, 10 hours coding, 8 commits!

Result is way less memory used, way better debug-ability for an end user, a few cpu cycles saved, better readability in code, and more ready for further work on logging in the near future.

Ben Fenner has been putting some solid hours into OLV too, looking forward to using that tomorrow, with some luck! :-)

Hell, I think I saw SeanK pushing a few loader commits today too! Wonders will never cease :-)

A great day!

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

Ben Fenner has been working MAGIC on OLV and SeanK is continuing to make commits against the loader!

Mean while I added stop and jog functions to the bench test stuff along with a lock out if it's already running.

And a few other closed issues.

MTX and OLV need updates to work with the firmware now, so I'm working on that nowish along with a howto for log reading.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I had a neat little idea: http://issues.freeems.org/view.php?id=296

Tacho and knock windowing will be available as soon as Sim builds a circuit for his tacho.

In other news, I've been hacking on the OLV source all morning, making slow but steady progress :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

viewtopic.php?p=18398#p18398

OLV is now up to date with the firmware, and MUCH easier to KEEP up to date with the firmware. PLUS, Ben's work is making use a real pleasure compared to before! Top work on both his part and mine, damn it! :-)

Debugging missing teeth tomorrow using OLV, then updates to MTX.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

http://issues.freeems.org/view.php?id=288#c390

MTX is up to date, and the firmware is now fixed, it had a slight issue. I need to move to a staging area for my commits so that people can have a dev and trusted repo to pull from. I'll get onto that pretty soon, I guess.

Tomorrow is fix the missing tooth code which is not working right. I might get an early one tonight, though.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Locked