avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] suggest a "programmer"?


From: Nicholas Flowers
Subject: Re: [avrdude-dev] suggest a "programmer"?
Date: Wed, 24 Feb 2016 23:55:30 -0500

For posterity: usbtiny works fine/great.  You only need to implement three
commands: "powerup" (drive the SPI pins and reset the target), "powerdown"
(release everything) and "spi" (bitbang a 4-byte SPI to the target).  There
are other commands intended to speed things up (reading pages of data at a
time), but even if you stall those, it falls back to those three and works
fine.  I've tested writing fuses and flash (not eeprom, but surely works
fine also).

In addition, as discussed above, this requires no endpoints beyond the
default endpoint 0.

The only downside (so far): and thanks to David Sainty for pointing this
out: is that it requires sudo to operate.  I'm not sure why this is, I'm
guessing endpoint 0 messages require root, other endpoints don't?  (Which
is why you don't need to sudo a normal ISP, because it is running over bulk
endpoints).  I'm not sure why this would be.

One thing I'm puzzled by is why the Arduino guys didn't do it this way (or
analogously) to begin with.  If you have an onboard chip that can
reset/program, why mess around with bootloaders and timeouts?

Thanks to all for advice.

On Sun, Feb 21, 2016 at 5:47 PM, Nicholas Flowers <address@hidden>
wrote:

>
>> > ACM: requires 3 endpoints (2 data, and interrupt for line status).
>> > Actually, as far as I understand the spec, the interrupt is supposed to
>> be
>> > optional, but the linux driver at least demands it.
>>
>> All drivers I have seen require the interrupt endpoint, even though
>> it's pointless (pun intended :).
>>
>
> Ha!  I just tried setting the ACM notification descriptor endpoint to
> something I can't address anyway... seems to work just fine.  (I don't know
> how the AVR reacts when it is pinged for data on an endpoint it can't even
> reach... NAK?  STALL?  Let it timeout?)  The cdc-acm driver looks like it
> does nothing with the notifications other than increment some counters you
> can query via ioctl.
>
> So I guess it is possible to do ACM+Atmel if one is content with never
> knowing whether you experienced an overrun.
>
> Regards,
> Nick.
>


reply via email to

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