Author Topic: HELP: Firmware upgrade gone bad  (Read 35380 times)

Offline antonch

  • Jr. Member
  • **
  • Posts: 67
  • BHP: 4
HELP: Firmware upgrade gone bad
« on: August 08, 2007, 11:33:44 pm »
So I finally got all my connections hooked up. Started up Megatune, it connected and showed semi reasonable values for IAT, CLT, MAP, etc. So my serial->ECU connection is good and stable.

Then I downloaded all the factory config values using utility. And proceded with firmware upgrade (1.0.73final). After about 30secs and a bunch of dots on the screen it gave and error but said the word completion.

Now, ECU doesn't respond. Running upload-firmware.bat gives "no hello from AVR".

From Terminal, I can connect to ECU. If I send the command "Man". I get "î»" back.

Offline [email protected]

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: HELP: Firmware upgrade gone bad
« Reply #1 on: August 09, 2007, 12:06:39 am »
Sounds nasty, but solvable.

Are you using a decent serial port?

take the serial plug out, and with the VEMS powered off, bridge pins2&3 on the VEMS serial plug (I use a steel paperclip).
Power up the VEMS, remove the wire then go to your installation directory and type:

tools\megaloader.exe firmware\upload.hex -wE 38400 -c com1

change com1 if necessary.

This will force an upload of the software and should put you back to where you were before you uploaded your configs

Good luck

Offline antonch

  • Jr. Member
  • **
  • Posts: 67
  • BHP: 4
Re: HELP: Firmware upgrade gone bad
« Reply #2 on: August 09, 2007, 12:30:30 am »
Success!

Offline smurfinator

  • Full Member
  • ***
  • Posts: 127
  • BHP: -20
Re: HELP: Firmware upgrade gone bad
« Reply #3 on: August 16, 2007, 06:42:54 pm »
I, too had this problem and the solution worked.

What is the root cause of this error?
Audi ABZ 4.2 V8 in 1993 90 quattro
TTV 60-2 flywheel and cam sync
firmware: 1.2.20

Smurf blue (BMW Laguna Seca), hence the name!

Offline [email protected]

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: HELP: Firmware upgrade gone bad
« Reply #4 on: August 16, 2007, 06:56:16 pm »
Usually its a serial port problem.  Are you using a USB to serial adaptor?

Rob

Offline antonch

  • Jr. Member
  • **
  • Posts: 67
  • BHP: 4
Re: HELP: Firmware upgrade gone bad
« Reply #5 on: August 17, 2007, 01:08:54 pm »
I, too had this problem and the solution worked.

What is the root cause of this error?

Don't touch the computer while its flashing. Literary, put the laptop down and go make a cup of tea/coffee. I flashed other equipment before and it responded fine to multitasking. The cheaper USB->Serial adapters probably don't like it though.

Offline smurfinator

  • Full Member
  • ***
  • Posts: 127
  • BHP: -20
Re: HELP: Firmware upgrade gone bad
« Reply #6 on: August 17, 2007, 05:06:09 pm »
Usually its a serial port problem.  Are you using a USB to serial adaptor?

Rob


Yes, I'm using a fairly new Belkin USB/serial adapter with latest drivers.  Laptop running on own battery (as opposed to car) so as not to create additional noise problems.
Audi ABZ 4.2 V8 in 1993 90 quattro
TTV 60-2 flywheel and cam sync
firmware: 1.2.20

Smurf blue (BMW Laguna Seca), hence the name!

Offline [email protected]

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: HELP: Firmware upgrade gone bad
« Reply #7 on: August 17, 2007, 06:09:06 pm »
I only know and stick to the Easy Sync USB->serial adaptor.  I also use OFC 2-core microphone cable in short lengths for my serial cable to minimise noise.

Offline dnb

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 837
  • BHP: 19
Re: HELP: Firmware upgrade gone bad
« Reply #8 on: August 23, 2007, 11:21:01 am »
I have 2 metres of unshielded serial cable and a cranky old laptop in an equally cranky TVR.  It seems to work quite well, but I don't know why!

One thing I did notice (and will be putting up a proper thread about it) is that the ADC based sensor readings go silly when the laptop is connected and I use my in-car laptop power supply.   I suspect a magnificent TVR ground loop, so I will be looking to have the ECU opto-isolated or use some form of wireless interface.

Offline antonch

  • Jr. Member
  • **
  • Posts: 67
  • BHP: 4
Re: HELP: Firmware upgrade gone bad
« Reply #9 on: August 24, 2007, 12:54:52 am »
I have 2 metres of unshielded serial cable and a cranky old laptop in an equally cranky TVR.  It seems to work quite well, but I don't know why!

One thing I did notice (and will be putting up a proper thread about it) is that the ADC based sensor readings go silly when the laptop is connected and I use my in-car laptop power supply.   I suspect a magnificent TVR ground loop, so I will be looking to have the ECU opto-isolated or use some form of wireless interface.

Is your laptop running off the car's power? I prefer to run the laptop off of its own battery.
They do sell shielded serial cable which is what I am using. Seems to work so far.

Offline miniminor63

  • Jr. Member
  • **
  • Posts: 68
  • BHP: 1
Re: HELP: Firmware upgrade gone bad
« Reply #10 on: November 11, 2007, 10:42:09 pm »
I have got a serious problem here now.

I have previously uploaded firmware on my newly soldered box, and also done other checks, like testing the map sensor and such.

Tonight I wanted to upload the standard temp sensor files and used the tempsensor_2252_256_upload.bat file. The board behaved nicely before this.

I checked that the files needed for the batch file was there and they were. So I executed it, and got the first messages, then the hexpatch.exe crached. And I got the send or dont send error report (XP professional), clicked dont send, and after that I got, hit any key to continue, I did and the cmd window closed. now I can not get in contact with it at ALL.

I tried normal upload firmware, which did not worked. got no hello from AVR.

So I tried the technique written in the beginning of this post. and that succeded. So I tried to upload the firmware again, but still cant get in contact. I have checked that the com1 (which I use) is written in the bat file, and that its not used by anything else. There are no shorts in the serial and I an using a serial cable that is shielded, but it is spliced in the middle, as its my test harness.

Still had no problems with it before. what can this be?!

HEEELP, hope I have not broken anything?

Offline [email protected]

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: HELP: Firmware upgrade gone bad
« Reply #11 on: November 11, 2007, 11:10:08 pm »
What firmware version are you running?

Rob

Offline Sprocket

  • Hero Member
  • *****
  • Posts: 867
  • BHP: 29
Re: HELP: Firmware upgrade gone bad
« Reply #12 on: November 11, 2007, 11:54:31 pm »
He's running 1.0.73

I have been on MSN trying to help. Im miffed as well :-\

I will be honest and say i may not have helped, but things went bad when the software crashed, found it realy confusing to follow this procedure, for us non software orientated people :-[

The tempsensor_2252_256_upload.bat file is as follows and works perfectly fine for me

__________________________________________________________

@echo off
echo Will upload 1.0.73 firmware + your chosen temp factor files
echo usage: tempsensor_upload.bat air-ohm clt-ohm aref
echo WARNING: Overwrites your current firmware in your ECU
echo ctrl-c to abort
echo -----------------------------------------------------------------------
pause
if exist Tools\ntc_airX_cltfactor\airXfactor_2252_256.hex (
if exist Tools\ntc_airX_cltfactor\cltfactor_2252_256.hex (
if exist firmware\upload.hex del firmware\upload.hex
type Tools\ntc_airX_cltfactor\airXfactor_2252_256.hex > temppatch.hex
type Tools\ntc_airX_cltfactor\cltfactor_2252_256.hex >> temppatch.hex
Tools\ntc_airX_cltfactor\hexpatch.exe firmware\vems.hex < temppatch.hex > firmware\upload.hex
del temppatch.hex

)) else ( echo Missing files)

if exist firmware\upload.hex (
tools\megaloader.exe firmware\upload.hex -wtE 38400 -c com1
) else (
echo Patch Failed )
pause


Offline miniminor63

  • Jr. Member
  • **
  • Posts: 68
  • BHP: 1
Re: HELP: Firmware upgrade gone bad
« Reply #13 on: November 12, 2007, 09:29:01 am »
fixed it! It turned out that after looking in the code that Colin pasted here, that this bath file will delete the content of the upload.hex file, and if it stops in the middle of an upload before it has made a new one the upload.hex file is left empty.

Then it wont help to "hard" reset it like you wrote in the second post in this topic rob. As it will still upload the empty upload.hex file. When I now downloaded the firmware again and got a upload.hex file with content, and did the "hard" reset, it all started working again:)

But why does hexpatch crash on me? thats the next question. I have all the temperature and resistance data on both my sensors, but that doesnt help alone I understood, and we still need to download some generic ones to the box, and then adjust them when tried.(why does it have to be this difficult?) But whats up with hexpatch?

Offline [email protected]

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: HELP: Firmware upgrade gone bad
« Reply #14 on: November 12, 2007, 09:35:26 am »
Delete your upload.hex and temppatch.hex files before you start again

Also I'm not seeing a tempsensor_upload.bat that looks like that in my 1.0.73 I have here.  Normally you use it like this:
tempsensor_upload12x12 2252 2252 256 and off it runs.

Make sure that you're using the code from here:
http://media.vems.se/code/VemsMT1.0.73Final.zip

Always check this section of the forum for the VEMS firmware links.

Cheers

Rob
« Last Edit: July 09, 2008, 12:59:00 pm by [email protected] »