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.

Submitted by:  Alexey Sadkov <alx2000y>
Submitted on:  Fri 30 Sep 2016 05:03:34 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

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>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 30 Sep 2016 05:03:34 PM UTCalx2000yAttached File-=>Added 0001-CH341A-Programmer.patch, #38632

    Back to the top


    Powered by Savane 3.1-cleanup1