Skocz do zawartości

Znaki zapytania podczas komunikacji z klonem Nano


Recl56

Pomocna odpowiedź

17 minut temu, Belferek napisał:

A gdy delay(1000) w blinku zmienisz na delay(200) to migają diody szybciej?

Tak, ale tylko kiedy mam ustawione na Nano. Wtedy mam coś takiego:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/XXX/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/XXX/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.wchusbserial1420
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 5.0
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/var/folders/ts/21tn5l216glbktjylr7c75jc0000gn/T/arduino_build_361427/Blink.ino.hex"
avrdude: writing flash (922 bytes):

Writing | ################################################## | 100% 0.16s

avrdude: 922 bytes of flash written
avrdude: verifying flash memory against /var/folders/ts/21tn5l216glbktjylr7c75jc0000gn/T/arduino_build_361427/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/ts/21tn5l216glbktjylr7c75jc0000gn/T/arduino_build_361427/Blink.ino.hex:
avrdude: input file /var/folders/ts/21tn5l216glbktjylr7c75jc0000gn/T/arduino_build_361427/Blink.ino.hex contains 922 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.11s

avrdude: verifying ...
avrdude: 922 bytes of flash verified

avrdude done.  Thank you.

Coś się tam nie zgadza z configuration file, ale działa tzn. dla 200ms jest to tak naprawdę 700-800 ms.

Teraz próbuje na LG:

1878408965_Screenshot2022-12-19at23_09_15.thumb.png.e4904a6b64c67298fd532160b3435259.png

I coś działa... ale... inaczej. Dioda TX działa normalniej, regularnie wysyła sygnał, ale dalej są to znaki zapytania. Jedyny komunikat to "An error occurred while uploading the sketch". Jak zmienię port to dostaję to:

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

 

 

30 minut temu, farmaceuta napisał:

 No ale bootloader wgrywales dla 328 czy tego LG?

Wydaje mi się, że 328. Korzystałem z tego (Step 6: Missing BOOT-LOADER): https://www.instructables.com/5-Most-Common-Arduino-Nano-Clone-Problems-and-Thei/

Link do komentarza
Share on other sites

Każda Atmega ma raczej wyraźny napis ATMEL i MEGA , LGT mają  chipy bez nadruku, albo jakiś napis Wawegat albo COŚ328p, ale raczej nie bezczelnego napisu MEGA328P.

Twoja płytka w akcji na fotce w ogóle nie ma kwarcu dla uC, jest ten malutki 12MHz dla CH340, w miejscu kwarcu uC jest tylko kondensator obok pinu D6. Jak to wygląda w rzeczywistości? Może on ma wgrany soft i ustawienie dla 8MHz na wewnętrznym oscylatorze, a próbujesz go ganiać na 16MHz.

Do LGT8 programator jest zupełnie inny, piny SWD, SWC, RST, można sobie zrobić na bazie LarduinoISP.

Link do komentarza
Share on other sites

Zarejestruj się lub zaloguj, aby ukryć tę reklamę.
Zarejestruj się lub zaloguj, aby ukryć tę reklamę.

jlcpcb.jpg

jlcpcb.jpg

Produkcja i montaż PCB - wybierz sprawdzone PCBWay!
   • Darmowe płytki dla studentów i projektów non-profit
   • Tylko 5$ za 10 prototypów PCB w 24 godziny
   • Usługa projektowania PCB na zlecenie
   • Montaż PCB od 30$ + bezpłatna dostawa i szablony
   • Darmowe narzędzie do podglądu plików Gerber
Zobacz również » Film z fabryki PCBWay

@keram167 Próbowałem, ale nic 😕

@kaczakat Generalnie żadnego nadruku nie ma, i wygląda to tak jak opisałeś (i dokładnie tak jak na zdjęciach). Próbowałem zmienić na 8MHz, ale nic to nie daje.
@farmaceuta Co do wypalania, próbowałem różnych ustawień, Uno jako isp. Albo dostałem (LGTSWD):

Arduino: 1.8.19 (Mac OS X), Board: "LGT8F328, [To burn an ISP] SERIAL_RX_BUFFER_SIZE to 250, Internal, 8 MHz, 328P-LQFP32 (e.g. MiniEVB nano-style and WAVGAT)"

/Users/XXX/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/XXX/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cjtag2isp -Pusb -e -Ulock:w:0x3f:m -Uefuse:w:0x07:m -Uhfuse:w:0xff:m -Ulfuse:w:0xff:m 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/XXX/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/XXX/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : jtag2isp
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2103)

avrdude done.  Thank you.

Error while burning bootloader.

Albo to (AVR):

Arduino: 1.8.19 (Mac OS X), Board: "LGT8F328, [To burn an ISP] SERIAL_RX_BUFFER_SIZE to 250, Internal, 8 MHz, 328P-LQFP32 (e.g. MiniEVB nano-style and WAVGAT)"

/Users/XXX/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/XXX/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbmodem14201 -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:0x07:m -Uhfuse:w:0xff:m -Ulfuse:w:0xff:m 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/XXX/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/XXX/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem14201
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Error while burning bootloader.
Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Wydaję mi się, że nie mam programatora/nie umiem tego zrobić. @kaczakat miałbyś może jakiś link jak to powinienem zrobić?

Link do komentarza
Share on other sites

Ale nie wystarczy wybrać jako programator  LGTSWD, trzeba go sobie zrobić. Na początek sprawdź wyprowadzenia listwy ICSP, multimetr i oznacz które są podłączone do RST, czy jest połączenie do pinów 11,12,13, VCC, GND. 

Na mojej płytce nie ma, zamiast zwykłego ICSP jak w NANO z Atmega mam taki układ (1 jest przy Vin Nano, widok z gniazdem USB po prawej):

image.png.0f2ae2dcea7b50656e543cdbe02236e1.png

Tylko pin 13 (SCK) jest wyprowadzony i RST, zamiast MOSI I MISO (12 i 13 Arduino Nano) są piny bezpośrednio z uC:

image.thumb.png.cd5e682989f78658d7030a0305cc6fff.png

Spróbuje zrobić taki programator i Ci opiszę, wystarczy inne sprawne Arduino i płytka stykowa, albo połączenie kabelkami na pająka. Ale skoro działa bootloader to może przyczyna jest inna.

Problem może być też zimny lut, nie połączony pin, przerwa na ścieżce.

  • Lubię! 1
Link do komentarza
Share on other sites

Tak się zastanawiam czy jest o co kruszyć kopię kiedy ten modulik to ok. 40 zł. Ja bym sobie tę problematyczną płytkę zostawił na wieczory kiedy to nic sensownego nie miałbym do roboty i tyle.

@Recl56 pokaż fotkę dokładnie pokazującą mikrokontroler na tej płytce

Link do komentarza
Share on other sites

Bo to parę minut zabawy? A te płytki LGT były po dolarze za dwie czasami (wersja ala PRO MINI) :D.

Odtworzyłem błąd, dodaj kondensator na pin RST, jest opis w szkicu LarduinoISP, akurat miałem 470u, ale 10u powinien wystarczyć, może mniejszy.

Programator można zrobić z płytki LGT, wtedy zwróci uwagę na bufor RX, by w ustawieniach zmienić na 250. Wgrywając do płytek z rodziny AVR trzeba to sobie na chwilę przestawić z 64 na 250 w pliku ....AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino\HardwareSerial.h czy gdzie tam jest core.

Pinologia jest opisana w szkicu

// pin name:    Arduino:          LGT8FX8P:
// slave reset: 10:               PC6/RESET 
// SWD:         12:               PE2/SWD
// SWC:         13:               PE0/SCK

Działa wypalanie bootloadera i wgrywanie szkicu z programatorem AVR ISP.

Edit:

No trochę przesadziłem z cenami LGT, ostatnio kupowałem po 1-2$  + jakieś kupony, wszystko chodzi   szybciej niż w AVR nawet z tym samym zegarem, a na 32MHz to już w ogóle, nie ważne czy zasilany 3 czy 5V, ale ze względu na brak pomysłu na uśpienie do deklarowanych 1uA (udało się zejść w okolice 1mA, czyli żadne uśpienie) przy tej różnicy w cenie już bym go nie kupił. Jak by chodziło tylko o szybkość działania to są ESP, które są wielokrotnie szybsze i w podobnej cenie.

A LGT kupowałem jako LGT, jak ktoś robi scam to zwrot jeśli można i koniec tematu.

Edytowano przez kaczakat
korekta
  • Pomogłeś! 1
Link do komentarza
Share on other sites

Dołącz do dyskusji, napisz odpowiedź!

Jeśli masz już konto to zaloguj się teraz, aby opublikować wiadomość jako Ty. Możesz też napisać teraz i zarejestrować się później.
Uwaga: wgrywanie zdjęć i załączników dostępne jest po zalogowaniu!

Anonim
Dołącz do dyskusji! Kliknij i zacznij pisać...

×   Wklejony jako tekst z formatowaniem.   Przywróć formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Twój link będzie automatycznie osadzony.   Wyświetlać jako link

×   Twoja poprzednia zawartość została przywrócona.   Wyczyść edytor

×   Nie możesz wkleić zdjęć bezpośrednio. Prześlij lub wstaw obrazy z adresu URL.

×
×
  • Utwórz nowe...

Ważne informacje

Ta strona używa ciasteczek (cookies), dzięki którym może działać lepiej. Więcej na ten temat znajdziesz w Polityce Prywatności.