Dead at90usb?

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

So I have an at90usb1287, the first time I plugged it into the pc, the pc said unrecognized device but did not prompt me to install drivers. I thought whatever; I'll use my ISP header. Connecting an AVRISP MkII results in a green light on the AVRISP but AVRstudio gives an error that it can't enter programming mode! I've tried different cables and that doesn't work. Did I somehow fry the chip the first time I plugged it into the pc? That was the only time the pc ever gave a response to the board being plugged in.

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

Is this a "Key" ( AT901287USBKEY)? If it is it should have been recognized by the PC as a mass storage device(like a thumb drive).If it is a KEY then hooking up a MKII is no easy feat but it can be done.

Pete

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

This is my own board. I was, perhaps mistakenly, under the assumption that the pc would recognize the chip. Even so, it doesn't explain why I can't program it through ISP.

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

The usual suspects for ISP problems are:

Correct hookup of all power pins ,VCC,GND,AVCC

Correct hookup of ISP lines (read serial programming in the datasheet)

Correct ISP speed ( default clock is internal(1MHZ) so set ISP speed to 125KHZ)

Correct chip selected in programming window

Correct hookup of reset line (10k or 4k7 resistor to VCC)

Not reading and verifying chip signature before attempting anything else

Proper power supply

As for the non-communication to the PC that is because there is no program loaded on the chip from the factory
so it is up to you to provide that.

The "KEY" does come with a program and that is why it is a nice way to get started.I would look at the docs for the STK50x (don't remember the last digit but it is for the AT901287) and that might guide you to a better understanding .

Pete

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

Thanks for your quick replies. The ISP lines are hooked up correctly, ISP is set to 125kHz. I'm using a 30k on the reset line, but I can't read the chip signature since it won't go into programming mode. Thanks for clarifying that last bit up for me :) Is it possible that connecting it to the PC before ISP caused it to lock up somehow?

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

I havnt used a atusbkey avr yet, but it may very well not work if connected to the PC.

also depending what else is on your ISP lines, it could lockup the programmer. I usually leave my ISP pins disconnected from everything until I really need the pins.

if there is a way you can test this, I would give it a shot...

you said 'This is my own board' do you have a schematic? if not can you explain what is connected to the SCK MISO and MOSI pins?

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

I don't know what pins you hooked up to the PC but if you didn't have a proper level convertor (if you are talking RS232) then it's possible that you might have.

Maybe put a lower pullup on the reset line.If the reset line is not working correctly the MKII will let you know by a red status led.

Maybe a little schematic of your board may shed some light on the problem. You might think you did it right but there are many ways to do it wrong and someone here might spot something.

Pete

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

These images are proprietary technology, please do not share these with anyone! Just kidding :wink: This board is supposed to enable our Formula SAE team to get wireless telemetry data from our car, and I'm going to submit this project when I'm done. So far, the car side works, and it's the PC side, the side I thought would be easy, that doesn't work. In the schematic, 5v+ and VBUS signals are supposed to be connected, but aren't on the board, I fixed that by connecting them with a wire during production. The MKII would not recognize the chip w/o that connection. Currently, the MKII when plugged in through ISP will display a green status light indicating that it can control the reset line, but when I try to program the chip it fails to enter programming mode.


Eagle files here:
http://web.umr.edu/~sket55/Telemetry_files/

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

Did you say that you were able to recognize the chip at one time?If you were able to , did you perhaps change any of the fuses(clock maybe)?.

Pete

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

digitool wrote:
Did you say that you were able to recognize the chip at one time?If you were able to , did you perhaps change any of the fuses(clock maybe)?.

Pete

No, The first time I plugged in the USB jack, the PC came up with 'Unrecognized device' and nothing happened. After that, if I plug into the PC nothing happens, I don't get that error again. It's the same on other PCs as well. I thought when USB connects to a device, it does so first with low current and then only increments at the device's request. I don't think I could have changed any device settings since I'v never been able to connect to the device. At any rate, the AVR ISP gives a green light.

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

In the schematic, 5v+ and VBUS signals are supposed to be connected, but aren't on the board, I fixed that by connecting them with a wire during production. The MKII would not recognize the chip w/o that connection.
Quote:

I thought that at one time you were able to by your post.

It looks like none of your ISP lines are being shared and they seem to be going to the right pins.

If you have a scope look at the reset line.Does it get pulled down when trying to read the signature ( lower the ISP speed to allow viewing it better) .

Next is the SCK line.Any activity there?

Mosi next.Same thing.

Miso is the data out from the chip and that should have activity too.

Possible short ? Is the chip getting hot? With all those little legs it's easy to miss.

Pete

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

vector86 wrote:
... it's the PC side, the side I thought would be easy, that doesn't work. In the schematic, 5v+ and VBUS signals are supposed to be connected, but aren't on the board, I fixed that by connecting them with a wire during production. The MKII would not recognize the chip w/o that connection. Currently, the MKII when plugged in through ISP will display a green status light indicating that it can control the reset line, but when I try to program the chip it fails to enter programming mode.

I am working on a AT90USB layout, but with expressPCB. As I have a 'Key' My layout is untested. My first reaction was that you had the chip rotated 90 degrees. With the ISP and the USB header on the PIN 17 side rather than the pin 1 side. On further examination I see this is not the case. Still something to check. I have seen a number of SMT boards with the chip on rotated 90.

The Next observation is where is the crystal? (I have not opened the Eagle project yet.) Where I have a crystal you have what looks like a USB A/B header. I think the external crystal is needed for proper USB operation.

Most modern AVRs are set-up with the onboard Xtal at a safe value. Might want to check if this is the case with the USB varient. The Key comes with a crystal. I suspect that if this could be done away with it would have been done so.

If the HW is in order, like others I would suspect the fuses, especially with the lack of an external crystal.

-julie

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

My suggestion was going to be get a "KEY" which is already USB functional and has a bootloader on it and with the "FLIP" interface,loading test programs is a cinch.

Plenty of I/O with status leds and even an little joystick.

When done with the programing, port it over to the actual board.

Loooking at the schematic and actually having a working board in hand can help in speeding things along.( I would probably get a few just in case).

It sounds like there is a wireless receiver interfaced to the board and it is receiving data from the car.Don't know the power requirements of the receiver but I would think it would be low power.

Pete

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

I think your problem is in fact not having a crystal as jporter mentioned:

From the STK525 UserGuide:

Quote:

To use the USB interface of the AT90USBxxx, the clock source should always be a crystal or external clock oscillator (the internal 8MHz RC oscillator cannot be used to operate with the USB interface). Only the following crystal frequency allows proper USB operations: 2MHz, 4MHz, 6MHz, 8MHz, 12MHz, 16MHz. The STK525 comes with a default 8MHz crystal oscillator.


My AVR Site

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

Since the OP mentioned that this was a new chip, the fuses for the clock would be set for the default internal RC clock which would allow the chip to be programmed without the need for the external crystal which is necessary for proper USB comms. Maybe the old AVR chips required an external source but the newer chips have the internal so the need for an external is mute for the OP's problem.

The OP's problem is that he assumed that since it was a AT90USB128x it would be ready to communicate with the usb out of the box.

Pete

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

It seems that there is some confusion if the OP ever got the ISP to recognize. It could be that It did come up and in the confusion of the installation the fuses set for external crystal. As we all know from experience, it is real easy to set the fuses the wrong way by accident.

Somehow there was enough activity on the USB lines when the OP first connected the AT90USB128x to the PC. Perhaps in the confusion when the ISP was first connected The fuses got set. The accept box could be confused with an error. Or dismissed as the system is not working. I did this the first time I turned on Debug wire. Not so much I messed UP DW on a mega88, Somehow I set the clock source to some odd value, that took an STK500 to unjam through parallel programming.

[Edit: I should also add that I was working with a Dragon when I bunged the Mega88 clock. I think only the STK500 has an internal clock generator. However the point of this addendum is that It is real easy to overlook that 1/4 target clock frequency requirement. Which for most of the AVRs I have worked with needs to be really slow, like the 125KHz setting when the internal OSC is selected.]

-julie

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

Julie,

I also thought the fuses got wacked but the OP says otherwise but who knows what transpired.

Since you are working with the AT90USB's, do they have the bootloader per-installed on new chips? There is another thread where an OP said he could program the new chip thru FLIP which I thought highly unlikely.The datasheet says that the default is for the internal RC clock and if that is so then how could one use the USB since it needs the external crystal(or other suitable means).

Pete

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

digitool wrote:
Julie,

Since you are working with the AT90USB's, do they have the bootloader per-installed on new chips?
Pete

I am not that far along. I am still working with the "Key" using a JTAG ICE MKII. I have not had much time to work with this recently. I did swap the firmware to be one of the other demo projects using the JTAG.

-julie

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

Wow, so many responses since I last checked. Sorry, it's been a while.
This is on page 248 of the at90usb1287 data sheet:

Quote:
The USB controller provides the hardware to interface a USB link to a data flow stored in a double
port memory (DPRAM).
The USB controller requires a 48 MHz ±0.25% reference clock, which is the output of an internal
PLL. The PLL generates the internal high frequency (48 MHz) clock for USB interface, the PLL
input is generated from an external low-frequency (the crystal oscillator or external clock input
pin from XTAL1, to satisfy the USB frequency accuracy and jitter, only these sources clock allow
proper functionnality of the USB controller).

It seems I definitely need an external oscillator for USB functionality so this board is going to have to be remade or modified. But I still haven't figured out why ISP isn't working.

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

You are also going to need some software to make it work in USB. Get a AT90USBKEY for now to get up to speed on the project if you want to pursue the usb1287.I bet what your'e doing could be done with a Mega chip and a USB-RS232 chip which would bypass the need to write USB specific code ( which ain't easy).

My 2cents

Pete

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

digitool wrote:
You are also going to need some software to make it work in USB. Get a AT90USBKEY for now to get up to speed on the project if you want to pursue the usb1287.I bet what your'e doing could be done with a Mega chip and a USB-RS232 chip which would bypass the need to write USB specific code ( which ain't easy).

My 2cents

Pete

The USB code is already available from Atmel. I actually just took their USB to serial app-note and bastardized it to my own ends. The code just needs to be able to find its way to a chip somehow. I'm going to call Atmel tomorrow and see what they think about my problem. If all else fails I've got two more chips on the way. A usb key would definitely be a good idea for next year's car but Detroit competition is only 11 days away (we're a little behind schedule) so if this gets done I'll be very impressed. I'm keeping my fingers crossed.

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

Good to have a backup plan as they say ( Plan B ).Those eleven days will come fast and that "KEY" will start to look pretty good on the 'EVE'.

You not only have a 'hardware situation' but a 'software situation'.How do you know the code will work right out of the gate once you get the hardware to work. Attack the problem from both ends (the code be being debugged with the KEY while the soldering iron is waiting).Ahhh nothing like a last minute frenzy to get the blood flowing.

Pete

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

vector86 wrote:

The USB code is already available from Atmel. I actually just took their USB to serial app-note and bastardized it to my own ends. The code just needs to be able to find its way to a chip somehow. I'm going to call Atmel tomorrow and see what they think about my problem. If all else fails I've got two more chips on the way. A usb key would definitely be a good idea for next year's car but Detroit competition is only 11 days away (we're a little behind schedule) so if this gets done I'll be very impressed. I'm keeping my fingers crossed.

I would second the suggestion to start with the "Key" you should be able to get that quickly. That way you have a "Golden" board in which to test against.

I am still thinking you may have bunged the fuses and overlooked this when you first connected the ISP. It may be that the fuses were set to external, as a step before programming. This would happen if a set of instructions were followed. There is no warning when the clock is set wrong. After that everything will fail.

The easiest way to work through this would be to put a "clock" onto the crystal port. If you have a STK500 this can be tapped from that programmer.

A scope is useful to look at the signals on the ISP. You should see activity on the SCK line.

-julie

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

I have exactly the same problem.
i have a AT90USB1287 on a circuitboard with a crystal @ 16mhz.
the first time i plugged the cable in the computer, there was a short error message. after that nothing happens, not even if I use another pc. i tried to program with flip and isp. i used the stk500, but avr studio keeps saying :
Entering programming mode... failed!

i tried to lower the onboard stk500 oscillator and ISP clock again without succes.
don't know what to do...

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

You folks need to read the application notes for the Atmel USB chips.

All AT90USB chips (USBKey or not) ship with a USB Bootloader. In order for you to utilize the bootloader, you FIRST need to hook up an 8MHz oscillator. You will likely also have to change your clock fuses to utilize an external oscillator- I'm not sure if the USB chips ship with the default for internal oscillator or external. Note that you CAN program the fuses with ISP- the only protection fuses set are the ones to protect the bootloader program space. In any event, you MUST use an external crystal/oscillator, and set the fuses appropriately. I believe you also must use 8 MHz initially, unless you want to figure out how to reprogram the USB PLL register.

Okay, so now you have the proper crystal, right? Plugging this bugger into your USB port will still do NOTHING, as there is no application code on the chip- only a bootloader! In order to utilize the bootloader, you have to first download the FLIP PC application from Atmel, which comes with the proper USB drivers to talk to the bootloader. Install FLIP, plug in your USB AVR, then do the following to activate the bootloader:

Ground and hold the HWB Pin
Ground and release the RESET pin
Release the HWB pin.

Wala- the bootloader is activated. You now will need to tell your PC to use the FLIP USB Device Driver. Once you do this, you will be able to program the AT90USB with your application code.

Hopefully that clarifies things a bit.

HINT: Here is the URL for the App note on the bootloader (USB DFU Bootloader Datasheet):

http://atmel.com/dyn/resources/p...

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

Yeah we figured this out last week in this thread.Yet it looks like the bootloader is not public yet.

https://www.avrfreaks.net/index.p...

But the issue is whether the internal or the external clock is selected as default .If the internal is the default as stated in the datasheet then the chip is still unusable to communicate with flip thru USB and I don't think flip can set the fuses so the case must be that the chip needs an external clock to work which means the datasheet is wrong(brought up in the old thread).

Pete