--
http://www.fastmail.fm - mmm... Fastmail...
_______________________________________________
dorkbotpdx-blabber mailing list
dorkbotpd...@dorkbot.org
http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber
-Paul
For an analogy, consider using a USB-serial adaptor with an FTDI chip to
program a bare-bones Arduino. The adaptor uses a FTDI chip, but it only
programs the AVR (Arduino) chip, not a FTDI chip.
Most AVR chips have debug wire, which is a closed, proprietary
protocol. Some also have JTAG. While JTAG itself is an open spec, JTAG
itself only tells you how to access registers inside the chip. To
actually use JTAG, additional specs are necessary to know what registers
are available and how to use them (it's usually quite complicated).
Atmel has published boundary scan info for some chips (which allows
manipulating the external pins for testing the circuit board traces), to
the best of my knowledge, Atmel has never released JTAG debug register
specs which would be necessary to use that JTAG port to debug an AVR
processor.
If those JTAG register specs are available for AVR chips, please tell me
where.
Without that info, there is no hope of ever making an open debug tool
for the AVR/Arduino (which is the main reason I'm using the ARM chip).
-Paul
> Paul Stoffregon has done some work towards this using the at90usb82.
> Debug wire as I understand it is Atmel proprietary.
_______________________________________________
Unfortunately, so far as I can tell, no one has successfully built a
clone of the JTAG ICE mkII; so, if you really want to use debugWire,
you may have to fork over the $300 for the mkII...
Dan S.
My current goal is to be working with a larger pin count ATMEGA, so I
will not be able to rely on FLIP anymore.
I'm going to give this
http://www.scienceprog.com/build-your-own-avr-jtagice-clone/ a try.
Frank
--
http://www.fastmail.fm - The professional email service
I am currently writing C code in code::blocks, compiling by hand with
winavr and would need to debug. I typed avr-gdb, included with winavr,
just to see what would happen and don't know too much what. I already
have windows software that talks to my circuit, so I don't want to work
with my Linux distro.
So, I won't really need anything else besides Ponyprog one single time,
then I can use AVRstudio ( that will launch winavr by itself) for all C
compilation, programming and emulation, right???
Frank
--
Transistor Toaster
transist...@fastmail.fm
--
http://www.fastmail.fm - One of many happy users:
http://www.fastmail.fm/docs/quotes.html
Hello,
I was just wondering how does the AT90USB162 know which particular
programming method is to be used? If I hold nHWB low and pulse the RESET
line, how does it know it is supposed to talk to the PC with the USB
port and not JTAG or ICSP?
Frank
>
> On Sun, 29 Jun 2008 13:09:24 -0400, "Transistor Toaster"
> <transist...@fastmail.fm> said:
> > Hi,
> > I'm a n00b just starting out with AVRS. I have been programming with
> > FLIP the AT90USB162. I would like to know that if the benito5 only has
> > the capability to program another AVR but not to debug?
> > Frank
> > --
> > Transistor Toaster
> > transist...@fastmail.fm
> >
> > --
> > http://www.fastmail.fm - mmm... Fastmail...
> >
> --
> Transistor Toaster
> transist...@fastmail.fm
>
> --
> http://www.fastmail.fm - Choose from over 50 domains or use your own
>
--
Transistor Toaster
transist...@fastmail.fm
--
http://www.fastmail.fm - A fast, anti-spam email service.
There are 3 fuse bytes and 1 lock byte that configure the chip.
There is a parallel programming option which can never be disabled. It
is activated by +12 volts on the reset pin, and nearly all the pins are
required for programming the chip. If the chip is locked, it must be
erased before changes can be made. Once unlocked, the fuse bits and all
memory can be changed. Almost nobody uses the parallel mode, except
dedicated eprom programmers.
If enabled by the fuse bits (and it is enabled by default), the chip can
be programmed using ISP mode, which the datasheet calls "serial
downloading". While the chip is in reset, the MISO, MOSI and SCLK pins
are used to program the chip. This mode has complete access, just like
the parallel mode, including changing the fuses. It is possible to
change the fuse bit that disables this mode, and if you do that after
rebooting this mode will be permanently disabled (unless you use the
parallel mode to change the fuse bit disabling it).
There are 2 other fuse bit that configure if the boot loader will always
run after reset, or the main application will always run after reset, or
if the HWB (PD7) pin will control which one gets run. Atmel ships the
chip with a default setting of HWB controlling which gets run after
reset. If you have not changed the fuse bits, that is what your chip
will do.
The bootloader can not change the fuse bits. If you have only ever
programmed the chip using the bootloader Atmel ships pre-programmed into
the chip, you can be sure the fuse bits are still in their default
configuration.
There is also a fuse that enables DebugWire mode. By default it is
disabled.
> If I hold nHWB low and pulse the RESET
> line, how does it know it is supposed to talk to the PC with the USB
> port and not JTAG or ICSP?
There is no JTAG port, so that is never an option.
So, how exactly does it "know" which mode? First, if the reset pin has
+12 volts, you're in parallel mode. If reset is low (the chip is not
running), and the serial mode is enabled by the fuse bits, then it
listens for programming on the SPI pins. Likewise, if DebugWire mode is
enabled by the fuse bits, it listens for the (closed, proprietary,
undocumented) debugwire activity on the reset pin.
Even if the fuse bit enables the "serial downloading" mode (ICSP or
ISP), that mode is only active while reset remains low. Once your reset
pulse ends, that mode is no longer available.
When reset allows the chip to start running (or the brownout or startup
timer acts as reset, also configured by fuse bits), the 2 fuse bits
determine if it will run starting at 0x0000 or the bootloader start
address (which is programmable via fuse bits in 4 different bootloader
sizes), or if the HWB pin is checked to determine which to run.
While the chip is running in the bootloader section, and if the lock
bits permit it, the SPM instruction can be executed to write to the
flash memory. The SPM instruction is never enabled if code is running
in the application section.
If the fuses are still in their default state, your holding HWB low will
cause the bootloader to run when reset goes high. If Atmel's DFU
bootloader is still in the memory, it will begin talking on the USB port
and your PC will enumerate the USB device. If you have only ever used
the bootloader, there is no way you could have ever changed the fuses,
and my limited understanding of Atmel's default bootloader is that it
doesn't allow overwriting itself.
If you've programmed a different bootloader (as I do) and/or changed the
fuse bits, the chip will do whatever you have configured. The
documentation for all this, by the way, is in chapter 25 of the datasheet.
-Paul
Does Dean Camera have a mailing list or forum for his myUSB?
Frank
--
http://www.fastmail.fm - Send your email first class
I think AVR Studio will do everything that you want, particularly now
that it integrates with WinAVR - though, I've never actually done any
in-circuit debugging of AVR's (only researched it a bit), so I don't
have any first-hand experience.
Good luck :)
Dan