[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Uisp-dev] uisp problems
From: |
Torsten Mohr |
Subject: |
[Uisp-dev] uisp problems |
Date: |
Fri, 3 Jun 2005 01:30:15 +0200 |
User-agent: |
KMail/1.8 |
Hi,
i try to program an ATMega128 with uisp and i have several problems trying
that.
I already tried to program some fuse bytes and don't know at the moment what
value they have.
If i read the fuses after the first power-up without specifying a part (auto
detect)
i get:
address@hidden:~/p/avr/hello_led> uisp -dprog=dapa --rd_fuses
Atmel AVR ATmega128 is found.
Fuse Low Byte = 0xe1
Fuse High Byte = 0x99
Fuse Extended Byte = 0xff
Calibration Byte = 0x9e -- Read Only
Lock Bits = 0xff
BLB12 -> 1
BLB11 -> 1
BLB02 -> 1
BLB01 -> 1
LB2 -> 1
LB1 -> 1
If i just repeat the exact same command i get:
address@hidden:~/p/avr/hello_led> uisp -dprog=dapa --rd_fuses
Cannot identify device because it is locked.
Device similar to the ATmega103-old is found.
Device is locked.
Address out of memory range.
If i specify that the part is an ATMega128 i get after first power-up:
address@hidden:~/p/avr/hello_led> uisp -dprog=dapa -dpart=atmega128 --rd_fuses
Atmel AVR ATmega128 is found.
Fuse Low Byte = 0xe1
Fuse High Byte = 0x99
Fuse Extended Byte = 0xff
Calibration Byte = 0x9e -- Read Only
Lock Bits = 0xff
BLB12 -> 1
BLB11 -> 1
BLB02 -> 1
BLB01 -> 1
LB2 -> 1
LB1 -> 1
If i repeat it, without power-down and -up:
address@hidden:~/p/avr/hello_led> uisp -dprog=dapa -dpart=atmega128 --rd_fuses
Atmel AVR ATmega128 is found.
Fuse Low Byte = 0xfe
Fuse High Byte = 0x00
Fuse Extended Byte = 0xfe
Calibration Byte = 0x00 -- Read Only
Lock Bits = 0x00
BLB12 -> 0
BLB11 -> 0
BLB02 -> 0
BLB01 -> 0
LB2 -> 0
LB1 -> 0
address@hidden:~/p/avr/hello_led> uisp -dprog=dapa -dpart=atmega128 --rd_fuses
Atmel AVR ATmega128 is found.
Fuse Low Byte = 0x00
Fuse High Byte = 0x00
Fuse Extended Byte = 0x00
Calibration Byte = 0x00 -- Read Only
Lock Bits = 0x00
BLB12 -> 0
BLB11 -> 0
BLB02 -> 0
BLB01 -> 0
LB2 -> 0
LB1 -> 0
I wrote a program for the PC that reads the parallel ports settings (output
lines)
and can change them. Using this program i found that after "uisp -dprog=dapa"
has run once, the lines D0, Init and Strobe are set to high level.
If i change D0 and Strobe to low level i can connect to the ATmega128 without
the
need to cycle its power before.
But what worries me is that also now (with pre-initialisation of the parallel
port)
"uisp --verify" shows lots of fails. In every failing byte, the comparison
shows
that in the read out memory there are more bits set to 1 than in the just
downloaded
file. Also, if i do "uisp --download", the memory contents are not what i
expect.
After several trys, it looks that the wrong bits are always at the same
addresses.
So i tried to increase the t_wd_flash to 50000, but the --verify still fails,
also
if i again increase it by factor *10 to 500000.
I don't have the parallel port pins directly connected to the target. There
is a
cuircuit inbetween that ensures proper signal levels (correct +5V / 0V
outputs).
I use uisp-20050207 on Linux.
Why can't i correctly program the ATmega128?
Best regards,
Torsten.
- [Uisp-dev] uisp problems,
Torsten Mohr <=