AT90PWM3 avrdude problem

Witam mam problem z AT90PWM3 - robie falownik malej mocy PMSM / BLDC. uzywam WINAVR z programatorem AVRDUDE no i podczas weryfikacji wyrzuca mi blad na 1 bajcie. uzywam prostego kabelka od bascoma "sample electronics programmer". Probowalem na 2 plytkach z tym prockiem - to samo. Jak odczytuje programatorem z bascoma przy ustwaionym procku ATMEGA8 (ta sama struktura pamieci), to okazuje sie ,ze zaprogramowane sa tylko nieparzyste strony po 64 bajty, i do tego jakimis dziwnymi wartosciami, ktorych nie moge znalezc w programie. Jesli jednak odczytam procka prog. bascoma i tymi smieciami zaprogamuje za pomoca AVRDUDE, to weryfikacja jest OK, czyli znaczy tyle ze Avrdude dobrze weryfikuje, tylko zle programuje. Programator od Bascoma nie obsluguje tego proca. AVRISP 3x ma bardzo uboga liste prockow. A na ICE II z debug wire zal mi troche kaski. Zna ktos inny programator ktory obsluguje te proce? Wiem ze sa bardzo malo popularne, Atmel dopiero wprowadza je do sprzedazy. Maja bardzo fajna ceche - 12(16) bit PWM pedzony z 64MHz PLL oraz szereg peryferiow do sterowania silnikami. I kosztuja (chyba nawet w detalu) 2.7 EUR (EBV ma w cenniku) Prosze o sugestie.

ponizej zamieszczam komunikat programatora:

avrdude -p at90pwm3 -P lpt1 -c bascom -U flash:w:main_natural_PWM.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9381 avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "main_natural_PWM.hex" avrdude: input file main_natural_PWM.hex auto detected as Intel Hex avrdude: writing flash (1530 bytes):

Writing | ################################################## | 100% 0.78s

avrdude: 1530 bytes of flash written avrdude: verifying flash memory against main_natural_PWM.hex: avrdude: load data flash data from input file main_natural_PWM.hex: avrdude: input file main_natural_PWM.hex auto detected as Intel Hex avrdude: input file main_natural_PWM.hex contains 1530 bytes avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.64s

avrdude: verifying ... avrdude: verification error, first mismatch at byte 0x0000 0x5c != 0x00 avrdude: verification error; content mismatch

avrdude done. Thank you.

make.exe: *** [program] Error 1

Reply to
Greg
Loading thread data ...

Użytkownik Greg napisał:

ooo... a gdzie udało ci się go kupić (w Polsce) i za ile ?

Reply to
Grzegorz Kurczyk

znalazlem pomeczylem troche plik konfiguracyjny i zadzialalo avrdude.conf LED pieknie mryga:) W datasheecie jest prawdopodobnie blad - adresy wskazuja na strony po 128B (64W) zamaist 64B (32W) Wystarczylo zmienic 3 wpisy w sekcji: loadpage Prawdopodobnie autorzy avrdude nie mieli mozliwosci przetestowac softu na tych prockach. jakby ktos kiedys potrzebowal, podaje poprawny fragment pliku:

#------------------------------------------------------------ # AT90PWM3 #------------------------------------------------------------

# Completely identical to AT90PWM2 (including the signature!)

part id = "pwm3"; desc = "AT90PWM3"; stk500_devcode = 0x65; ## avr910_devcode = ?; pagel = 0xD8; bs2 = 0xE2; reset = io; chip_erase_delay = 9000;

pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", "x x x x x x x x x x x x x x x x";

chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", "x x x x x x x x x x x x x x x x";

timeout = 200; stabdelay = 100; cmdexedelay = 25; synchloops = 32; bytedelay = 0; pollindex = 3; pollvalue = 0x53; predelay = 1; postdelay = 1; pollmethod = 1;

memory "eeprom" size = 512; min_write_delay = 4000; max_write_delay = 4500; readback_p1 = 0xff; readback_p2 = 0xff; read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";

write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";

mode = 0x41; delay = 6; blocksize = 4; readsize = 256; ; memory "flash" paged = yes; size = 8192; page_size = 64; num_pages = 128; min_write_delay = 4500; max_write_delay = 4500; readback_p1 = 0xff; readback_p2 = 0xff; read_lo = " 0 0 1 0 0 0 0 0", " 0 0 0 0 a11 a10 a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", " o o o o o o o o";

read_hi = " 0 0 1 0 1 0 0 0", " 0 0 0 0 a11 a10 a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", " o o o o o o o o";

loadpage_lo = " 0 1 0 0 0 0 0 0", " 0 0 0 x x x x x", " x x x a4 a3 a2 a1 a0", " i i i i i i i i";

loadpage_hi = " 0 1 0 0 1 0 0 0", " 0 0 0 x x x x x", " x x x a4 a3 a2 a1 a0", " i i i i i i i i";

writepage = " 0 1 0 0 1 1 0 0", " 0 0 0 0 a11 a10 a9 a8", " a7 a6 a5 x x x x x", " x x x x x x x x";

mode = 0x41; delay = 6; blocksize = 64; readsize = 256; ; # AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81. memory "signature" size = 3; read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", "x x x x x x a1 a0 o o o o o o o o"; ; memory "lock" size = 1; write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", "x x x x x x x x 1 1 i i i i i i";

read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", "x x x x x x x x x x o o o o o o"; ;

memory "lfuse" size = 1; write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", "x x x x x x x x i i i i i i i i";

read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", "x x x x x x x x o o o o o o o o"; ;

memory "hfuse" size = 1; write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", "x x x x x x x x i i i i i i i i";

read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", "x x x x x x x x o o o o o o o o"; ;

memory "efuse" size = 1; write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", "x x x x x x x x x x x x x x x i";

read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", "x x x x x x x x o o o o o o o o"; ;

memory "calibration" size = 1; read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", "0 0 0 0 0 0 0 0 o o o o o o o o"; ; ;

Reply to
Greg

Użytkownik Greg napisał:

Dzięki. Przyda się jak tylko dorwę tego scalaka :-)

Reply to
Grzegorz Kurczyk

Jeszzce jedna kwestia dla koszystajacych z avrdude - program zostawia stan portu jaki zastal. Dzisiaj odpalam soft - nei dziala, LED nie mryga, po godzinie walki naszlo mnie by wyciagnac wtyczke ISP - dziala. Wlacam bascoma, wylaczam - dziala. Widac Bascom ustawil port LPT ze linia reset byla wysoka. Jest opcja w avrdude zeby reset przyjmowal ustalona wartosc.

Reply to
Greg

Greg przemówił ludzkim głosem:

Jeśli wszystko inne zawiodło, to zawsze zostaje ostatnia możliwość: przeczytać dokumentację :-)

-E EXITSPEC[,...]'

`reset' The `/RESET' signal will be left activated at program exit,

`noreset' The `/RESET' line will be deactivated at program exit

Reply to
Zbych

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.