Increase AVRISP command timeout to 240ms up from 150ms to prevent some ISP commands from timing out too early.
Add check to the PROGRAM FLASH ISP and PROGRAM EEPROM ISP handler to return an explicit error when the host attempts to write more data than the device is able to buffer.
This commit is contained in:
parent
489515fbbf
commit
4bb236e9a0
3 changed files with 16 additions and 3 deletions
|
@ -155,13 +155,15 @@ uint8_t V2Protocol_WaitWhileTargetBusy(void)
|
|||
{
|
||||
TCNT0 = 0;
|
||||
|
||||
bool DeviceBusy;
|
||||
|
||||
do
|
||||
{
|
||||
SPI_SendByte(0xF0);
|
||||
SPI_SendByte(0x00);
|
||||
|
||||
SPI_SendByte(0x00);
|
||||
bool DeviceBusy = (SPI_ReceiveByte() & 0x01);
|
||||
DeviceBusy = (SPI_ReceiveByte() & 0x01);
|
||||
}
|
||||
while (DeviceBusy && (TCNT0 < TARGET_BUSY_TIMEOUT_MS));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue