uisp-dev
[Top][All Lists]
Advanced

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

Re: [Uisp-dev] [PATCH] at89s support


From: Wojtek Kaniewski
Subject: Re: [Uisp-dev] [PATCH] at89s support
Date: Sat, 07 Feb 2004 19:50:53 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Theodore A. Roth wrote:
Can you verify that the latest cvs works like you expect for those parts?

it works fine:

$ uisp -dprog=stk200 -d89 --erase --upload if=mspc_p.hex --verify -v
AVR Direct Parallel Access succeeded after 0 retries.
Atmel AT89 AT89S51 is found.
Erasing device ...
Reinitializing device
AVR Direct Parallel Access succeeded after 0 retries.
Atmel AT89 AT89S51 is found.
Uploading: flash
##############################
(total 932 bytes transferred in 2.89 s (323 bytes/s)
Polling: count = 927, min/avg/max = 0.73/1.36/14.70 ms
Verifying: flash
##############################
(total 932 bytes transferred in 0.78 s (1197 bytes/s)

besides, today i've found in AT89S51 docs that chip erase time is 500ms, not 200ms as uisp assumes. although everything's fine with my chips, someone else can encounter problems because of this timing.

i've attached another patch, that doesn't allow t_wd_erase to be shorter than 500ms, but it isn't critical.

regards,
wojtek
--- src/AvrDummy.C      7 Feb 2004 18:20:32 -0000       1.5
+++ src/AvrDummy.C      7 Feb 2004 18:43:49 -0000
@@ -503,10 +503,14 @@
 void
 TAvrDummy::ChipErase()
 {
+  int delay;
   TByte chip_erase [4] = { 0xAC, 0x80, 0x00, 0x00 };
   Info(1, "Erasing device ...\n");
   Send (chip_erase, 4);
-  Delay_usec(Get_t_wd_erase());
+  delay = Get_t_wd_erase();
+  if (at89 && delay < 500000)
+    delay = 500000;
+  Delay_usec(delay);
   PulseReset();
   Info(1, "Reinitializing device\n");  
   EnableAvr();

reply via email to

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