Author Topic: atmega128rfa1 reset on JTAG ID with new design  (Read 5993 times)

0 Members and 1 Guest are viewing this topic.

Offline 150c_vapourTopic starter

  • Newbie
  • Posts: 4
atmega128rfa1 reset on JTAG ID with new design
« on: August 29, 2012, 11:42:29 am »
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.pdf

The 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
 

Offline DRT

  • Regular Contributor
  • *
  • Posts: 54
  • Country: gb
Re: atmega128rfa1 reset on JTAG ID with new design
« Reply #1 on: August 29, 2012, 01:39:12 pm »
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)?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: atmega128rfa1 reset on JTAG ID with new design
« Reply #2 on: August 29, 2012, 04:35:49 pm »
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.
Alex
 

Offline 150c_vapourTopic starter

  • Newbie
  • Posts: 4
Re: atmega128rfa1 reset on JTAG ID with new design
« Reply #3 on: August 29, 2012, 06:58:57 pm »
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:

 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: atmega128rfa1 reset on JTAG ID with new design
« Reply #4 on: August 29, 2012, 10:33:21 pm »
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?
Alex
 

Offline 150c_vapourTopic starter

  • Newbie
  • Posts: 4
Re: atmega128rfa1 reset on JTAG ID with new design
« Reply #5 on: August 30, 2012, 11:43:33 am »
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!
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: atmega128rfa1 reset on JTAG ID with new design
« Reply #6 on: August 30, 2012, 03:46:39 pm »
Alex
 

Offline 150c_vapourTopic starter

  • Newbie
  • Posts: 4
Re: atmega128rfa1 reset on JTAG ID with new design
« Reply #7 on: August 30, 2012, 03:55:53 pm »
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.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: atmega128rfa1 reset on JTAG ID with new design
« Reply #8 on: August 30, 2012, 03:59:49 pm »
While you're at it, read fuses and check that JTAG is enabled.
Alex
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf