View unanswered posts | View active topics It is currently Mon Aug 19, 2019 9:49 am



This topic is locked, you cannot edit posts or make further replies.  [ 21 posts ]  Go to page 1, 2, 3  Next
SM Re-Development in GCC + Customisations/fixes 
Author Message
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
EDIT: Comments here: viewtopic.php?f=8&t=1243

Tasks, to be performed in order, with revision control and verified by multiple developers, including me, but definitely at least one other, preferably more than one:

  • Rewrite the 2k binary SM for GCC, from scratch, until we have an identical binary to the TA provided one with fresh GPL code.
  • PORTA pullup off fix - may require TA mods , check this.... YES, see below.
  • Startup logic fix, don't check serial pin state!
  • Erase all fix, understand why it doesn't, then make it work.

Perhaps other simple things?

Rewrite to be more simple and use more robust serial comms?
Rewrite to use another comms method such as CAN?

TA users will need to:

  • Bridge 1k resistor to ground
  • Add 2k resistor to 5v

I consider that acceptable/easy. TA schematic is here:

Image

Sean has put up a repo of the original modified Freescale sources for code warrior, but:

A) I will not run windows and will not download codewarrior to build it
B) I don't want to distribute a not-completely-free SM with FreeEMS
C) The sources are pretty messy for many different S12 variants.
D) Making it available for GCC will make customising it for various purposes more straight forward
E) etc.

Hence GCC target and plan.

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!


Wed Jul 13, 2011 3:25 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
I have analysed the situation at a meta level in detail and have a 12 step plan to implement before the above changes are applied.

The first step is underway, however if that fails it doesn't matter much.

The next six steps should take less than a day.

The following five steps should take less than a day too.

The above changes range from stupidly simple to slightly tricky but should also not take more than a day.

Total estimated work: 3 days. (assuming working ONLY on this, which is unlikely)

Only the last two steps and our changes require a BDM to do, so I can carry on with this and get most of it done while I wait for it to arrive.

I'll be less vague about the steps involved once I've completed them and published the work.

I've split this thread into a comments thread now too.

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!


Sat Jul 16, 2011 2:26 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
The original step one is complete. Things were not as I thought, so there is a new step one which is now underway instead :-)

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!


Sat Jul 16, 2011 4:55 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
I finally did some experimentation today. This is what I found:

Saleae Logic analyser attached to reset pin and a PORTA pin and with the last commit we see 1.29ms of port high with a 4us delay post the reset rising edge before it comes up. I adjusted the code to run DDRA = ONES; first before init and the result is 1.113ms proving that it's simply a port config thing left over from the SM running (register state doesn't get reset!). Then I replaced that with PUCR = ZEROS; and got the same result.

So, this PROVES that the SM pull up is the issue just as Chris discovered/realised/found out for us.

Back to the code now!

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!


Fri Jul 29, 2011 4:36 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
The standard code also checks the vector space before checking the pin states. I propose that for our version we remove that so as to come out of reset to either firmware or SM a few clock cycles sooner and keep the asm simpler too.

It might be worthwhile ripping out all of the debug style stuff too as I don't think any of it works the way we use it anyway.

I wonder if there would be enough room for a better protocol in tandem with the standard one if all that was done? An extra command byte could be added to switch into that mode. Then you could open comms, switch mode, check connection, and proceed to perform all operations with checksums and/or packet delimiters.

_________________
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!


Sun Nov 13, 2011 4:09 am
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
Yesterday's development of loading code using a BDM on Linux opens the door to resume work on this in the near future. I'll have to dredge up my notes and sources and spend a sunny Sunday afternoon hacking away on it. With RavAGE drawing ever-nearer to production this will become important soon, especially to simplify choices of isolation devices.

_________________
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!


Thu Mar 08, 2012 3:25 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
Received a package from China today and found some sweet tweezers inside. And a K type tcouple, so decided to work on the oven

viewtopic.php?f=37&t=1592&p=24905#p24905

Also wrote some sweet docs for keeping people on the straight and narrow version wise:

viewtopic.php?f=54&t=1639

Will try to achieve a bit more before bed, but still need dinner and wife duties, and it's 10pm already, so might be squeezing it in tightly.

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!


Fri Mar 09, 2012 9:59 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
In a week or two I'll receive an autographed serial-numbered Jaguar A3 board for my collection of prototype FreeEMS hardware. Once that arrives I'm going to assemble it and then use it to test new SM variants. That will eliminate hardware hacking by way of PNP mod for anyone designing new boards. Specifically it will allow Andy to un-mod his boards and proceed with a more sane setup. Once it arrives that will be my highest priority. In the mean time I have some other things going on that need to be handled, including ignition control for DIS setups, which actually should be easy. I'll likely get that done with Andy on the phone tomorrow so he can really get stuck into tuning his Deuce Coupe :-)

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!


Sat Mar 17, 2012 8:16 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
It's here! I'm still waiting on parts from China/HK to arrive, but I could/can hand solder it in the mean time, or just guess the temperature profile. I also need to pick up a BOM for it. I got most of the caps already, but have to get more stuff for it.

_________________
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!


Fri Apr 13, 2012 2:00 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15319
Location: Home sweet home!
And for the first time, it talks reliably! Now I either need this to happen, or to hack in a PNP, so I'd better get this done! I need the board working for a secret project.

_________________
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!


Wed Aug 22, 2012 9:09 pm
Profile WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 21 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.