atmega128rfa1 reset on JTAG ID with new design - Page 1
Forum section: electronics / general

author: 150c_vapour
author_rank: Newbie
timestamp: August 29, 2012, 11:42:29 am
content: Hi all,I have a custom PCB, a sensor board with the atmega128rfa1 chip.- Here is the schematic for the relavent sections:https://dl.dropbox.com/s/rdhz075xxfbq72k/ovAlert-rev00.pdf?dl=1- This is a set of traces around the reset, and a trace from a good JTAG ID with the same tool (but different micro):http://imgur.com/a/4rhff- The micro/rf layout is virtually copied from the atmega128rfa RCB design:http://www.atmel.com/Images/doc8339.pdfThe atmega128rfa1 has the radio in-package and internal vreg running at 1.8v with i/o pins able to range to 3.6v.When I apply power the NRST line goes high, indicating the chip is out of reset. Great!But when I use atmel's Dragon to read the JTAG data appears on the line and the TDO toggles, but immediately at the end of reading the jtag id the device goes into reset (NRST -> low). The tool reports a partially correct JTAG ID with the last byte random bits. Seemingly so close to working and very frustrating.I am suspicious this is a power issue as I am a software dude and weak on that aspect of design. I also used "tanceram" capacitors by the power supply instead of tantalum called for in the reference design. I thought I could test that this may have been the problem by putting a 47uf tantalum between the vdd and gnd near the avr but it was the same behaviour. There is a 200ma vreg to power the chip with 47uf caps on either side (datasheet suggested min 10uf). The RCB ref design also has 200ma power so I thought it would be ok. I have no way of measuring the current accurately right now, so I have no idea if there is a spike in it.Can anyone with more PCB experience see anything I may have missed?What sort of things might I try to further illuminate my problem??Any help *very much* appreciated, thanks.- Matt

author: DRT
author_rank: Regular Contributor
timestamp: August 29, 2012, 01:39:12 pm
content: A few ideas:- NRST cannot be driven low internally on this device, so if it is going low then your power rail is going down (incidentally, NRST has a permanent internal pull-up to DEVDD)- You don't seem to have any mechanism to control the JTAG voltage (no VTref connection) - what voltage is the Dragon trying to drive out?- The errata mentions an internal power-chain shutdown if Vin drops below 1.6V - could this be happening (even if a transient)?

author: ataradov
author_rank: Super Contributor
timestamp: August 29, 2012, 04:35:49 pm
content: A quote from the Dragon manual: "A minimum of 6 wires is required to connect AVR Dragon to the target board. These Signals are TCK, TDO, TDI, TMS, VTref and GND."I'm not familiar with Dragon schematics, but it might use VTref to set input/output levels for other signals. In this case you will need it indeed.

author: 150c_vapour
author_rank: Newbie
timestamp: August 29, 2012, 06:58:57 pm
content: Hey thanks guys.ataradov, I have the vref and gnd coming from another port with the uart so the jtag is using 6 wires.One thing I notice is that the reported vcc on the tool (dragon in avr studio) says 3.3 when I first connect it. Then 2.4 after I read the jtag. But I can see on the voltmeter it is 3.3. Not sure what's up with that. I do see the current spike on the meter when I read the jtag ID, but doesn't really tell me anything, as I don't know what the true magnitude of the spike is. The meter only flashes 15/10ma after holding at 6 before reading the jtag id.I think I may dust off my arduino demilouve and use the vcc from it as it is more robust then what I did on my board (which I am kicking myself for now).This is my setup:

author: ataradov
author_rank: Super Contributor
timestamp: August 29, 2012, 10:33:21 pm
content: Do you have another not populated board? I would start by eliminating all power circuitry, just solder megaRF and JTAG connector and power the board from a power supply.I don't see anything obviously wrong with this design.PS: What kind of software created this schematic?

author: 150c_vapour
author_rank: Newbie
timestamp: August 30, 2012, 11:43:33 am
content: The software is Mentorgraphics. I'm going to check the pins against what happens on a dev kit before a minimal component assembly. All the decoupling caps are 0402 and I've never tried to solder that. It will probably not go well. :-( Too bad the RCB's aren't available by themselves, you gotta buy a 500$ kit. Scams!

author: ataradov
author_rank: Super Contributor
timestamp: August 30, 2012, 03:46:39 pm
content: They are available herehttp://www.dresden-elektronik.de/shop/prod128.html.

author: 150c_vapour
author_rank: Newbie
timestamp: August 30, 2012, 03:55:53 pm
content: Sweet, thanks man. I connected up the ISP pins instead and it appears to work.At least it appears I can load the chip.Gotta get the jtag going though, debugging an app plugged into a radio stack without jtag will be painful.

author: ataradov
author_rank: Super Contributor
timestamp: August 30, 2012, 03:59:49 pm
content: While you're at it, read fuses and check that JTAG is enabled.