Skip to content

Commit

Permalink
Исправление 256+ Mbit
Browse files Browse the repository at this point in the history
  • Loading branch information
nofeletru committed Oct 20, 2016
1 parent 88f75cc commit b7b4a81
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions software/main.pas
Expand Up @@ -528,7 +528,11 @@ procedure WriteFlash25(var RomStream: TMemoryStream; StartAddress, WriteSize: ca
//3 байтовая адресация включена

//старший байт адреса
if Address > 16777215 then UsbAsp25_WriteSR(hUSBDev, hi(hi(Address)), $c5);
if Address > 16777215 then
begin
UsbAsp25_WriteSR(hUSBDev, hi(hi(Address)), $c5);
UsbAsp25_WREN(hUSBDev);
end;

BytesWrite := BytesWrite + UsbAsp25_Write(hUSBDev, $02, Address, datachunk, PageSize);
end;
Expand All @@ -548,7 +552,12 @@ procedure WriteFlash25(var RomStream: TMemoryStream; StartAddress, WriteSize: ca

if (MainForm.MenuAutoCheck.Checked) and (WriteType = WT_PAGE) then
begin
UsbAsp25_Read(hUSBDev, $03, Address, datachunk2, PageSize);

if WriteSize > 16777215 then
UsbAsp25_Read32bitAddr(hUSBDev, $13, Address, datachunk2, PageSize)
else
UsbAsp25_Read(hUSBDev, $03, Address, datachunk2, PageSize);

for i:=0 to PageSize-1 do
if DataChunk2[i] <> DataChunk[i] then
begin
Expand Down

0 comments on commit b7b4a81

Please sign in to comment.