Applying Atmel ICE to ATtiny817 Xplained Mini Preparing for Production

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've developed a nice application on the ATtiny817 Xplained Mini and am trying to load/start my code with an Atmel ICE, pretending the Xplained is a a production board.  Info on how to connect the Atmel ICE (basic kit) seems sparse.  I agree it's rather redundant with what Xplained already offers but want to confirm what I can/can't do with just Vcc/GND/UPDI signals connected before I spend a lot on prototype boards (wished 817 had a DIP version).  The Xplained PCB has the SPI (J200) which looks like the right interface but the pin 1 is labelled PC1 instead of UPDI.  Does the manual say that putting a jumper (0 ohm resister) across R200 will make this UPDI instead instead of PC1?  (I tried this but the pad lifted and got lost in solder somewhere - so wanted to assure this is the right course of action before digging back on the trace.)  I also realized that for VCC and GND to be correct on the UPDI 6 pin definition, I need to solder the header on the back side of the board!  (Am I missing something?).  I tried soldering wires to my own free floating header - VCC, GND and UPDI (from the "PA0" labelled via above the "e" in "Atmel" on the PCB).  I had the standard USB plugged into Xplained (to power the PCB).  Vcc and GND scoped correctly on the Atmel ICE header.  But as soon as I connect the ICE to the Xplained, Vcc goes to GND!  This was a virgin (never been programmed) Xplained.  Of course with Vcc at 0V, it wont program.   I paid the high price for an ICE thinking I was avoiding such headaches.

 

Why doesn't this work, and how are others connecting the ICE to Xplained?  (Thanks!)

GosubGreg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is good input!  I had erroneously figured meDBG was part of the 817 embedded debug features.  Now, I'm supposing Atmel ICE (via UPDI) and meDBG are competing for debug rights (and neither is winning!).   However, of the features of meDBG: 

  1) Auto-ID for board identification in Atmel Studio –

  2) One green board status LED –

  3) Programming and Debugging –

  4) Virtual COM port (CDC)

I'm not sure which jumpers/resistors to edit.  I need UPDI, and the USB power is convenient, I haven't used the CDC.  Do any of these remove #3 (Programming and Debugging?).  Ah, I'm thinking, now, that the "Disconnect UPDI" is not disconnect entirely, but just from meDBG.  I'll remove CDC and UPDI from meDBG and additionally removed power if it still doesn't work.  Thanks!

 

GosubGreg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After disconnecting meDBG from UPDI and CDC, I still could not program through Atmel ICE.  I disconnected meDBG from power, this resulted in 0V instead of ~0.2V - makes sense, I've removed power!  So I configured the ATtiny817 Xplained Mini for external +5V power by removing R103 and connecting the left two terminals of J102 and removing R100 and connecting the right two terminals of J100.  Then I applied +5V to through VIN (on the left "Arduino" J203 connector) and GND (happened to be through J201).  The green LED comes on and I measure 5V across VIN and GND - but Atmel Studio 7.0 shows 0.2V and will not program the 817.

 

Any ideas?

GosubGreg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I put the above project down in frustration but am now re-attempting.  I do measure my applied 5V across Vin and GND as shared above but from GND to Vcc is around 0V - which is also what the Atmel ICE reports.  I would have thought the ATtiny817 Xplained would have forwarded the Vin to Vcc pin on the UPDI 6 pin header.

 

Maybe I'm going about this wrong (from the lack of response).  How do others test the ability to program a raw ATtiny817 from Atmel ICE via UPDI?  You can't solder an ATtiny817 yourself and getting the processor mounted on a prototype board (as a prelude to production) costs 4 digits.

GosubGreg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


The power supply of 817 seems to be managed by mEDBG.

Is the "POWER_ENABLE" line at a high level?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With Vin at 5V, the power LED (D100) on and the Atmel ICE unconnected, I measure...

at Q101, the solo pin farthest from the 3204 is GND, the closest pin is GND and the farthest pin (on the 2 pin side) is about +5V.

 

Thank You!

GosubGreg

Last Edited: Tue. Aug 17, 2021 - 03:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A little more research finds the Q101 (2n7002) schematic and I can say that the gate (pin 1) which is also the POWER_ENABLE is +5V.  Is this the right/expected value?

I'm enclosing a pic of the board so you can see all my wiring edits.

Thanks Again kabasan!

Attachment(s): 

GosubGreg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, VCC_TARGET is + 5V when POWER_ENABLE is at high level.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I noticed on your above schematic that there was VCC and VCC_Target.  There is no "VCC_Target" labeled on the board.  Could I be pulling VCC (red wire in my enclosed image above) for the UPDI 6 pin header from the wrong place?

 

GosubGreg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"VCC_Target" is the label on the schematic.
Not written on the board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The schematic had both VCC and VCC_Target implying they are different.  If I had to choose, VCC_Target sounds more appropriate for Atmel Studio 7.0 to determine the processor voltage level.  Guess I should hunt for where I can access VCC_Target on the board.

GosubGreg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps I have lost the plot.

 

Surely you develop your app on an XMINI-tiny817 using the built-in debugger.

 

And any final product is made on a custom pcb.   The pcb either has a standard 3x2 UPDI header or custom pogo pads to attach a custom external UPDI programmer pogo-cable.

 

Personally,  I would put a 3x2 header on the pcb if there is enough room.

But a pogo-jig might be more suitable for a tiny pcb.   Let's face it.  You can always access VCC, GND on any pcb.  You only need a pad for the single UPDI pin.

 

Yes,  you can hack your XMINI.   But a commercial programmer is more suitable for production programming.

 

Incidentally,  the XMINI UPDI works pretty well.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David,

Yes, I have an application working quite well (via default Xplained configuration) and am now trying to make it work in a more manufacturing setting.  My pcb won't have space for the 2x3 UPDI header and am trying to basically turn the Xplained mini into a 817 chip to test my "release" build with load/execute in a more prototypical configuration (before spending thousands on manufacturing my proto pcb's.

GosubGreg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

GosubGreg wrote:
My pcb won't have space for the 2x3 UPDI header

Why would you shoot yourself in the foot?  If there is no programming header(pads) are you planning to use preprogrammed chips on your board?

There are many ways to be creative and provide a set of contacts (three in this case) for programming, that take almost no space on the board.....

 

Jim

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are using the squid cable, DO NOT TRUST THE PIN NUMBERING !

Mike Adams
ADI Development, Inc.
http://www.adidev.com

... When it has to actually work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim,

I'll have a pad to touch for initial programming (while plugged into to user Vcc & Ground).  It's a small board and didn't want to tempt anyone to reverse engineer my product (though I'll likely add code security).

 

Can anyone help with my issue?  I'm just trying to make the ATtiny817 Xplained Mini look like an ATtiny 817 chip that can be programmed via Atmel ICE.  I've shared my edits (e.g. jumpers) and an image of the board.  I haven't been able to program the chip.

GosubGreg