Re: [avr-chat] avrdude, stk600, updi, attiny3216

2019-06-12 Thread Till Sellschopp
Hello,

again, thanks for the feedback.

The ATtiny3216 as well as its family are quite new and thus there are very
few ressources. It seems that they are much closer to a xmega as to a tiny.

I've made sure that the correct config file is used. It contains entries
for the ATtiny3216. Those entries do not include a pgm_enable instruction.
 Adding such an instruchtion just causes another error. I have included
some traces below.

I looked at the programming pin with a logic analyzer. Using Windows and
Atmel Studio, I can see activity & the correct device ID is read. The
settingof the STK600 are the same as displayed when using avrdude.
Leaving the whole setup as it is but switching the usb plug to the linux
devices, there is not any activity visible. It seems that the updi
interface of the STK600 is not being activated,

Here are some traces:

# Command: sudo ./avrdude -C avrdude.conf -c stk600 -p t3216 -B
50 -vv

avrdude: Version 6.3-20171130
 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
 Copyright (c) 2007-2014 Joerg Wunsch

 System wide configuration file is "avrdude.conf"
 User configuration file is "/home/till/.avrduderc"
 User configuration file does not exist or is not a regular file,
skipping

 Using Port: usb
 Using Programmer  : stk600
 Setting bit clk period: 50.0
avrdude: usbdev_open(): Found STK600, serno: 0045E5507FEB
 AVR Part  : ATtiny3216
 Chip Erase delay  : 0 us
 PAGEL : P00
 BS2   : P00
 RESET disposition : dedicated
 RETRY pulse   : SCK
 serial program mode   : yes
 parallel program mode : yes
 Timeout   : 0
 StabDelay : 0
 CmdexeDelay   : 0
 SyncLoops : 0
 ByteDelay : 0
 PollIndex : 0
 PollValue : 0x00
 Memory Detail :

  Block Poll   Page
  Polled
   Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
 MaxW   ReadBack
   ---  - -  -- --  --
- - -
   signature  0 0 00 no  30  0
0 0 0x00 0x00
   prodsig0 0 00 no 61   61  0
0 0 0x00 0x00
   fuses  0 0 00 no  90  0
0 0 0x00 0x00
   fuse0  0 0 00 no  10  0
0 0 0x00 0x00
   fuse1  0 0 00 no  10  0
0 0 0x00 0x00
   fuse2  0 0 00 no  10  0
0 0 0x00 0x00
   fuse4  0 0 00 no  10  0
0 0 0x00 0x00
   fuse5  0 0 00 no  10  0
0 0 0x00 0x00
   fuse6  0 0 00 no  10  0
0 0 0x00 0x00
   fuse7  0 0 00 no  10  0
0 0 0x00 0x00
   fuse8  0 0 00 no  10  0
0 0 0x00 0x00
   lock   0 0 00 no  10  0
0 0 0x00 0x00
   data   0 0 00 no  00  0
0 0 0x00 0x00
   usersig0 0 00 no 32   32  0
0 0 0x00 0x00
   flash  0 0 00 no  32768  128  0
0 0 0x00 0x00
   eeprom 0 0 00 no256   64  0
0 0 0x00 0x00

 Programmer Type : STK600
 Description : Atmel STK600
 Programmer Model: STK600
 Hardware Version: 3
 Firmware Version Master : 2.45
 Firmware Version Slave 1: 2.03
 Firmware Version Slave 2: 2.02
 Routing card: Not present
 Socket card : Not present
 RC_ID table rev : 230
 EC_ID table rev : 1
 Vtarget : 3.3 V
 Varef 0 : 0.00 V
 Varef 1 : 0.00 V
 SCK period  : 50.00 us
 Oscillator  : 16.007 MHz

avrdude: stk500v2_program_enable(): program enable instruction not defined
for part "ATtiny3216"
avrdude: initialization failed, rc=-1
 Double check connections and try again, or use -F to override
 this check.

# Command: sudo ./avrdude -C avrdude.conf -c stk600 -p t3216 -B
50 -vv -Favrdude: Version 6.3-20171130
 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
 Copyright (c) 2007-2014 Joerg Wunsch

 System wide configuration file is "avrdude.conf"
 User 

Re: [avr-chat] avrdude, stk600, updi, attiny3216

2019-06-12 Thread Rogier Wolff
On Wed, Jun 12, 2019 at 07:58:30AM +0200, Till Sellschopp wrote:
> The error messages declares a missing "pgm_enable"  of the respective part
> (attiny3216).
> In all configurations I could find, the attiny3216 or similar uC of the
> same family do not have that property. Neither do the parent parts.
> Are you aware of any ressources dealing with this topic? Currently it seems
> to me, that alle devices in the configuration file have the same
> "pgm_enable" pattern.

Just looking for "pgm_enable" in my avrdude.conf I find under "attiny12":

pgm_enable  = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
  "x x x x  x x x x   x x x x  x x x x";


Now my avrdude.conf is too old to have your '3216 device listed. 

Sometimes the error messages are not completely clear. Maybe the first
reference to the '3216 is where the code tries to look up the
pgm_enable instruction. If the lookup fails, because avrdude is
looking in a different avrdude.conf file than you, and that file
doesn't have the 3216 like mine, then yes, the lookup fialed, but the
whole device is missing.

Double check that by running avrdude under "strace" and grep for "open"
in the trace output 

My avrdude.conf does not have /any/ variation in the "pgm_enable"
instruction. Maybe the avrdude guys decided to remove the config
parameter from the config file. Then you have a new config file and
an old avrdude (that still requires it?) 

Try adding the pgm_enable instruction listed above. 

Roger. 

-- 
** r.e.wo...@bitwizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233**
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

___
AVR-chat mailing list
AVR-chat@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-chat


Re: [avr-chat] avrdude, stk600, updi, attiny3216

2019-06-12 Thread Till Sellschopp
Hello,

thanks for the fast feedback.
I've changed the programming speed, the target voltage is alright, the
fuses are not the problem & the wiring is ok.
I did not have too much time at hand, but currently it seems to me that
there is no activity whatsoever on the updi pin. I will doublecheck today.

Regarding the configuration file:

The error messages declares a missing "pgm_enable"  of the respective part
(attiny3216).
In all configurations I could find, the attiny3216 or similar uC of the
same family do not have that property. Neither do the parent parts.
Are you aware of any ressources dealing with this topic? Currently it seems
to me, that alle devices in the configuration file have the same
"pgm_enable" pattern.

Thanks for the support,

Till


Am Di., 11. Juni 2019 um 08:49 Uhr schrieb Rogier Wolff <
r.e.wo...@bitwizard.nl>:

> On Mon, Jun 10, 2019 at 08:11:58PM +0200, Martin Stejskal wrote:
> > 1) Clock is set too high.
> > 2) Low voltage on target.
> > 3) Wrong fuse settings
> > 4) Wiring
>
> None of the above:
>
> > po 10. 6. 2019 v 18:09 odesílatel Till Sellschopp <
> till.sellsch...@gmail.com>
>
> > > avrdude: stk500v2_program_enable(): program enable instruction not
> defined
> > > for part "ATtiny3216"
>
> The error message says that your configuration file fails to define a
> "program enable" instruction for your part.
>
> Double check your configuration file, download a newer one, install it
> and double check that avrdude is indeed using the one you think it
> should use.
>
> Roger.
>
> --
> ** r.e.wo...@bitwizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
> **
> **Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233**
> The plan was simple, like my brother-in-law Phil. But unlike
> Phil, this plan just might work.
>
___
AVR-chat mailing list
AVR-chat@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-chat


[avr-chat] avrdude, stk600, updi, attiny3216

2019-06-10 Thread Till Sellschopp
Hello everyone,

I have a problem when trying to program the attiny3216 with avrdude using
the stk600 programmer. I could not find any related issues and hope, that
someone in this mailing list might be able to help.

Firstly:
- The setup (wiring etc.) works with atmel studio. It is possible to read
the device id of the attiny3216.
- I use avrdude from this repository "https://github.com/facchinm/avrdude;.
It is a copy from the main svn. The latest changelog entry is "2018-01-21
 Joerg Wunsch"
- Avrdude compiled without any issues or tailoring.

I use the following command to connect to the attiny3216  "./avrdude -C
avrdude.conf -c stk600 -p t3216 -v"

The connection to the stk600 is successful & related information is printed
into the terminal.
It terminates with:
"
avrdude: stk500v2_program_enable(): program enable instruction not defined
for part "ATtiny3216"
avrdude: initialization failed, rc=-1
 Double check connections and try again, or use -F to override
 this check.
"

If -F is used, the following is printed after the stk600 information:

"
avrdude: stk500v2_program_enable(): program enable instruction not defined
for part "ATtiny3216"
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1057fe
avrdude: Expected signature for ATtiny3216 is 1E 95 21

avrdude done.  Thank you.
"
The following observations were made:

- The device id changes with each call
- The behaviour does not change if the updi line is disconnected
- I could not see any activity on the updi line with a logic analyzer

I would be very thankful for any hints or ideas.

Thanks & with best regards,

Till
___
AVR-chat mailing list
AVR-chat@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-chat