avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] Bug in avr_tpi_poll_nvmbsy()?


From: Hannes Weisbach
Subject: [avrdude-dev] Bug in avr_tpi_poll_nvmbsy()?
Date: Tue, 30 Apr 2013 16:54:54 +0200

Hello,

I am currently implementing TPI for avrftdi and I stumbled across a possible 
bug in avr_tpi_poll_nvmbsy(). Since I am not that familiar with the TPI-code in 
avr.c I though I'd better ask. avr_tpi_poll_nvmbsy() reads out the NVMCSR 
register like so:

cmd = TPI_CMD_SIN | TPI_SIO_ADDR(TPI_IOREG_NVMCSR);
rc = pgm->cmd_tpi(pgm, &cmd, 1, &res, 1);

But instead of reading the response the return code is checked for the busy 
flag:
return (rc & TPI_IOREG_NVMCSR_NVMBSY);

Shouldn't it rather be:
return (res & TPI_IOREG_NVMCSR_NVMBSY);?

(With that change avrftdi programs flash over TPI, so please say 'yes' ;))

Best regards,
Hannes


reply via email to

[Prev in Thread] Current Thread [Next in Thread]