[patch #9127] Support for CH341A programmer.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[patch #9127] Support for CH341A programmer.

Joerg Wunsch-6
URL:
  <http://savannah.nongnu.org/patch/?9127>

                 Summary: Support for CH341A programmer.
                 Project: AVR Downloader/UploaDEr
            Submitted by: alx2000y
            Submitted on: Fri 30 Sep 2016 08:03:34 PM MSK
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

CH341A or CH341H SPI Flash/EEPROM programmer.
This code was successfully tested on Windows with libusb driver.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 30 Sep 2016 08:03:34 PM MSK  Name: 0001-CH341A-Programmer.patch
Size: 18kB   By: alx2000y

<http://savannah.nongnu.org/patch/download.php?file_id=38632>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9127>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[patch #9127] Support for CH341A programmer.

Joerg Wunsch-6
Follow-up Comment #1, patch #9127 (project avrdude):

Compiled at Raspbian-Jessie some warnings
[code]
gcc -DHAVE_CONFIG_H -I.  -DCONFIG_DIR=\"/usr/local/etc\"  -Wall
-Wno-pointer-sign -g -O2 -MT libavrdude_a-ch341a.o -MD -MP -MF
.deps/libavrdude_a-ch341a.Tpo -c -o libavrdude_a-ch341a.o `test -f 'ch341a.c'
|| echo './'`ch341a.c
ch341a.c: In function 'ch341a_spi_transfer':
ch341a.c:272:14: warning: unused variable 'bytestransferred'
[-Wunused-variable]
     int ret, bytestransferred;
              ^
ch341a.c:272:9: warning: unused variable 'ret' [-Wunused-variable]
     int ret, bytestransferred;
         ^
ch341a.c: In function 'ch341a_initpgm':
ch341a.c:381:25: warning: assignment from incompatible pointer type
     pgm->spi            = ch341a_spi;
                         ^
ch341a.c: At top level:
ch341a.c:269:12: warning: 'ch341a_spi_transfer' defined but not used
[-Wunused-function]
 static int ch341a_spi_transfer(PROGRAMMER * pgm, const unsigned char *cmd,
unsigned char *res) {
            ^
[/code]

Succesful maked it works with UsbAsp but not works with ch341a.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9127>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[patch #9127] Support for CH341A programmer.

Joerg Wunsch-6
Follow-up Comment #2, patch #9127 (project avrdude):

Incompatible pointer type was passed:
"...int size" instead "...unsigned int size" at
ch341a.c:113 and ch341a.c:298.
Unused-variables was commented but it not helps.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9127>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[patch #9127] Support for CH341A programmer.

Joerg Wunsch-6
Follow-up Comment #3, patch #9127 (project avrdude):

Sorry, I have tested it more and more, and it really works!
Patch needs some cleanup, but not serious.
BUT it works only with fast devices,
it needs LOW SCK option.
For example, it fail with the atmega8L default fuses (0xD9E1 internal osc)
but works fine with the same atmega8L overclocked to 12Mhz (0xC9FF external
crystal).
I learn more for fix it...

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9127>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[patch #9127] Support for CH341A programmer.

Joerg Wunsch-6
Follow-up Comment #4, patch #9127 (project avrdude):

For LOW SCK option requires bitbang. It is not done because it was not
required for me. I decided that the only FastSPI better than none.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9127>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Loading...