Setting Baud rate

Developer topics relating to hardware that interfaces PCs to ECUs

Moderator: Freon

Setting Baud rate

Postby LGT-3-6 » Wed May 24, 2006 4:06 pm

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!
LGT-3-6
 
Posts: 50
Joined: Fri Jun 03, 2005 1:12 pm

Re: Setting Baud rate

Postby ev8siv3 » Thu May 25, 2006 9:20 am

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;
}
ev8siv3
 
Posts: 159
Joined: Fri Mar 24, 2006 11:27 am

Postby LGT-3-6 » Thu May 25, 2006 9:52 am

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?
LGT-3-6
 
Posts: 50
Joined: Fri Jun 03, 2005 1:12 pm

Postby cboles » Thu May 25, 2006 10:19 am

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...
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Postby LGT-3-6 » Thu May 25, 2006 10:40 am

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...
LGT-3-6
 
Posts: 50
Joined: Fri Jun 03, 2005 1:12 pm

Postby cboles » Thu May 25, 2006 10:47 am

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.
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Postby Evo4Mad » Fri May 26, 2006 12:44 am

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.
Evo4Mad
 
Posts: 332
Joined: Mon Jun 13, 2005 11:58 pm
Location: New Zealand

Postby cboles » Fri May 26, 2006 8:38 am

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
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA


Return to Interface Hardware

Who is online

Users browsing this forum: No registered users and 7 guests

cron