AVR Minimus DFU Programming Problems

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

Hello all,

I have two AVR Minimus boards (version 1, with AT90USB162), both exhibiting the same behaviour.

They will both appear on the USB bus as DFU devices after a RESET/HWB button press. I can program them with FLIP/dfu-programmer under Linux, or so it appears. There are no error messages.

The problem is that after a reset back to the application nothing seems to be running, even a simple LED flasher (I've gone all the way back to using the example LED flasher HEX file from the Minimus website).

If I use my oscilloscope, there's no 16MHz clock on the external oscillator pins, in either DFU or application mode. This baffles me, because as far as I can tell from the literature the USB peripheral on the microcontroller needs that clock to function properly.

I have successfully used a Minimus board with DFU in the past, but that board is now encased in a project that I can't get to for comparison.

I have an ISP programmer, so I could set the CKSEL fuses to ensure that the external osc. is selected, but I was under the impression that I shouldn't have to do that.

Does anyone know what the issue here might be?

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

OK, I've done a fuse read using avrdude over ISP.

The fuses are 0x5E, 0xD9, 0xF4 for low, high, extended respectively, which is the default as shipped.

The CKSEL bits are set to 1110, so the external oscillator is selected with the correct frequency.

Having checked the scope trace again, there is actually a 16MHz signal from the oscillator, but its amplitude is about 50mV, riding on a DC level of about 750mV.

This behaviour is identical across both devices. It's very odd.

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

Without looking at the spec sheet for that specific device, is that CKSEL value for "external oscillator" or is it for "external crystal or resonator"? If it is for "oscillator", it won't run with just a crystal; you have to have a stand alone, fully powered, oscillator. On the other hand, it seems very puzzling that you would be able to read fuses without a running clock.

Very strange
Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

The datasheet says "Low Power Crystal Oscillator". Fuse values from 1000 to 1110 select the oscillator, and the precise setting I have (1110) is for an 8 to 16Mhz frequency.

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

I don't actually know that what I'm seeing on the 'scope isn't a perfectly valid clock, it just seems like a really small signal.

I think I should probably assume for now that the oscillator is working correctly. The fact the I can use DFU and ISP point to that being that case.

In that case there's something else wrong that is stopping the application working.

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

The DFU bootloader enables the Watchdog to jump to the user application in the default case, so you need to turn it off in your main application. See:

https://github.com/abcminiuser/l...

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

Turns out was an issue with Eclipse. It was using a completely different value for F_CPU than the one I thought it was. The delays were working, just much slower than they should have been.

The 16Mhz output from the crystal really isn't very high amplitude! It threw me, because I was convinced it must be the source of the issue.

Anyway, I'm well onto getting my application going. Phew!