XGATE PIT based bit bang fuel injection

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

Re: XGATE PIT based bit bang fuel injection

Post by Fred »

Does the return of the instruction end up in the register that contained the address or something weird like that? Is the S12 accessing B at all or BA at all? or even A? IE, did you disable the fuel pump stuff? Random, probably useless, thoughts. Good luck.
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
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by SleepyKeys »

Nope that was my initial thought too, it seems like its a dual access problem because if I add a NOP instruction or two I get a different result. I looked though the main code and saw that nothing was touching B, your fuel pump code writes to A as a byte. Sounds like its time to hit the freescale docs/forum. thx!
You snooze, you lose!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by SleepyKeys »

SOLVED!
I was working with corrupt memory! It wasn't my codes fault but at least it was a 1 line fix.
#define XGATE_RAM_ALLOCATION_SIZE 0x0400 /* 1 KBytes */ it was 0x0200

Yes I have been that busy :) again RISC EATS space :(
You snooze, you lose!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by SleepyKeys »

I guess partially loaded memory would be a more correct way to put it. We may have to leave this code where it lies, that's an awful lot of linear s12 ram to use to up.
You snooze, you lose!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by SleepyKeys »

A screen shot with delay and runtime parameters of 0, in effect running my code and banging the bits on then off as fast as possible. Not too bad ey?
Image
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by Fred »

And why I told you that comms are likely to stay on s12 ;-)
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
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by SleepyKeys »

Yeah I c haha, but if we give other threads a lower priority the effect should be minimal. Hey if it can't do comms too fine by me :)
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by Fred »

Nah, it was always a memory thing, and in the first instance, until proven otherwise, a latency thing.

BTW, re the on off time there, that's going to be a function of the amount of code that runs each time, how it is ordered and how it deals with time. Once you have full relative timing logic in there things could get much worse. Still, much worse = more than good enough, so who cares :-)

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
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by SleepyKeys »

How do you want me to handle a schedule interrupt if the event of interest is currently running(Pin banged on)? Right now it just skips trying to do anything with it. If it's on its way and you want to schedule it again just reschedule right and dis guard the old values it had?
thx!
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: XGATE PIT based bit bang fuel injection

Post by Fred »

Do you mean schedule an injection/dwell? You need to have layers of data. It's the normal case that it's currently on/running and that the next one starts after the current one but is being scheduled in advance. Phone call tomorrow 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!
Post Reply