Page 1 of 1

Setting Baud rate

PostPosted: Wed May 24, 2006 4:06 pm
by LGT-3-6
I've been searching for a while, and yet cannot find what I'm looking for, does anyone have instructions or some source code showing how to set baud rate at the ECU? I suppose I could put a sniffer on ecuflash or something, but that seems like a wrong way around considering we have this forum!

TIA!

Re: Setting Baud rate

PostPosted: Thu May 25, 2006 9:20 am
by ev8siv3
LGT-3-6 wrote:I've been searching for a while, and yet cannot find what I'm looking for, does anyone have instructions or some source code showing how to set baud rate at the ECU? I suppose I could put a sniffer on ecuflash or something, but that seems like a wrong way around considering we have this forum!

TIA!


From ECUExplorer commSerial.cpp
Code: Select all
commSerial::commSerial()
{
   hCommPort = NULL;
   iCommPort = 0;
   sCommPort.Empty();
   iBaudRate = CBR_4800;
   iXonLim = 2048;
   iXoffLim = 512;
   iReadIntervalTimeout = MAXDWORD;
   iReadTotalTimeoutConstant = 0;
   iWriteTotalTimeoutConstant = 50;
}

PostPosted: Thu May 25, 2006 9:52 am
by LGT-3-6
Uhm, not what I was asking. I can program my serial port to do whatever I want it to do!

How do I get the ECU to communicate at a rate faster than 4800? Somehow ECUFlash seems to do this?

PostPosted: Thu May 25, 2006 10:19 am
by cboles
You can't, unless you change the code in the ECU, or you are running a kernel in the ECU. There is no command in the SSM protocol which simply switches the baud rate. Not that you couldn't add one...

PostPosted: Thu May 25, 2006 10:40 am
by LGT-3-6
cboles wrote:You can't, unless you change the code in the ECU, or you are running a kernel in the ECU. There is no command in the SSM protocol which simply switches the baud rate. Not that you couldn't add one...

Yes, I was approaching this conclusion after looking through your kernel source.. Perhaps I can load this kernel for my app. I just want to be able to datalog as fast as possible...

PostPosted: Thu May 25, 2006 10:47 am
by cboles
You can't load a kernel and run the car at the same time. In your case, you should add a command to the SSM code in ROM to up the baud rate. That way, you can log at a high rate, but also communicate with other tools at standard speeds. The problem is, you will have to implement these code changes on every ROM you want your logger to work with.

PostPosted: Fri May 26, 2006 12:44 am
by Evo4Mad
what is the max baud rate those ecus can communicate at? what Mhz chip do they use? I presume there will be other limiting factors like RAM speed, and instruction processing speed.

PostPosted: Fri May 26, 2006 8:38 am
by cboles
there are many limiting factors:

* physical interface limits (drive capability, wiring impedances)
* processor clock
* UART servicing (are you running the car, or just running a kernel...)
* acceptable error rate / reliability