XMega JTAG port pulled high

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

I have a batch of XMega128A1s that all exhibit the same behavior: PORTB pins 4-7, JTAG port (are all pulled high to 0.7V, diode drop from somewhere?), even when being held under reset with no peripherals attached.

In addition, the pins are not configurable in code. I also tried to set the ACB_CTRLA bit, but that does nothing.

I have older XMega128A1s that do not exhibit this behavior.

Was there a silicon change? I can't find anything applicable in the errata.

Thanks,

-Aaron

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

Is the JTAGEN fuse the same on both units?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Yep, that did it. Thanks!

I wonder if the old xmega I had had this fuse disabled by default, I don't remember messing with the fuses.

Thanks for your quick help!

-Aaron

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

I just checked the datasheet on atmels site and it says the JTAGEN bit is 0 by default! I have a huge tray of xmegas with this bit set. WTF?

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

Quote:

I just checked the datasheet on atmels site and it says the JTAGEN bit is 0 by default! I have a huge tray of xmegas with this bit set. WTF?


Are you having a "set" and "0 value" perception problem? A "programmed" fuse bit that enables the function will have a 0 value; and "unprogrammed" fuse bit has a 1 value. If JTAG is enabled, the JTAGEN fuse will have the value 0.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Right. I worded that wrong.

However, fact still remains that the chips I have are not at their default value (JTAGEN has a value of 1), at least according to the datasheet I am reading from atmels site.

Its not a big deal though, since I can change the fuse bit in code. :) It just sucks I wasted a bunch of time.

Thanks for your help.

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

Huh? Are the chips at default value or not? What do you get with a virgin chip and Read Signature and Read Fuses?

My datasheet for the "A" series say that JTAGEN is 0. Are your chips different?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Yes. Out of the box, JTAGEN is 1; not the default value. I have tried this on about 10 chips with nothing attached other than power, gnd, and the ICSP cable.

The chips I received previous to my most recent purchase had JTAGEN bit set to 0; the default value.

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

That doesn't sound right, does it? What if your production setup for an app uses JTAG to load firmware?

Can anyone else with a new shipment of Xmegas confirm this? A1's or others...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Myself and a few other engineers and confirmed this with our stock of Xmegas. The JTAGEN bit is 1 when it should be 0 at least that is what the datasheet says.

Its not a big deal to reprogram the chips since we will be testing them anyway, but I am just wondering why there is a discrepancy between the datasheet (and errata) and what I am receiving.

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

I'm confused. The datasheet is correct. Sorry for all of the noise.

JTAG is enabled when JTAGEN is 0, fuse4 is 0xFE, JTAGEN check box checked in AVRStudio.

JTAG is disabled when JTAGEN is 1, fuse4 is 0xFF, JTAGEN checked box unchecked in avrstudio.

However, I never touched the fuses on my first boards and they were set to fuse4 0xff when I got them, I still have some and verified this. I don't see this change in the errata, I must of received engineering samples the first time around.

Thanks for your help.

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

I need to turn off the JTAG on my XMEGA A3 device, but if I try to 'program device' over PDI it simply refuses to connect. Does PDI fuse setting work? If so how do I do it? Or - are the fuse bytes available in debug mode - again, I cant find them.

Last option, does anyone have a code snippet to kill the JTAG by code because I haven't yet sussed out the protection register stuff - assuming they are protected.

Thanks.

UPDATE FIXED:
Use the MCUCR register to disable JTAG without touching the fuse ;

Simply add

CCPWrite (&MCU.MCUCR, MCU_JTAGD_bm);

also include the CCPWrite header

I still would like to know if PDI fuse programming works for anyone!