XGATE

Official FreeEMS vanilla firmware development, the heart and soul of the system!
johnsop1
DIP8 - Involved
Posts: 26
Joined: Tue Jan 13, 2009 1:56 am

Re: XGATE

Post by johnsop1 »

Thanks Fred,
I'm not sure how that will work. You might find that it doesn't work well with other ISR code doing stuff under it.
I am sure there will be some problems. I am just looking for someplace to start learning how to get XGATE code running.

Philip
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: XGATE

Post by Fred »

I haven't done anything with the config/setup at all, but I did read through the spec after I posted. My understanding of XGate was a bit wrong to say the least. Based on what I read I have a few comments. I'd like to hear your thoughts on them :

Because it should be running from RAM, we should keep the code for it very simple. This may rule out comms in the medium/long term without a change in code design but it's fine to experiment with it now. I didn't realise that it sat idle and just ran jobs on a trigger basis. This makes it ideal for configuring injector and ignition channels, but terrible for comms and decoding due to the latency it would mean to other threads from largish code.

So, past the experimentation phase I'd expect we may use it for :
  • ECT config and ISRs (fuel channels)
  • PIT config and ISRs (ign and staged channels)
  • Maybe RTC ISR or perhaps aspects of the RTC code IE, the RTC runs in CPU and then fires off jobs to be run on the XGate.
  • Maybe comms ISR or some subset of it with the main ISR code on the CPU and jobs to do certain things on the XGate.
We are going to need to be really careful about memory usage with it OR rework some of the other memory hungry features and code.

Thoughts?

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!
johnsop1
DIP8 - Involved
Posts: 26
Joined: Tue Jan 13, 2009 1:56 am

Re: XGATE

Post by johnsop1 »

I think you are on the right track thinking the XGATE could be used for
# ECT config and ISRs (fuel channels)
# PIT config and ISRs (ign and staged channels)
If we used the XGATE to set up PWMS for fuel and to set up PIT for ignition would we have enough hardware to do sequential fuel and cop on a V8? (That is the holy grail in my opinion)

Philip
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: XGATE

Post by SleepyKeys »

Well, I think it would be TRICK for staged injection for sure, but it wouldn't be as accurate as PIT, would it ? Almost a year ago I(v8 guy for the most part) accepted the likely fact that we would not have seq for V8 until we made the move to the xep100.

I could see PWM operating a second set of injectors inorder to lower the duty cycle(in steps maybe) so that precise fuel control can be maintained with PT driven injectors.

Example main injector DC >90. Fire second set at $DC, so that the primary DC can be dropped to 50%, or something. Fred/others would have to chime in to find the flaws in that logic.

-sean
You snooze, you lose!
baldur
QFP80 - Contributor
Posts: 44
Joined: Tue Aug 19, 2008 4:05 pm

Re: XGATE

Post by baldur »

The proper way to do injector staging would be to have a table of load/speed that gives the split between the injectors. 0 being run only on main injectors and 255 being run only on secondaries.
What you do in the fuelling algo is take the calculated fuel amount, apply the split before you add the injector dead time. Then you have a multiplier for the secondary injector size in relation to the main injector size.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: XGATE

Post by Fred »

Phil,

I was reading through the docs again over the last few days train rides while trying not to fall asleep with no caffeine in me and suddenly realised (obvious, don't laugh) that we can just run it out of flash in the short term.

If we get started running it from flash then we can carry on with development. I've made rearranging the memory my number one priority, but that will take more reading and research to be done properly. I think the best approach right now is to just start working on it in flash space with the knowledge that the speed will double when we shift it to ram.

I'd like to hear your thoughts. If I've demotivated you by taking so bloody long, please tell me that too.

In any case, I think the xgate is the right approach and I need to go and make another post now somewhere else to that effect.

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!
johnsop1
DIP8 - Involved
Posts: 26
Joined: Tue Jan 13, 2009 1:56 am

Re: XGATE

Post by johnsop1 »

suddenly realized (obvious, don't laugh) that we can just run it out of flash in the short term.
Running from flash sounds like a good way to start. We may not need the speed from running from ram anyway.
If I've demotivated you by taking so bloody long, please tell me that too.
Don't worry about demotivating me. I have plenty of other projects and ideas to keep me busy. (I finally got my 25 year old Fiero running)

When you are ready to go, I we be ready to take another look at X-Gate.

Phil
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: XGATE

Post by Fred »

I like the multi-lingual slant :-)

Is there any chance of the Fiero ending up in user rides? Another (infrequent) diyefi user has one and would more than likely appreciate yours :-)

I was looking over the docs on the flight down to spain (between staring at the windy roads, snow caps and forest on the pyrenees mountains) and should understand the change required soon enough.

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: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: XGATE

Post by Fred »

Just for anyone reading this, the new XGATE assembler is now required to build vanilla FreeEMS code! So if you want to experiment and hack with it, go nuts! :-) It IS running out of flash, and there is some BS involved in loading code due to hcs12mem defficiencies, but XGATE is in and working.

http://tools.diyefi.org for the tools, help yourself!

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!
Post Reply