patchAVR Downloader/UploaDEr - Patches: patch #9127, Support for CH341A programmer.

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9127: Support for CH341A programmer.

Submitter:  Alexey Sadkov <alx2000y>
Submitted:  Fri 30 Sep 2016 05:03:34 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Jump to the original submission

Sat 25 Jun 2022 01:19:46 PM UTC, comment #7: 
Max Gorb <maxxproff>
Sun 05 Jun 2022 01:21:03 AM UTC, comment #6: 

http://forum.easyelectronics.ru/viewtopic.php?f=13&t=32626

комментарий №5:

> I can understand that you are mainly interested in fast
> programming - but if it fails to operate on AVRs the way
> they are shipped (i.e., clocked with 1 MHz), it doesn't make
> much sense to include it. You'd need something else then to
> reprogram the fuses for higher clock, but if you've got
> "something else", why not also use it for actual programming?

Max Gorb <maxxproff>
Thu 18 Jan 2018 10:32:35 PM UTC, comment #5: 

I can understand that you are mainly interested in fast
programming - but if it fails to operate on AVRs the way
they are shipped (i.e., clocked with 1 MHz), it doesn't make
much sense to include it. You'd need something else then to
reprogram the fuses for higher clock, but if you've got
"something else", why not also use it for actual programming?

Joerg Wunsch <joerg_wunsch>
Group administrator
Mon 19 Dec 2016 04:00:57 PM UTC, comment #4: 

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.

Alexey Sadkov <alx2000y>
Wed 14 Dec 2016 09:24:34 AM UTC, comment #3: 

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...

Max Gorb <maxxproff>
Sat 03 Dec 2016 05:23:21 AM UTC, comment #2: 

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.

Max Gorb <maxxproff>
Sat 03 Dec 2016 05:15:34 AM UTC, comment #1: 

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.

Max Gorb <maxxproff>
Fri 30 Sep 2016 05:03:34 PM UTC, original submission:  

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

Alexey Sadkov <alx2000y>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by maxxproff (Posted a comment)
  • -email is unavailable- added by alx2000y (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-30 alx2000y Attached File- Added 0001-CH341A-Programmer.patch, #38632

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code