Skip to content
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

Add in place programmer's flashing "best practices" and refer to ch341a rev 1.6+ #120

Open
tlaurion opened this issue Jan 30, 2023 · 5 comments

Comments

@tlaurion
Copy link
Collaborator

tlaurion commented Jan 30, 2023

There is a lot of information out there on ch341a programmer giving too much voltage (5v vs 3.3v). Users reports of having bricked their laptops (SPI chip to motherboards resistors).

One of those example is a recent exchange on slack/matrix accessible at:
https://matrix.to/#/!pAlHOfxQNPXOgFGTmo:matrix.org/$kcFoywTcHgKLIbRP3iJ1bgJ8vRUGZsZcCGvvJsCszgw?via=matrix.org&via=nitro.chat&via=talk.puri.sm

xx20/xx30 chips and motherboard resistors are really resilient and cheap ch341a providing 5v never caused any issue, but this may vary for other SPI chips/motherboard when doing in place programming (with a PAMONA clip connected to the chip on the motherboard.)

General guidelines, depending on motherboard is:

  1. Make sure that CMOS, AC Adapter and battery is deconnected.
  2. Make sure to connect the clip on CHIP prior of powering up the programmer (I never followed that even with black programmer and bricked 2 laptops to date because I didn't respect point 1 above.
  3. Other guides suggest to modify ch341 programmer to make sure voltage provided is 3.3v (https://www.chucknemeth.com/laptop/lenovo-x230/flash-lenovo-x230-coreboot being one of them)
  4. Other guides suggest unsoldering/resoldering the SPI for extra caution (never did that)
  5. More expensive programmer (LC Technologies ch341a programmers) were suggested (good general advice)

I would invite people into discussing facts here to be used to create additional flashing best practice page to the wiki.

@tlaurion
Copy link
Collaborator Author

The general guideline is to make sure that the wiring is conform to chip SPI datasheet (this is a standard generally used by a chip family. Here for xx20/xx30 and SOIC8 chips), making sure that orientation of the chip is good is mandatory. On SPI chips, there is a "dot" which inform the eye that that pin is pin 1:

1- CS / CS#
2- SO1-SIO1 / MISO
3- WP# / N/C
4- GND
5- SI-SIO0 / MOSI
6- SCLK / CLK
7- HOLD# / N/C
8- VCC

For example, those two guides inversed the picture with similar pin names:

@tlaurion tlaurion changed the title Add flashing "best practices" Add in place programmer's flashing "best practices" Jan 30, 2023
@tlaurion
Copy link
Collaborator Author

tlaurion commented Sep 29, 2023

All of this should just replace ch341a by ch341a rev 1.6+ based boards which has output voltage selector (5v, 3.3v, 2.5v, 1.8v).

The ch341a v1.6/v1.7 is easily distinguishable from past versions by the voltage switch and additional components put on board, green color of board and smaller size compared to black one:
signal-2024-01-15-102301
Green arrow shows easily distinguishable component not present on 1.1/1.2... 1.5 boards revisions.

One can see the differences between old (black, non versioned ch341a) and green clearly stating v1.7:
signal-2024-01-15-104825

When flipping v 1.6+ board upside down, one can see on the board the voltage selection switch slots:
signal-2024-01-15-102253

Example of readily available kits including proper pictures for visual identification of 1.6 board containing a voltage selector and the same components being easily distinguishable prior of buying:

https://shop.3mdeb.com/shop/modules/ch341a-flash-bios-usb-programmer-kit-soic8-sop8/

Floahazz 1 Metal Ch341A Programmer V1.7 1.8V Level Shift W25Q64Fw W25Q128Fw Gd25Lq64 Parts https://a.co/d/5hr2I5x

@tlaurion tlaurion changed the title Add in place programmer's flashing "best practices" Add in place programmer's flashing "best practices" and refer to ch341a rev 1.6+ Sep 29, 2023
@tlaurion
Copy link
Collaborator Author

tlaurion commented Dec 18, 2023

1- CS / CS#
2- SO1-SIO1 / MISO
3- WP# / N/C
4- GND
5- SI-SIO0 / MOSI
6- SCLK / CLK
7- HOLD# / N/C
8- VCC

Attacking the w530 today. Clip that came with kit doesn't fit constrained place, needed to rewire my pamona clip with wires that came with my raspberries across the years. They are 10 colors coded, that will help me and probably others replicating.

SPI Chip Pomona Clip Adapter Board CH341A Programmer
Pin 1 (dot) Pin 1 (red dot) VCC (red) 25XX (red stripe)
Pin 2 Pin 2 GND (black) GND (black)
Pin 3 Pin 3 CS (yellow) CS (yellow)
Pin 4 Pin 4 CLK (orange) CLK (orange)
Pin 5 Pin 5 DO (blue) DO (blue)
Pin 6 Pin 6 DI (purple) DI (purple)
Pin 7 Pin 7 (brown) VCC or GND (brown) NC
Pin 8 Pin 8 (white) VCC or GND (white) NC

Then.
1- Connect sopi6/8-dip8 daughter board on ziff connector, making sure the adapter is connected into the closest holes to you when looking at the adapt from the usb connector
signal-2023-12-18-181636
signal-2023-12-18-181715
2- Then do the wiring pattern above. Looks like that when done:
signal-2023-12-18-181130
signal-2023-12-18-181429

Will definitely glue all those together with Epoxy they slide way too easily, but that works!
Got my 8mb backup from w530. Now going to make external flashing image that can be flashed only on that exposed 8mb chip which is linuxboot/heads#1189 to the flash whole maximized image internally.

@tlaurion

This comment has been minimized.

@tlaurion

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant