Author Topic: [AVR] Writing or using a UART bootloader.  (Read 1807 times)

0 Members and 1 Guest are viewing this topic.

Offline Sudo_apt-get_install_yumTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: se
[AVR] Writing or using a UART bootloader.
« on: July 12, 2021, 08:52:47 am »
Hello everyone!

Like the title says, I’m looking to add a bootloader to my project but would like some input since I’ve never done such a thing.

Goal:
The goal of the bootloader is to safely update the main program code over the UART. The update should be able to be performed by a PC or by a PLC and should be as easy as to use as possible.
Just send the bytes from the PC, the bootloader responds with "ACK/NACK" if the checksum adds up and then it continues.

Problems:
One of the problems is that I’ve never written a bootloader, it does seem quite straight forward and looking at existing ones on GitHub makes it seem rather unremarkable. The thing is that I would prefer a tested bootloader that is known to work well instead of creating one from scratch and possibly introducing bugs that would require a reflash to fix.

The second problem is that the processor (ATMega328P) communicates over RS485 with a RS232 to RS485 transceiver and an extra pin is used for flow control. The processor does not have a hardware configurable flow control pin like most modern processor, so the communication direction must be controlled through software. This is however an easy things to do.

Possible bootloaders:
So I’ve done some searching on the internet for possible bootloaders to use but haven’t found a bootloader that would work right out of the box.

OptiBoot seems to be the most robust opensource bootloader, but I don’t like that it is made for Arduino. It emulates the STK500 which is nice but seems rather extensive for what I need, not completely sure how il write an STK500 programming interface for a PLC.
Another downside/upside is that it’s a very extensive bootloader with somewhat lacking documentation that has support for loads of processors and configurations, i just need it to work on one processor and make it as simple as possible to use/understand. At first glance, OptiBoot does not support "custom" entry/calling the bootloader from the main program, something id like to do. https://github.com/Optiboot/optiboot


MagBoot is another alternative, its not as commonly used but seems good. Its a very stripped-down bootloader which is nice. I’ve done a re-write of this bootloader to make it work for my application and it seems to work (not done any extensive testing). There are things I don’t like with it so if I decide to go for a custom bootloader il use it as a reference and write one from scratch. This bootloader doesn’t really have any documentation but is small and easy to understand. https://github.com/blastur/magboot


There are tons of bootloader on the internet so I’m not sure which one to use or if il write one from scratch.
It seems rather unnecessary to write one from scratch and I would like to avoid it so as not to introduce a bug that would require a complete reflash to correct. But id also not want to use a online bootloader that has some bug in it either. I’ve done some searching on the web and in this forum/avrfreaks but haven’t found a definitive answer.

Any input is appreciated!
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7765
  • Country: de
  • A qualified hobbyist ;)
Re: [AVR] Writing or using a UART bootloader.
« Reply #1 on: July 12, 2021, 09:34:34 am »
 

Offline Sudo_apt-get_install_yumTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: se
Re: [AVR] Writing or using a UART bootloader.
« Reply #2 on: July 13, 2021, 03:05:25 pm »
Thanks for the recommendation, skimmed through it and it seems to be pretty good and well documented!
Il definitively keep it in mind.

Id still prefer a stripped down bootloader since I don’t need the portability or configurability of the OptiBoot variants. Being able to compile it for every AVR processor and clock configuration is  a bit overkill for my use case. "Keep it simple stupid".
I did some quick testing with the regular OptiBoot and got it running on my board but couldn’t get the RS485 flow control to work, will do some more testing but still think the OptiBoot bootloader is a bit overkill.
 

Offline Sudo_apt-get_install_yumTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: se
Re: [AVR] Writing or using a UART bootloader.
« Reply #3 on: July 14, 2021, 12:18:20 pm »
Not sure if its okey to ask a questing in my thread or if I should start a new one. It is however related.

Like i mentioned earlier, I’ve been doing some testing with OptiBoot.
I noticed that the Bill Westfield (project maintainer) had added RS485 support in commit bcc71438fe.... (16 days ago) https://github.com/Optiboot/optiboot/commit/bcc71438fe23e43ce95f1347844400050bf4cdb6

Its working and I’m able to send/receive data from within the bootloader but its refusing to program for some reason and I’m not sure why.


Below is the verbose output from Arduino IDE
Code: [Select]
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\USER~1.STR\AppData\Local\Temp\arduino_build_968772/Blink.ino.hex:i

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 "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         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
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
         Hardware Version: 4744608
         Firmware Version: 8.4611299
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
         Vtarget         : 420030.5 V
         Varef           : 0.3 V
         Oscillator      : 921.600 kHz
         SCK period      : 18594687.6 us

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_initialize(): failed
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Problem uploading to board.  See [url]https://support.arduino.cc/hc/en-us/sections/360003198300[/url] for suggestions.

Below is the sniffed communication between the computer and the target device.
Code: [Select]
[14/07/2021 13:04:17] - Open port COM4 (C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe)
 
[14/07/2021 13:04:18] Written data (COM4)
    30 20 
[14/07/2021 13:04:18] Read data (COM4)
    14 10 
[14/07/2021 13:04:19] Written data (COM4)
    30 20 
[14/07/2021 13:04:19] Read data (COM4)
    14 10 
[14/07/2021 13:04:19] Written data (COM4)
    30 20 
[14/07/2021 13:04:19] Read data (COM4)
    14 10 
[14/07/2021 13:04:19] Written data (COM4)
    41 80 20 
[14/07/2021 13:04:29] Written data (COM4)
    41 81 20 
[14/07/2021 13:04:29] Read data (COM4)
    14 08 10 
[14/07/2021 13:04:29] Written data (COM4)
    41 82 20 
[14/07/2021 13:04:39] Written data (COM4)
    41 98 20 
[14/07/2021 13:04:39] Read data (COM4)
    14 03 10 
[14/07/2021 13:04:39] Written data (COM4)
    41 84 20 
[14/07/2021 13:04:49] Written data (COM4)
    41 85 20 
[14/07/2021 13:04:49] Read data (COM4)
    14 03 10 
[14/07/2021 13:04:49] Written data (COM4)
    41 86 20 
[14/07/2021 13:04:59] Written data (COM4)
    41 87 20 
[14/07/2021 13:04:59] Read data (COM4)
    14 03 10 
[14/07/2021 13:04:59] Written data (COM4)
    41 89 20 
[14/07/2021 13:05:09] Written data (COM4)
    41 81 20 
[14/07/2021 13:05:09] Read data (COM4)
    14 08 10 
[14/07/2021 13:05:09] Written data (COM4)
    41 82 20 
[14/07/2021 13:05:19] Written data (COM4)
    42 86 00 00 01 01 01 01 03 ff ff ff ff 00 80 04 
    00 00 00 80 00 20 
[14/07/2021 13:05:19] Read data (COM4)
    14 10 
[14/07/2021 13:05:19] Written data (COM4)
    45 05 04 d7 c2 00 20 
[14/07/2021 13:05:29] Written data (COM4)
    51 20 
[14/07/2021 13:05:29] Read data (COM4)
    14 10 
[14/07/2021 13:05:29] - Close port COM4

I’m looking through the AVR061 appnote and working on figuring out the issue but I’m not completely sure just yet.

Any input is appreciated!
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: [AVR] Writing or using a UART bootloader.
« Reply #4 on: July 15, 2021, 06:06:48 am »
I didn’t so much “add” rs485 support as merge code that someone else had written.
I noticed that it doesn’t quite work the way that I’d like, and also that making it work “better” is “tricky”. :-(


There’s an open issue wrt rs485 in optiboot_x that says that some rs485 adapters work better than others.


(What adapter are you using, and what is generating that nice debug output?   That debug info seems to show correct responses, but avrdude doesn’t seem to see them.  (Try adding more -v options to get more debugging.  I think -vvvv is the max))

 

Offline Sudo_apt-get_install_yumTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: se
Re: [AVR] Writing or using a UART bootloader.
« Reply #5 on: July 15, 2021, 07:29:07 am »
Yeah, noticed that you added it from the tiny core (i linked the working commit).

Also noticed that there was a similar issue https://github.com/Optiboot/optiboot/issues/318 but for the "x" core and didn’t want to high-jack the issue so posted here. Was also not completely sure if I had compiled it incorrectly since it’s my first attempt at OptiBoot.

The adapter I’m using is the https://www.sparkfun.com/products/9822, based on the FTDI FT232RL bridge, it’s been working with the exact setup for a long time but i know that a few buddies of mine have had issues with the driver for it.

I’m not sure how to change the output log in Arduino, I’m not too experienced with the backend of Arduino. So I used the "regular" AVRDUDE with the Arduino config.

The program i used to sniff the serial communication is called "Advanced serial port monitor" https://www.com-port-monitoring.com/ and is in "Dump view". The program cost but there is a free trial.

The command used for avr-dude.
Code: [Select]
./avrdude.exe -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -vvvv -p atmega328p -c arduino -P COM4 -b 115200


AVR-DUDE output:
Code: [Select]
avrdude.exe: Version 6.3-20190619
             Copyright (c) 2000-2005 Brian Dean, [url]http://www.bdmicro.com/[/url]
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

             Using Port                    : COM4
             Using Programmer              : arduino
             Overriding Baud Rate          : 115200
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]
             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
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

             Programmer Type : Arduino
             Description     : Arduino
avrdude.exe: Send: A [41] . [80]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: A [41] . [81]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [08]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [82]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: A [41] . [98]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [03]
avrdude.exe: Recv: . [10]
             Hardware Version: 4744608
             Firmware Version: 8.4611299
avrdude.exe: Send: A [41] . [84]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [03]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [85]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: A [41] . [86]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [03]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [87]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [03]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [89]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
             Vtarget         : 0.3 V
             Varef           : 197035782.4 V
             Oscillator      : 28.800 kHz
             SCK period      : 17531493.1 us

avrdude.exe: Send: A [41] . [81]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [08]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [82]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: B [42] . [86] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] . [80] . [04] . [00] . [00] . [00] . [80] . [00]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: E [45] . [05] . [04] . [d7] . [c2] . [00]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_initialize(): failed
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.

avrdude.exe: Send: Q [51]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]

avrdude.exe done.  Thank you.



Sniffed communication.
Code: [Select]
[15/07/2021 09:20:59] - Open port COM4 (C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe)
 
[15/07/2021 09:20:59] Written data (COM4)
    30 20 
[15/07/2021 09:20:59] Read data (COM4)
    14 10 
[15/07/2021 09:21:00] Written data (COM4)
    30 20 
[15/07/2021 09:21:00] Read data (COM4)
    14 10 
[15/07/2021 09:21:00] Written data (COM4)
    30 20 
[15/07/2021 09:21:00] Read data (COM4)
    14 10 
[15/07/2021 09:21:00] Written data (COM4)
    41 80 20 
[15/07/2021 09:21:10] Written data (COM4)
    41 81 20 
[15/07/2021 09:21:10] Read data (COM4)
    14 08 10 
[15/07/2021 09:21:10] Written data (COM4)
    41 82 20 
[15/07/2021 09:21:20] Written data (COM4)
    41 98 20 
[15/07/2021 09:21:20] Read data (COM4)
    14 03 10 
[15/07/2021 09:21:21] Written data (COM4)
    41 84 20 
[15/07/2021 09:21:21] Read data (COM4)
    14 03 10 
[15/07/2021 09:21:21] Written data (COM4)
    41 85 20 
[15/07/2021 09:21:31] Written data (COM4)
    41 86 20 
[15/07/2021 09:21:31] Read data (COM4)
    14 03 10 
[15/07/2021 09:21:31] Written data (COM4)
    41 87 20 
[15/07/2021 09:21:31] Read data (COM4)
    14 03 10 
[15/07/2021 09:21:31] Written data (COM4)
    41 89 20 
[15/07/2021 09:21:41] Written data (COM4)
    41 81 20 
[15/07/2021 09:21:41] Read data (COM4)
    14 08 10 
[15/07/2021 09:21:41] Written data (COM4)
    41 82 20 
[15/07/2021 09:21:51] Written data (COM4)
    42 86 00 00 01 01 01 01 03 ff ff ff ff 00 80 04 
    00 00 00 80 00 20 
[15/07/2021 09:21:51] Read data (COM4)
    14 10 
[15/07/2021 09:21:51] Written data (COM4)
    45 05 04 d7 c2 00 20 
[15/07/2021 09:22:01] Written data (COM4)
    51 20 
[15/07/2021 09:22:01] Read data (COM4)
    14 10 
[15/07/2021 09:22:01] - Close port COM4



When flashing with STK500v1 command
Code: [Select]
/AVR_DUDE/avrdude.exe -C /AVR_DUDE/avrdude.conf -U flash:w:TEST_328p.hex -vvvv -p atmega328p -c stk500v1 -P COM4 -b 115200


AVR-DUDE output:
Code: [Select]
avrdude.exe: Version 6.3-20190619
             Copyright (c) 2000-2005 Brian Dean, [url]http://www.bdmicro.com/[/url]
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "/AVR_DUDE/avrdude.conf"

             Using Port                    : COM4
             Using Programmer              : stk500v1
             Overriding Baud Rate          : 115200
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]
             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
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

             Programmer Type : STK500
             Description     : Atmel STK500 Version 1.x firmware
avrdude.exe: Send: A [41] . [80]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: A [41] . [81]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [08]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [82]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: A [41] . [98]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [03]
avrdude.exe: Recv: . [10]
             Hardware Version: 4744608
             Firmware Version: 8.4611299
avrdude.exe: Send: A [41] . [84]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: A [41] . [85]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [03]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [86]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: A [41] . [87]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [03]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [89]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
             Vtarget         : 420030.5 V
             Varef           : 0.3 V
             Oscillator      : 921.600 kHz
             SCK period      : 44930321.2 us

avrdude.exe: Send: A [41] . [81]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [08]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [82]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: Send: B [42] . [86] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] . [80] . [04] . [00] . [00] . [00] . [80] . [00]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: E [45] . [05] . [04] . [d7] . [c2] . [00]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_initialize(): failed
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.

avrdude.exe: Send: Q [51]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]

avrdude.exe done.  Thank you.


Sniffed communication.
Code: [Select]
[15/07/2021 14:05:10] - Open port COM4 (C:\AVR_DUDE\avrdude.exe)
 
[15/07/2021 14:05:10] Written data (COM4)
    30 20 
[15/07/2021 14:05:10] Read data (COM4)
    14 10 
[15/07/2021 14:05:11] Written data (COM4)
    30 20 
[15/07/2021 14:05:11] Read data (COM4)
    14 10 
[15/07/2021 14:05:11] Written data (COM4)
    30 20 
[15/07/2021 14:05:11] Read data (COM4)
    14 10 
[15/07/2021 14:05:11] Written data (COM4)
    41 80 20 
[15/07/2021 14:05:21] Written data (COM4)
    41 81 20 
[15/07/2021 14:05:21] Read data (COM4)
    14 08 10 
[15/07/2021 14:05:21] Written data (COM4)
    41 82 20 
[15/07/2021 14:05:31] Written data (COM4)
    41 98 20 
[15/07/2021 14:05:31] Read data (COM4)
    14 03 10 
[15/07/2021 14:05:31] Written data (COM4)
    41 84 20 
[15/07/2021 14:05:41] Written data (COM4)
    41 85 20 
[15/07/2021 14:05:41] Read data (COM4)
    14 03 10 
[15/07/2021 14:05:41] Written data (COM4)
    41 86 20 
[15/07/2021 14:05:51] Written data (COM4)
    41 87 20 
[15/07/2021 14:05:51] Read data (COM4)
    14 03 10 
[15/07/2021 14:05:51] Written data (COM4)
    41 89 20 
[15/07/2021 14:06:01] Written data (COM4)
    41 81 20 
[15/07/2021 14:06:01] Read data (COM4)
    14 08 10 
[15/07/2021 14:06:01] Written data (COM4)
    41 82 20 
[15/07/2021 14:06:11] Written data (COM4)
    42 86 00 00 01 01 01 01 03 ff ff ff ff 00 80 04 
    00 00 00 80 00 20 
[15/07/2021 14:06:11] Read data (COM4)
    14 10 
[15/07/2021 14:06:11] Written data (COM4)
    45 05 04 d7 c2 00 20 
[15/07/2021 14:06:21] Written data (COM4)
    51 20 
[15/07/2021 14:06:21] Read data (COM4)
    14 10 
[15/07/2021 14:06:21] - Close port COM4

« Last Edit: July 15, 2021, 01:12:27 pm by Sudo_apt-get_install_yum »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf