- Added support up to COM30 (Microboot)

- Added COM port disconnect/connect during backdoor entry (Microboot).

git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@120 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
Frank Voorburg 2015-11-27 11:44:01 +00:00
parent 7c6400ea81
commit 54241d3108
4 changed files with 22 additions and 4 deletions

View File

@ -218,6 +218,16 @@ begin
// init the return value
result := false;
// during high burst I/O the USB/RS232 emulated COM-ports sometimes have problems
// processing all the data. therefore, add a small delay time between packet I/O.
// exclude the CONNECT command because of the default small backdoor time of the
// bootloader
if packetData[0] <> $FF then
begin
Application.ProcessMessages;
Sleep(5);
end;
// prepare the packet. length goes in the first byte followed by the packet data
SetLength(msgData, packetLen+1);
msgData[0] := packetLen;

View File

@ -287,9 +287,17 @@ begin
sessionStartResult := kProgSessionGenericError;
while sessionStartResult <> kProgSessionStarted do
begin
sessionStartResult := loader.StartProgrammingSession;
Application.ProcessMessages;
Sleep(5);
// disconnect COM-port for board that have on board FTDI type chip that powers down
// during power cycling
loader.Disconnect;
// reconnect COM-port. no need to check the return value because it might fail when
// an FTDI type chip is on board while it is cycling power.
if loader.Connect then
begin
sessionStartResult := loader.StartProgrammingSession;
Application.ProcessMessages;
Sleep(5);
end;
// don't retry if the error was caused by not being able to unprotect the programming resource
if sessionStartResult = kProgSessionUnlockError then
begin
@ -561,7 +569,7 @@ end; //*** end of MbiDescription ***
//***************************************************************************************
function MbiVersion : Longword; stdcall;
begin
Result := 10000; // v1.00.00
Result := 10001; // v1.00.01
end; //*** end of MbiVersion ***

Binary file not shown.