avrdude-dev
[Top][All Lists]
Advanced

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

Re: [bug #61624] [Feature request] Serial/UART UPDI programmers


From: Britton Kerin
Subject: Re: [bug #61624] [Feature request] Serial/UART UPDI programmers
Date: Wed, 15 Dec 2021 07:41:44 -0800

On Wed, Dec 15, 2021 at 7:18 AM Joerg Wunsch <j@uriah.heep.sax.de> wrote:
>
> As Dawid Buchwald wrote:
>
> > After some more investigation I concluded that there are actually
> > different scenarios where Safemode is disabled, so I would really
> > leave that for now.
>
> Just as a side-note, and since there is also one large patch
> regarding safemode which I decided to not apply before 6.4:
>
> Safemode has been invented by a time when the parallel-port attached
> programming dongle was the standard low-cost programming tool. The
> parallel port's driving capabilities (if no buffers have been used)
> were not very strong, so with a few 10 cm of wires, it could
> occasionally happen that bits might have flipped during an ISP
> transaction. If that flakiness accidentally flipped one of the fuse
> bits, it could result in the AVR losing its clock source, rendering it
> unusable for further ISP sessions.
>
> Safemode was thus implemented to ensure fuses, at the end of an ISP
> session, were just those they are supposed to be (i.e., fuses from the
> beginning of the session including all requested alterations from -U
> options), giving an option to reprogram them while the ISP session is
> still active. (Fuses only take effect at a reset, so within the ISP
> session, the clock remains what it's been at the start of the
> session.)
>
> Given that this kind of flakey programming dongles is now basically
> history, I wonder whether it really makes sense to still have Safemode
> active all the time. Other programming tools (like Atmel/Microchip
> Studio) don't do something like that, and I haven't heard of
> accidentally flipped fuse bits lately.
>
> Instead of completely dropping the Safemode code, I'd propose that
> after releasing 6.4, we might enable it only if so requested for any
> particular programmer by avrdude.conf (and then enable it there for
> all parport and serbb programmers).

Seems reasonable. IIRC it was going off for me sometimes when
I had a worn-out ISP cable with some wire only mostly in contact,
but that's sort of a rare case and I'm not sure it wasn't oddities in
safemode itself that were causing it.

Britton



reply via email to

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