Flashing error on beta codes

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

Post Reply
the poi
Helpful MS/Extra'er
Posts: 75
Joined: Sat Jun 05, 2004 12:27 am

Flashing error on beta codes

Post by the poi »

This seems related to the errors here: http://www.msextra.com/viewtopic.php?t=25298 , but I can't seem to resolve it. I've been running msns-e 029v for awhile, and decided to upgrade to ms2-e this afternoon. I swapped my chips, but I've been having flashing errors with the latest betas (b18 and b17). The bootstrap burns just fine, and I can write the v1.0 release code (with the bootstrap included in the latest beta packages):

Code: Select all

C:\PROGRA~1\MEGASQ~1\MS2_EX~1\ms2extra_beta20080105>ms2dl.exe -r 115200 -j v1.s19
MegaSquirt Download 1.05

Reading v1.s19:
ms2_extra.s19
Detected MS-II (HCS12) code.
Entry point: 0xc000
Code range : 0x4000-0x3db500
File read successfully.

Opened comm port 1 at 115200.
Erasing main FLASH:
Erased.
Writing:
Setting page register 0x3c:
Page set.
Erasing page 0x3c:
Erased.
Setting page register 0x3d:
Page set.
Erasing page 0x3d:
Erased.
Write complete, 2980 records, 47637 bytes.
Verifying:
Setting page register 0x00:
Page set.
Setting page register 0x3c:
Page set.
Setting page register 0x3d:
Page set.
Verification succeeded, 2980 records total (8 skipped).
I used the v1.0 copyini.bat and loaded up MT, and everything seemed to work properly--burning/fetching, realtime display (only actual value is voltage, but that reads correctly).

When I try to burn the latest beta code (same thing happens with b17 and b18), this happens (this is the snippet from the included .bat, same happens with reburning the bootloader or not):

Code: Select all

MegaSquirt Download 1.05

Reading ms2_extra.s19:
ms2_extra.s19
Detected MS-II (HCS12) code.
Entry point: 0xc000
Code range : 0x4000-0x3dbfb0
File read successfully.

Reading ms2_extra.s19:
ms2_extra.s19
Detected MS-II (HCS12) code.
Entry point: 0xc000
Code range : 0x4000-0x3dbfb0
File read successfully.

Opened comm port 1 at 115200.
Erasing main FLASH:
Erased.
Writing:
Setting page register 0x3b:
Page set.
Erasing page 0x3b:
Erased.
ERROR: Timed out reading response, 0xE0
I've seen the error that it specifically died on in the previous thread, but it appears it's flashing some of it properly before giving up, and it gets through all of the v1.0 code! I've fiddled with the FIFO buffers, and I'm doing this on the built-in serial port on a Dell Latitude c600 (which I've used for a long time with no issue on MS1). Thanks for any help!

edit:// v1.02 works as well
edit2:// 20070624b does not work. Same error:
Setting page register 0x3a:
Page set.
Erasing page 0x3a:
Erased.
ERROR: Timed out reading response, 0xE0
edit3:// Mar_19_07_beta works. I'm guessing something changed in the FW between the files in the "old" folder and the files following the new naming scheme in the beta root folder?

edit4:// well, I just managed to flash it on another computer (a dell latitude d810). It did give a similar error in the "verifying" stage, I'll keep trying to see if it stops doing that. But apparently its a computer problem--the c600 is a 700mhz pIII, the d810 is some pentium4 variant.

So, assuming this is just a problem with either the specific serial port and/or driver or just the processing speed, is it "safe" to use the c600 to tune?

edit5:// here's the code from the flash on the d810.

Code: Select all

ECHO is off.
.
ms2dl.exe -c1 ms2_extra.s19
MegaSquirt Download 1.05

Reading ms2_extra.s19:
ms2_extra.s19
Detected MS-II (HCS12) code.
Entry point: 0xc000
Code range : 0x4000-0x3dbfb0
File read successfully.

Reading ms2_extra.s19:
ms2_extra.s19
Detected MS-II (HCS12) code.
Entry point: 0xc000
Code range : 0x4000-0x3dbfb0
File read successfully.

Opened comm port 1 at 115200.
Erasing main FLASH:
Erased.
Writing:
Setting page register 0x3b:
Page set.
Erasing page 0x3b:
Erased.
Setting page register 0x3c:
Page set.
Erasing page 0x3c:
Erased.
Setting page register 0x3d:
Page set.
Erasing page 0x3d:
Erased.
Write complete, 4138 records, 66158 bytes.
Verifying:
Setting page register 0x00:
Page set.
Setting page register 0x3b:
Page set.
Setting page register 0x3c:
Page set.
ERROR: Timed out reading response, 0xE0
Press any key to continue . . .
is it, uhhh, safe to use? Everything looks okay in MT... :|
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

the poi,
(welcome back!)

You might need to add some delays to the downloader commandline or tune your serial port settings.

From the option list of ms2dl.exe I'd try changing download-MS2-firmware.bat , look for:

%DOWNLOAD% -r 115200 %PORT% -j ms2_extra.s19
to:
%DOWNLOAD% -d 5 -r 115200 %PORT% -j ms2_extra.s19

This will make it slow by inserting a 5ms delay after each character but might assist.

You can also try changing that line to:
%DOWNLOAD% -d 5 -v 5 -r 115200 %PORT% -j ms2_extra.s19

to list the debug information as well and see exactly where it fails.

My old laptop used to have problems with (I believe) the 115200 baud rate and nearly always failed on the verify stage. Using the debug option I could see that additional zeros were getting inserted into the received datastream for no reason.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
the poi
Helpful MS/Extra'er
Posts: 75
Joined: Sat Jun 05, 2004 12:27 am

Post by the poi »

jsmcortina wrote:the poi,
(welcome back!)
:D now that I'm done wasting all my free time building the mechanicals for my car, I can get back to wasting it all on tuning!
You might need to add some delays to the downloader commandline or tune your serial port settings.
...
%DOWNLOAD% -d 5 -r 115200 %PORT% -j ms2_extra.s19
...
Well, this one's weird. So I had it flashed "maybe" correctly from last night with the other computer. I flashed it again with the delay statement at 1ms on the C600, and it went through everything perfectly, even correctly verified it. I open up MT, everything is working right, and I can write an MSQ without any issue.

So I think it's fixed, but I want to retest it, so I flash it back to the v1.02, and retry. Now, regardless of the delays, it fails in the same spot it did before! So I figured it only worked the first time because I was reflashing the existing code (which shouldn't matter, but I might as well test it...), so I flashed again with the D810 (no changes to the delay would keep it from dying in the verifying stage) and tried again. No dice again! It's like I got one good flash on the old computer in the morning, and now I can't replicate it :?

Verbose errors didn't seem to give me anything suspicious. The D810 verifying error shows repeating VR:/TX:/RX: lines, until the last one, which doesn't appear out of place, followed by the ERROR: Timed out...0xE0

During the write attempt on the C600:
Erasing page 0x3b:
TX: b8
RX: e0 00 3e
Erased.
TX: a8 80 00 0f
TX: 1b f1 e7 18 01 ae 30 0a 18 01 ae 30 0c 18 01 ae
ERROR: Timed out reading response, 0xE0

Hmmmm

edit:// heh. More info: the flash works on the D810 but it crashes at the verify, even if I just verify. But it verifies properly on the C600! So if all else fails, all I have to do to upgrade firmware is flash with the D810, and verify with the C600 :lol:
Post Reply