Page 19 of 35

Re: Fred's firmware development diary comments thread

Posted: Mon May 03, 2010 10:40 am
by jharvey
I think they call that toilet humor ;)

As a quick note, in the Doxyfile, the input can be set to ../src/

Re: Fred's firmware development diary comments thread

Posted: Mon May 03, 2010 7:53 pm
by sry_not4sale
Loving the frequent pushes! :D

Re: Fred's firmware development diary comments thread

Posted: Tue May 04, 2010 12:30 am
by Fred
Just like the old days ey ;-) I can do another one right now :-)

Re: Fred's firmware development diary comments thread

Posted: Fri May 07, 2010 10:38 am
by jharvey
In simple.c, what was connected to PORTJ |= 0x80, what that the injector, or perhaps something different?

Re: Fred's firmware development diary comments thread

Posted: Fri May 07, 2010 6:24 pm
by Fred

Code: Select all

		// echo input condition
		PORTJ |= 0x40;
Nothing, in the Volvo, but an LED on my bench rig. It's diagnostic and debug stuff. It's the same in all the other files too...

Re: Fred's firmware development diary comments thread

Posted: Sun May 09, 2010 2:41 pm
by jharvey
Great, you had me a bit concerned when I saw that. I'm trying to piece together the general way signals flow through this puppy.

It looks like the normal path for the input RPM signal is tied to, and is configurable in, interrupts.c. I see PrimaryRPMISR ties ECT0 to PT0, which is pin 11 on the chip. I also see http://docs.freeems.org/doxygen-html/d8 ... c6f68cc600 enables both primary and secondary inputs to be IRQ's, such that pin wiggling will cause PrimaryRPMISR to run. Doxygen leads me to be believe that typically it will update "PrimaryTeethDuringHigh" and "PrimaryTeethDuringLow". However I'm a bit confused, if you click the PrimaryRPMISR, it brings you to a chunk of code that notes "Definition at line 71 of file LT1-360-8.c." However, if I open simple.c and search for PrimaryRPMISR, I find a PrimaryRPMISR function. This function name appears to be defined twice. I believe the simple.c version is the one that was run, so I'm a bit confused about how it knows to use that Simple.c's PrimaryRPMISR, vs the LT-360-8.c's PrimaryRPMISR.

So lets start from the other end. I see InjectorXISR is a macro which when compiled will turn into Injector1ISR, which correlates to ECT2 to PT2, which is tied to pin 13. InjectorXISR is referenced by several other pieces of code, but is set by ???. Also I see the first thing it does is to clear IRQ flags, but those were disabled with init, so they must be turned back on some where I guess.

Was the RPM signal connected to pin 11? Also was the injector connected to pin 13? If not what pins were they connected to?

Perhaps a Doxygen note for http://docs.freeems.org/doxygen-html/d6 ... c9c8d9b2e7 would make it easier to navigate macros like this. Something that notes, this is a macro generated section of code, see code X for that macro code.

Under http://docs.freeems.org/doxygen-html/d6 ... b4048a43ef, I was wondering what CAS was for. Perhaps CAM Angle Sensor? I don't see that in the glossary section.

Re: Fred's firmware development diary comments thread

Posted: Mon May 10, 2010 5:11 am
by Fred
OK, PrimaryRPMISR is there N times, as is secondary, where N = number of different types of decoders. The doxygen probably doesn't quite understand the linking the build multiple times as a plugin architecture like that, though. Something to look into for sure, but it's only a doc thing.

Similarly for the Injector ISRs, there is one macro copy of the code, as you discovered, and no real version in the source until after pre-processing. Again, not sure how doxygen deals with that, but it's just a doc issue.

Feel free to experiment with flags, settings, directives/tags in the comments, whatever and find a solution to the doc problem for both of those issues. I'll include your changes if you come up with something, just push it to github and let me know to pull :-)

As for the interrupt enable on the fuel pins, that is done per RPM ISR event requiring it. The simple code just toggles the first channel which is ETC2 IIRC.

I don't roll with pin numbers, I roll with device numbers/names. ETC0 is primary rpm and this is the only thing active in the Simple setup. ETC1 is unused in Simple. ETC2 is the fuel output channel. 3 - 7 are unused.
Perhaps a Doxygen note for http://docs.freeems.org/doxygen-html/d6 ... c9c8d9b2e7 would make it easier to navigate macros like this. Something that notes, this is a macro generated section of code, see code X for that macro code.
Interesting! I hadn't noticed that. Feel free to contribute a fix via github, I can review before pulling it in and get you to tidy up any loose ends etc :-) You can become an actual firmware contributor! :-o :-)

Under http://docs.freeems.org/doxygen-html/d6 ... b4048a43ef, I was wondering what CAS was for. Perhaps CAM Angle Sensor? I don't see that in the glossary section.[/quote]
Yes, Cam Angle Sensor, again, get it done, let me look it over, polish it, then I'll pull it in :-)

Fred.

Re: Fred's firmware development diary comments thread

Posted: Mon May 10, 2010 10:46 am
by jharvey
I'll give it my best shot and see what I can learn about flags and such. It will probably be a couple days before I get a chance to help contribute rather than just critique. I'm still trying to get the basic structure down.

Re: Fred's firmware development diary comments thread

Posted: Mon May 10, 2010 11:41 am
by jharvey
Do I understand the process correctly, if I push, you can then merge the changes I've pushed. Looks like updating the glossary.h is fairly easy. So I did it, and pushed it. However, I got this message.

git.exe push "origin" master:master

fatal: remote error:
You can't push to git://github.com/fredcooke/freeems-vanilla.git
Use git@github.com:fredcooke/freeems-vanilla.git

I suspect that's mostly because I have read-only access. I tried changing the URL to git@github.com:fredcooke/freeems-vanilla.git however, that flopped on authentication. Sorry I'm a git NOOB

Re: Fred's firmware development diary comments thread

Posted: Mon May 10, 2010 2:03 pm
by Fred
You've cloned my repo not your own. You need to fork on github and clone your own repo. Then push. Keep the existing repo, do as I've said, then just swap the .git/config file across to the old one with your new commit(s) in it. Then push from the old one with updated config. Also, make sure your stuff is up to date, ie, that you committed against the latest stuff that I had up there. If not, learn how to use git rebase too :-)