Page 1 of 2

ATMEGA32 minimum system board MCU AVR Development Board core

Posted: Mon Jun 03, 2013 9:52 pm
by rewe1966
Hello together,
I try to use V-USB together with this board:
http://www.ebay.de/itm/251176689263?ssP ... 1439.l2648

(The main controller: ATMEGA32L-8AU
Interface: ISP (SIP6), JTAG (IDC10), all the IO leads to
Peripherals: power indicator light, water lights, VBUScircuit, reset button, four independent button, optional 3.3V or 5V working power mode, reservation the asynchronous clock interface
Working frequency: 16MHz )

Currently I have no sucess. This connection seems to be established, but Vendor ID and Product ID stay 0.
Has anybody managed to connect this board via V-USB?
Thanks in advance
Reinhold

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Tue Jun 04, 2013 12:14 pm
by vouvoume
Is there even some bootloader installed?

Maybe you first backup the contents of the MCUs flash and then try to install some different bootloader.

For example USBaspLoader (https://github.com/baerwolf/USBaspLoader) works with avrdude (therefore Arduino, too).
So with USBaspLoader you can eliminate the need for some extra software. The driver needed for USBaspLoader under Windows is the same as the driver for USBasp itself (surprise!). You can downloat this driver at: http://www.fischl.de/usbasp/

Best regards

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Wed Jun 05, 2013 8:26 am
by rewe1966
Hello vouvoume thanks for the answer.

I would like to use that board with normal ISP access for programming (what is already working fine) and the USB connection via V-USB for exchange data with the board.

In another project I realized that already with an AtMega8 and V-USB which is working fine for at least 2 years.

But with this board no success..I did several tries with V-USB, usbdrv, UsbConfig.h, fuse bits,...
But no success...
Do you have any idea?
thx

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Wed Jun 05, 2013 8:28 am
by vouvoume
Perhaps USB data lines aren't connected to the MCU properly?

Best regards

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Wed Jun 05, 2013 9:11 am
by Bob
Well your first problem is that it's using an ATMEGA32L which is only rated for 8Mhz, but I note that the crystal is 16MHz...I'm surprised this board will do anything at all.

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Wed Jun 05, 2013 11:04 am
by rewe1966
@Bob: yes that is very interesing. but the Board seems to work.
And firmware can be uploaded with USBaspLoader.
But maybe I should take that as reason to forget that board and V-USB access.

@vouvoume: The connection should be fine, because the board can be accessed with the USBaspLoader.

Best regards

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Thu Jun 06, 2013 6:08 am
by Bob
It's interesting that USBaspLoader works at 16Mhz on this chip, perhaps Atmega32L is specified for low power up to 8Mhz but will still work fine at 16Mhz with higher current draw.
Perhaps the loader is not writing the flash correctly, are you able to check this?
What compiler are you using? (I have had problems with earlier versions of WINAVR and bootloaders on largish AVR's as the SPM_PAGESIZE is defined incorrectly causing the flash to be written incorrectly)
What fuse settings are you using?
If USBaspLoader is working 100%, I wouldn't give up just yet.

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Thu Jun 06, 2013 10:55 am
by vouvoume
For compiling USBaspLoader (https://github.com/baerwolf/USBaspLoader) it is recommended to use ATMELs recent toolchain (http://matrixstorm.com/avr/tinyusbboard/#asmorc_windows).

What compiler are you using? (I have had problems with earlier versions of WINAVR and bootloaders on largish AVR's as the SPM_PAGESIZE is defined incorrectly causing the flash to be written incorrectly)

Not in the recent and revised version of https://github.com/baerwolf/USBaspLoader. There is BUG is long gone.

What fuse settings are you using?

The new USBaspLoader (URL above) is now automatically selecting the fuses during "make fuse".
For ATmega32L it should be: -U lfuse:w:0x1f:m -U hfuse:w:0xc0:m

Maybe you can feedback your experiences with the new USBaspLoader.

Have a nice day.

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Thu Jun 06, 2013 8:38 pm
by rewe1966
Hello Bob,
I use lfuse 0xCF hfuse: 0x9A
But I made several tries..not success

It's always the same error:
The Device is shown with Vendor ID 0 and Product ID also 0.
I can't install the driver with the LibUsb inf-wizard.exe.

Are you interested or does it make sense if I eMail you my Test Directory?
My EMail is rewell@gmx.de
Thanks for your help
Reinhold

PS: Where are you from? I come from Germany

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Thu Jun 06, 2013 9:04 pm
by vouvoume
Hehe, Germany, too. :-)

(Hallo rewe1966, kennt man sich vielleicht irgendwoher? Ich komme aus Ilmenau/Thueringen.)

Best regards

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Thu Jun 06, 2013 9:22 pm
by rewe1966
Gute Frage: Illmenau? WN Flaschen-Rücknahmeautomaten?

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Fri Jun 07, 2013 9:37 am
by vouvoume
Ne, dann nicht. Mit Wincor hatte ich noch nicht so viel zu tun.

MfG vouvoume

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Fri Jun 07, 2013 10:31 am
by rewe1966
@Vouvome: Hätte ja sein können...egal...Mail doch mal an rewell@gmx.de...über Hilfe wäre ich sehr dankbar...könnte dir auch ein Board zum Testen schicken (ich habe 3 aktuell, eins ist aber hin, FuseBits verdreht :-))

Now in English:
Do you know that board? It's still not working...I spend a lot of time and currently I think I give up...
thx Reinhold

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Fri Jun 07, 2013 2:36 pm
by vouvoume
Hi rewe1966

You could desolder the IC and then prepare it with "Atmega Fusebit Doctor" (http://mdiy.pl/atmega-fusebit-doctor-hvpp/?lang=en) to cure the fuses.
Plese do not throw it away, most likely you can revive it...

Maybe you try out the V-USB skeleton of my DIY studentboard (http://matrixstorm.com/avr/tinyusbboard/#examples).
If you want we can make a swap - I send you one of these puppies customly sokdered and you send me your broken board?

My e-mail address is matrixstorm@gmx.de

Best regards

Re: ATMEGA32 minimum system board MCU AVR Development Board

Posted: Mon Jun 10, 2013 2:15 am
by xiangrui
vouvoume wrote:Is there even some bootloader installed?

Maybe you first backup the contents of the MCUs flash and then try to install some different bootloader.

For example USBaspLoader (https://github.com/baerwolf/USBaspLoader) works with avrdude (therefore Arduino, too).
So with USBaspLoader you can eliminate the need for some extra software. The driver needed for USBaspLoader under Windows is the same as the driver for USBasp itself (surprise!). You can downloat this driver at: http://www.fischl.de/usbasp/

Best regards


This sounds a good choice. But when I tried to compile it with 12M Hz, I got the following error:
main.c: In function 'leaveBootloader':
main.c:250: warning: 'noreturn' function does return
main.c: At top level:
usbdrv/usbdrv.h:223: warning: 'usbFunctionDescriptor' used but never defined
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: address 0x200e of main.bin section .text is not within region text
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: address 0x200e of main.bin section .text is not within region text
make[1]: *** [main.bin] Error 1
make[1]: Leaving directory `D:/vusb-20100715/examples/usBaspLoader/firmware'
make: *** [do_firmware] Error 2

Without changing the default 16M Hz, the FIRMWARE can be complied with the above warning, but no error. Any idea? Thanks.

-Xiangrui