atmega32u2 does not program via SPI

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

I have a few mega chips all work fine with AVR studio 6's programing tool with both my STK500 and AVRISP. I need to flash an atmega32u2 and the usb avrisp picks up the chip ( green lights) but says it read a 0xc0 instead of 0x00. I tried the SKT500 but I guess there is no support for that one as I was not able to select the chip in the drop down list.  I can not image the chip is far off from the 32u4 in the way programing via the SPI, so I have to suspect the chip but have the one on hand. I tried lowing the speed but that didn't help. AFAIK this is a virgin chip.  I plan to order a few more but wanted to check my sanity here, could I be missing something else?

 

Last Edited: Fri. Jan 17, 2020 - 01:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

S_K_U_N_X wrote:
I tried the SKT500 but I guess there is no support for that one as I was not able to select the chip in the drop down list.
mega32U2 with STK600 and with AVRISP mkII.

Atmel Studio 6.2 Service Pack 2 (RELEASE NOTES) (build 1563)

via AVR and SAM Downloads Archive | Microchip Technology

 

P.S.

S_K_U_N_X wrote:
I need to flash an atmega32u2 and the usb avrisp picks up the chip ( green lights) but says it read a 0xc0 instead of 0x00.
power, clock, signals

First guess is a defect on the PCBA containing the mega32U2.

 

"Dare to be naïve." - Buckminster Fuller

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



First guess is a defect on the PCBA containing the mega32U2.

 Huh in interesting I have this layout PCBA

 

 

Don't see a defect but could be a solder issue. I check +5,ground, and reset on the SPI. I'll double check the 3 comm lines. 

 

 

 

 

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

I don't see any VCC/AVCC -GND bypass caps near the AVR!

Jim

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

Presumably this is the schematic then?

 

http://dokuwiki.ehajo.de/_media/bausaetze:m8u-breakout.pdf

 

It should be possible to use an STK500 to program such a board by making using a 6 pin ribbon cable between the ISP6PIN header on STK500 and the ISP header on this board - but someone with more time available than me probably needs to check that all 6 pins in the schematic and on the PCB are indeed wired in the same ordering as the ISP6PIN header expects (otherwise some kind of cross over cable might be needed).

 

PS I note that is for 8U2 not 32U2 but I presume they have the same pinout?

Last Edited: Fri. Jan 17, 2020 - 02:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would expect any hardware programmer to do ISP on a 8u2 or 32u2.    Check for pcb routing errors.    Broken, shorting tracks or simply wrong layout.

 

Since the 32u2 is SMD only,   IDEs might not provide a dropdown for the STK500.    Avrdude will definitely support chips regardless of package.

 

Avoid things like Extreme Burner.   It will work fine for chips that are commonly used in India like mega8/16/32.    If unsure about support,  ask on an Indian website.

 

David.

Last Edited: Fri. Jan 17, 2020 - 02:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

S_K_U_N_X wrote:
I have a few mega chips all work fine with AVR studio 6's programing tool with both my STK500 and AVRISP. I need to flash an atmega32u2 and ... I tried the SKT500 but I guess there is no support for that one as I was not able to select the chip in the drop down list.
STK500 was added to mega32U2 in Atmel Studio 7.

Release Note | Atmel Studio 7.0 (first build)

[bottom of page 37]

via AVR and SAM Downloads Archive | Microchip Technology

 

"Dare to be naïve." - Buckminster Fuller

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

My ISP6PIN header from the STK500 works ok on my other chips. Just the avr IDE is not allowing the option. I did check the pins, and there are no shorts or interruptions. I may have to wait on my chips to get here.