Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CH341A futher improvement -- to support lower clock AVR chips #1336

Closed
mcuee opened this issue Apr 7, 2023 · 12 comments
Closed

CH341A futher improvement -- to support lower clock AVR chips #1336

mcuee opened this issue Apr 7, 2023 · 12 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mcuee
Copy link
Collaborator

mcuee commented Apr 7, 2023

#1215 has been merged which addressed major part of Issue #714.

However, #1215 only supports fast SPI mode, which means that lower clock AVR chips (including many AVR chips out of factory which will run on internal RC oscillator at around 1MHz to 1.6Mhz). It is mentioned in #714 that bitbang SPI can be used to support AVR chips with lower clock.

The other main issue with #1215 is that it only supports libusb-1.0 API. Therefore the default Windows MSVC build will not work since it uses avrdude-libusb which only supports libusb-0.1 API. This part will be tracked in a seperate issue #1339.

@mcuee mcuee added the enhancement New feature or request label Apr 7, 2023
@mcuee
Copy link
Collaborator Author

mcuee commented Apr 7, 2023

@mcuee
Copy link
Collaborator Author

mcuee commented Apr 7, 2023

Another potential improvement is to have higher ISP clock even for the fast SPI mode.

Hans mentioned in the above comment.

It is also not possible to change the ISP clock speed. We know that it can't go lower than 1.2 MHz, but I think it should be possible to increase this. AVRs running at 20 MHz support ISP clocks up to 5 MHz.

@mcuee mcuee changed the title CH341A futher improvement -- to support lower clock AVR chips CH341A futher improvement -- to support lower clock AVR chips and MSVC build Apr 7, 2023
@mcuee
Copy link
Collaborator Author

mcuee commented Apr 7, 2023

Yet another potential improvement is to add TPI support.

@mcuee
Copy link
Collaborator Author

mcuee commented Apr 7, 2023

@mariusgreuel

When you got some time, please check if you can add MSVC build to this one. Thanks.

@stefanrueger
Copy link
Collaborator

Apart from the libusb/MSVC build issue this is pretty much a new and different driver, sth like ch341_bb. Needs to be contributed by people with an insight into the chip. There are simular bitbang driver, eg, for ftdi. So maybe the community can contribute? @KaeLL?

@MCUdude
Copy link
Collaborator

MCUdude commented Apr 8, 2023

@maxxproff hosts an Avrdude with support for ch341a bit-banging:
https://github.com/maxxproff/avrdude-ch341

@stefanrueger
Copy link
Collaborator

@maxxproff hosts an Avrdude with support for ch341a bit-banging: https://github.com/maxxproff/avrdude-ch341

Great find. Making them a great candidate to submit a PR :)

@mcuee mcuee changed the title CH341A futher improvement -- to support lower clock AVR chips and MSVC build CH341A futher improvement -- to support lower clock AVR chips Apr 9, 2023
@mcuee
Copy link
Collaborator Author

mcuee commented Apr 9, 2023

I have split the enhancement into two issues. This issue will mainly deal with the SPI bitbang enhancement. The MSVC build issue will be tracked in #1339.

@mcuee
Copy link
Collaborator Author

mcuee commented Apr 9, 2023

@maxxproff hosts an Avrdude with support for ch341a bit-banging: https://github.com/maxxproff/avrdude-ch341

He mentioned that the bit-bang driver to be this one, which was mentioned earlier.
https://github.com/maxxproff/avrdude-ch341/blob/main/ch341a_bitbang.c

@stefanrueger
Copy link
Collaborator

I still think this has to be driven by the community, who use the CH341A for programming, not us as maintainers. Hence, I would argue to close this and engage with a PR if and when it comes along.

@mcuee
Copy link
Collaborator Author

mcuee commented Jun 2, 2023

@stefanrueger

The issues in github do not need to be driven by the maintainers -- the community can help to provide the PR.

Some potential contributors will first look at github to see if there are anything they can contribute. If we close issues like this, they may not know this issue at all.

@mcuee mcuee added the help wanted Extra attention is needed label Jun 2, 2023
@mcuee
Copy link
Collaborator Author

mcuee commented Jun 2, 2023

@stefanrueger

I have added a help wanted label to show that we expect the community to help for this issue.

@avrdudes avrdudes locked and limited conversation to collaborators Jun 24, 2023
@mcuee mcuee converted this issue into discussion #1441 Jun 24, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants