From 3accb6d62a067ef61ccb9835135c0962dcaa4974 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 11 Jul 2025 02:32:56 +0000 Subject: [PATCH 1/3] Initial plan From e156db7429f0575e47f4e6109a5ccb8e9073a428 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 11 Jul 2025 02:42:20 +0000 Subject: [PATCH 2/3] Add comprehensive SPI Programmer Best Practices guide and update existing flashing guides Co-authored-by: tlaurion <827570+tlaurion@users.noreply.github.com> --- .../SPI-Programmer-Best-Practices.md | 248 ++++++++++++++++++ .../Flashing-Guides/T420-maximized.md | 12 +- .../Flashing-Guides/T430-maximized.md | 16 +- .../Flashing-Guides/T480-maximized.md | 10 +- .../Flashing-Guides/index.md | 10 +- .../Flashing-Guides/x230-maximized.md | 17 +- 6 files changed, 298 insertions(+), 15 deletions(-) create mode 100644 Installing-and-Configuring/Flashing-Guides/SPI-Programmer-Best-Practices.md diff --git a/Installing-and-Configuring/Flashing-Guides/SPI-Programmer-Best-Practices.md b/Installing-and-Configuring/Flashing-Guides/SPI-Programmer-Best-Practices.md new file mode 100644 index 0000000..beafd56 --- /dev/null +++ b/Installing-and-Configuring/Flashing-Guides/SPI-Programmer-Best-Practices.md @@ -0,0 +1,248 @@ +--- +layout: default +title: SPI Programmer Best Practices +permalink: /SPI-Programmer-Best-Practices/ +nav_order: 0 +parent: Step 2 - Flashing Guides +grand_parent: Installing and configuring +--- + +# SPI Programmer Best Practices + +This guide provides essential information for safely flashing SPI chips using external programmers, with recommendations based on extensive community testing and feedback. + +## ⚠️ Critical Safety Warning + +**ALWAYS disconnect all power sources before flashing:** +- Remove battery +- Disconnect AC adapter +- Disconnect CMOS battery (recommended for extra safety) + +**Never connect or disconnect the clip while the programmer is powered on.** This can damage your motherboard or SPI chip. + +## Recommended Programmers (in order of preference) + +Based on extensive community testing and feedback, here are the recommended SPI programmers: + +### 1. **Tigard (Recommended)** +- **Cost**: $67-89 USD +- **Speed**: ~21 seconds for 8MB chip, ~42 seconds for 16MB chip +- **Voltage**: 1.8V, 3.3V, 5V, external target voltage +- **Protocols**: SPI, I2C, JTAG, SWD, UART +- **Additional features**: Logic analyzer, USB debugging support +- **Reliability**: Excellent (4/4 success rate in community testing) +- **Best for**: Development, debugging, frequent flashing, new users + +**Where to buy**: [Crowd Supply](https://www.crowdsupply.com/securinghw/tigard) + +### 2. **CH341A Rev 1.6+ (Budget option with voltage selector)** +- **Cost**: $5-15 USD +- **Speed**: ~120 seconds for 8MB chip +- **Voltage**: 1.8V, 2.5V, 3.3V, 5V (selectable via switch) +- **Protocols**: SPI, I2C +- **Reliability**: Good when used correctly +- **Best for**: Occasional flashing, budget-conscious users + +**⚠️ Important**: Only use CH341A rev 1.6+ with voltage selector. Older versions output dangerous 5V. + +**Visual identification**: Look for the voltage selector switch and additional components: +![CH341A v1.6+ identification](https://github.com/linuxboot/heads-wiki/assets/827570/1b2621f6-978e-4b75-9c32-30647f741b09) + +**Where to buy**: +- [3mdeb Kit](https://shop.3mdeb.com/shop/modules/ch341a-flash-bios-usb-programmer-kit-soic8-sop8/) +- [Novacustom Kit](https://novacustom.com/product/modded-ch341a-bios-firmware-programmer-3v/) + +### 3. **Raspberry Pi Pico (DIY option)** +- **Cost**: $4-10 USD +- **Speed**: ~30 seconds for 16MB chip +- **Voltage**: 3.3V (configurable via firmware) +- **Protocols**: SPI (via serprog firmware) +- **Reliability**: High +- **Best for**: DIY enthusiasts, custom setups + +### 4. **BeagleBone Black (Advanced debugging)** +- **Cost**: $60-90 USD +- **Speed**: ~16 seconds for 16MB chip +- **Voltage**: 3.3V, some pins 1.8V +- **Additional features**: EHCI debugging, serial console +- **Best for**: Advanced debugging, development + +## Programmer Comparison Table + +| Programmer | Cost | Speed (16MB) | Voltage Selection | Protocols | Debugging Features | Reliability | +|------------|------|--------------|-------------------|-----------|-------------------|-------------| +| **Tigard** | $67-89 | ~42 seconds | 1.8V, 3.3V, 5V, external | SPI, I2C, JTAG, SWD, UART | Logic analyzer, USB debugging | Excellent | +| **CH341A rev 1.6+** | $5-15 | ~120 seconds | 1.8V, 2.5V, 3.3V, 5V | SPI, I2C | None | Good | +| **Raspberry Pi Pico** | $4-10 | ~30 seconds | 3.3V (configurable) | SPI | None | High | +| **BeagleBone Black** | $60-90 | ~16 seconds | 3.3V, 1.8V | SPI, UART | EHCI debugging | High | +| **CH341A old** | $2-10 | ~480 seconds | 5V (dangerous) | SPI, I2C | None | **Not recommended** | + +## Essential Safety Procedures + +### Before Starting +1. **Power disconnection checklist**: + - [ ] Remove laptop battery + - [ ] Disconnect AC adapter + - [ ] Disconnect CMOS battery (recommended) + - [ ] Wait 30 seconds for capacitors to discharge + +2. **Workspace preparation**: + - Use anti-static wrist strap + - Work on anti-static mat + - Ensure good lighting + - Have magnifying glass available + +### Voltage Selection Guidelines +1. **Start with 1.8V**: Most modern SPI chips prefer 1.8V +2. **Try 3.3V**: If chip detection fails at 1.8V, try 3.3V +3. **Never use 5V**: Unless specifically required by chip datasheet +4. **Test detection**: Run `flashrom -p [programmer]` to verify chip detection + +## SPI Chip Pin Mapping (SOIC8) + +``` +Chip Pin Layout (top view, dot indicates pin 1): +┌─────────────┐ +│ 1 ● 8 │ +│ 2 7 │ +│ 3 6 │ +│ 4 5 │ +└─────────────┘ + +Pin Functions: +1 - CS / CS# (Chip Select) +2 - SO / MISO (Serial Data Output) +3 - WP# / N/C (Write Protect) +4 - GND (Ground) +5 - SI / MOSI (Serial Data Input) +6 - SCLK / CLK (Clock) +7 - HOLD# / N/C (Hold) +8 - VCC (Power) +``` + +## Connection Procedures + +### Using Tigard +```bash +# Basic connection test +sudo flashrom -p ft2232_spi:type=2232H,port=B,divisor=4 + +# With chip specification +sudo flashrom -p ft2232_spi:type=2232H,port=B,divisor=4 -c "MX25L6405D" +``` + +### Using CH341A rev 1.6+ +```bash +# Basic connection test +sudo flashrom -p ch341a_spi + +# With chip specification +sudo flashrom -p ch341a_spi -c "MX25L6405D" +``` + +## Flashing Workflow + +### 1. Chip Detection and Backup +```bash +# Test connection and detect chip +sudo flashrom -p [programmer] + +# Create backup (run twice to verify) +sudo flashrom -r backup1.bin -p [programmer] -c "[chip_model]" +sudo flashrom -r backup2.bin -p [programmer] -c "[chip_model]" + +# Verify backups match +diff backup1.bin backup2.bin +``` + +### 2. Verify Backup Content +```bash +# Check backup contains data (not all 0x00 or 0xFF) +hexdump -C backup1.bin | head -20 +``` + +### 3. Flash New Firmware +```bash +# Flash with retry loop (recommended) +false; while [ $? != 0 ]; do + sudo flashrom -p [programmer] -c "[chip_model]" -w firmware.rom +done +``` + +## Troubleshooting + +### Common Issues and Solutions + +**Chip not detected**: +- Check clip connection and orientation +- Try different voltage (1.8V → 3.3V) +- Verify all power sources are disconnected +- Check clip contact pressure + +**Verification fails**: +- Increase clip pressure +- Clean chip pins with isopropyl alcohol +- Try lower clock speed (for Tigard: increase divisor) +- Check for oxidation on clip contacts + +**Partial writes**: +- Usually indicates poor connection +- Re-seat clip and try again +- Consider using probe-style adapter for better contact + +### WSON8 Package Tips +For WSON8 packages (surface mount without leads): +- Use specialized WSON8 probe with alignment guide +- Apply gentle downward pressure during operation +- Consider using flux for better electrical contact + +![WSON8 Probe](https://github.com/user-attachments/assets/ebcd780b-c7db-466a-91ea-a0d9d546b3ec) + +## Performance Optimization + +### Tigard Speed Optimization +- Use `divisor=4` for reliable operation +- Use `divisor=2` for maximum speed (may be less stable) +- Enable progress indicator: `--progress` + +### CH341A Optimization +- Ensure clean power supply +- Use shorter USB cable +- Keep programmer cool during long operations + +## Advanced Features + +### Tigard Logic Analysis +Tigard can function as a logic analyzer for debugging SPI communication issues. + +### BeagleBone Black EHCI Debugging +When configured with screwdriver firmware, BeagleBone Black can capture boot logs via EHCI debugging. + +## Recommended Kits + +### Complete Kits (Assembled and Ready) +- **Novacustom**: [Modified CH341A kit](https://novacustom.com/product/modded-ch341a-bios-firmware-programmer-3v/) +- **3mdeb**: [CH341A programmer kit](https://shop.3mdeb.com/shop/modules/ch341a-flash-bios-usb-programmer-kit-soic8-sop8/) + +### Individual Components +- **Tigard**: [Crowd Supply](https://www.crowdsupply.com/securinghw/tigard) +- **WSON8 probe**: [Amazon](https://www.amazon.ca/dp/B0DJ8XTCKD) + +## Summary + +For most users, **Tigard is the recommended choice** due to its: +- Fast operation (saves time during development) +- Multiple voltage options (safe for all chips) +- Additional debugging capabilities +- Excellent reliability record + +For budget-conscious users, **CH341A rev 1.6+ is acceptable** but: +- Verify it has voltage selector switch +- Expect longer flash times +- Limited to basic SPI operations + +**Never use old CH341A programmers** without voltage selection - they can damage your hardware. + +--- + +*This guide is based on extensive community testing and feedback. For specific platform flashing instructions, refer to the individual device guides.* \ No newline at end of file diff --git a/Installing-and-Configuring/Flashing-Guides/T420-maximized.md b/Installing-and-Configuring/Flashing-Guides/T420-maximized.md index 4f688a1..d0f0ba4 100644 --- a/Installing-and-Configuring/Flashing-Guides/T420-maximized.md +++ b/Installing-and-Configuring/Flashing-Guides/T420-maximized.md @@ -2,7 +2,7 @@ layout: default title: Lenovo T420 Maximized permalink: /T420-maximized-flashing/ -nav_order: 1 +nav_order: 4 parent: Step 2 - Flashing Guides grand_parent: Installing and configuring --- @@ -10,12 +10,20 @@ grand_parent: Installing and configuring Lenovo T420 (Maximized) === +## ⚠️ Safety First + +**Before starting, please read our [SPI Programmer Best Practices guide]({{ site.baseurl }}/SPI-Programmer-Best-Practices/) for essential safety information and programmer recommendations.** + [T420 Hardware Maintenance Manual](https://download.lenovo.com/pccbbs/mobiles_pdf/t420_and_t420i_ug_en.pdf) - The thinkpad T420 has only one SPI flash chip that hold the BIOS, ME, etc. It is located under the palm rest. Similarly to the T430, to access this chip complete disassembly is required. It is a straightforward process and takes approximately 30 minutes. For this follow the T430/x230 guide. +The thinkpad T420 has only one SPI flash chip that hold the BIOS, ME, etc. It is located under the palm rest. Similarly to the T430, to access this chip complete disassembly is required. It is a straightforward process and takes approximately 30 minutes. For this follow the T430/x230 guide. + +**Critical**: Remove the battery AND disconnect the AC adapter before starting. [Here](https://www.coreboot.org/Board:lenovo/t420) is the location of the chip. At some models the location of the dot where the red wire from programmer should go may be misleading. The dot you need is just black. ![T420 SPI flash chip]({{ site.baseurl }}/images/T420_SPI_chip.jpg) +**Note**: For safety and reliability, we recommend using [Tigard or CH341A rev 1.6+]({{ site.baseurl }}/SPI-Programmer-Best-Practices/) instead of older CH341A programmers. + You should then follow through with [configuring keys]({{ site.baseurl }}/Configuring-Keys/). diff --git a/Installing-and-Configuring/Flashing-Guides/T430-maximized.md b/Installing-and-Configuring/Flashing-Guides/T430-maximized.md index 95d2d5f..bd9786d 100644 --- a/Installing-and-Configuring/Flashing-Guides/T430-maximized.md +++ b/Installing-and-Configuring/Flashing-Guides/T430-maximized.md @@ -2,7 +2,7 @@ layout: default title: Lenovo T430 Maximized permalink: /T430-maximized-flashing/ -nav_order: 1 +nav_order: 3 parent: Step 2 - Flashing Guides grand_parent: Installing and configuring --- @@ -10,11 +10,15 @@ grand_parent: Installing and configuring Lenovo T430 (Maximized) === +## ⚠️ Safety First + +**Before starting, please read our [SPI Programmer Best Practices guide]({{ site.baseurl }}/SPI-Programmer-Best-Practices/) for essential safety information and programmer recommendations.** + [T430 Hardware Maintenance Manual](https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/t430_t430i_hmm_en_0b48304_04.pdf) -Similarly to the x230, the thinkpad T430 has two SPI flash chips that hold the BIOS, ME, etc. They are located under the palm rest. To access these chips, complete disassembly is required. It is a straightforward process and takes approximately 30 minutes. For this you will need: some screwdrivers, thermal paste (since the CPU cooler needs to be removed too), an assembled ch341a SPI programmer (e.g. [Modified ch341a SPI programmer](https://novacustom.com/product/modded-ch341a-bios-firmware-programmer-3v/) by Novacustom) and a other laptop/PC with Ubuntu installed. Other linux based OS should be fine too. +Similarly to the x230, the thinkpad T430 has two SPI flash chips that hold the BIOS, ME, etc. They are located under the palm rest. To access these chips, complete disassembly is required. It is a straightforward process and takes approximately 30 minutes. For this you will need: some screwdrivers, thermal paste (since the CPU cooler needs to be removed too), a recommended SPI programmer (see our [Best Practices guide]({{ site.baseurl }}/SPI-Programmer-Best-Practices/)), and another laptop/PC with Ubuntu installed. Other linux based OS should be fine too. -First remove the battery and the cable powering your device. +**Critical**: Remove the battery AND disconnect the AC adapter before starting. ![Keyboard tilted up]({{ site.baseurl }}/images/t430/1_1_back_view_removed_battery.jpg) @@ -62,7 +66,9 @@ Try to read the name on the top SPI flash chip. I was unable to do that. The dot ![SPI flash chips closed view]({{ site.baseurl }}/images/t430/11_spi_chips_closed_view.jpg) - Then, connect the clip and ch341a programmer to the "top" (4096 kb) SPI flash chip. In my set up, the red wire should be where the dot is. + Then, connect the clip and SPI programmer to the "top" (4096 kb) SPI flash chip. In my set up, the red wire should be where the dot is. + +**Note**: For safety and reliability, we recommend using [Tigard or CH341A rev 1.6+]({{ site.baseurl }}/SPI-Programmer-Best-Practices/) instead of older CH341A programmers. The commands below use ch341a_spi as an example, but replace with your programmer's parameters. ![Flashing 4 mb chip]({{ site.baseurl }}/images/t430/12_flash_4mb_spi_chip.jpg) @@ -105,7 +111,7 @@ sudo flashrom -p ch341a_spi -c YYY -w ~/heads/build/x86/t430-maximized/t430-maxi Try to read the name on the bottom SPI flash chip. Then, connect the clip and - ch341a programmer to the bottom SPI flash chip. + SPI programmer to the bottom SPI flash chip. ![flashing bottom 8 mb chip]({{ site.baseurl }}/images/t430/16_flash_8mb_chip.jpg) diff --git a/Installing-and-Configuring/Flashing-Guides/T480-maximized.md b/Installing-and-Configuring/Flashing-Guides/T480-maximized.md index 2eee860..0fb2d1b 100644 --- a/Installing-and-Configuring/Flashing-Guides/T480-maximized.md +++ b/Installing-and-Configuring/Flashing-Guides/T480-maximized.md @@ -2,7 +2,7 @@ layout: default title: Lenovo T480 Maximized permalink: /T480-maximized-flashing/ -nav_order: 1 +nav_order: 5 parent: Step 2 - Flashing Guides grand_parent: Installing and configuring --- @@ -10,15 +10,21 @@ grand_parent: Installing and configuring Lenovo T480 (Maximized) === +## ⚠️ Safety First + +**Before starting, please read our [SPI Programmer Best Practices guide]({{ site.baseurl }}/SPI-Programmer-Best-Practices/) for essential safety information and programmer recommendations.** + [T480 Hardware Maintenance Manual](https://download.lenovo.com/pccbbs/mobiles_pdf/t480_hmm_en.pdf) Accessing and flashing the BIOS chip on a T-series machine has never been easier. The process is straightforward and takes approximately 10 minutes. The ThinkPad T480 has two SPI flash chips important for the port. The first chip holds the BIOS, ME, etc., while the second holds the Thunderbolt firmware. To access these chips, you only need to remove the back panel, which is secured by six screws. +**Critical**: Remove the battery AND disconnect the AC adapter before starting. + For whole procedure you will need: - A Phillips screwdriver +1 (PH1), which is standard for most laptop screws. -- An assembled Raspberry Pi or CH341A SPI programmer. You should use a CH341A revision 1.6 or later (e.g., 1.6, 1.7, etc.) because these versions have a properly implemented and enforced voltage regulator, ensuring stable 3.3V operation (3.3V is important!) (e.g. [Modified CH341A SPI programmer](https://novacustom.com/product/modded-ch341a-bios-firmware-programmer-3v/) by Novacustom) or [open-source Tigard tool](https://github.com/tigard-tools/tigard). Using Raspberry Pi pico is described in the [Libreboot flash guide](https://libreboot.org/docs/install/spi.html). +- A recommended SPI programmer (see our [Best Practices guide]({{ site.baseurl }}/SPI-Programmer-Best-Practices/)) - Other laptop/PC with a Linux-based OS installed. - Optional: A plastic guitar pick or an old credit card to help detach the bottom case from the clips holding it in place. Otherwise, it can be difficult to remove, increasing the risk of breaking the tabs or the top part of the bottom case above the battery connector. diff --git a/Installing-and-Configuring/Flashing-Guides/index.md b/Installing-and-Configuring/Flashing-Guides/index.md index c1c3fb7..3cf832a 100644 --- a/Installing-and-Configuring/Flashing-Guides/index.md +++ b/Installing-and-Configuring/Flashing-Guides/index.md @@ -2,14 +2,22 @@ layout: default title: Step 2 - Flashing Guides permalink: /Flashing-guides -nav_order: 2 +nav_order: 1 parent: Installing and configuring has_children: yes --- +## ⚠️ Important: Read This First + +**Before flashing any device, please read our [SPI Programmer Best Practices guide]({{ site.baseurl }}/SPI-Programmer-Best-Practices/) for essential safety information and programmer recommendations.** + +## Platform-Specific Guides + - [The internal flashing commands for Purism devices can be found here](https://docs.puri.sm/PureBoot/Heads/User_Manual.html#flash-the-compiled-heads-rom-to-your-hardware) - External x230/t430 flashing can be found through Nitrokey, which supports x230/t430 sells, at +## Video Guides + - [Video showing how to properly connect a SOIC "Pamona" clip once motherboard SPI chips accessible](https://user-images.githubusercontent.com/827570/203147231-4791a1f1-bb9b-4373-9b4c-309bb3611c8b.mp4) - [Video showing how to automatize SPI chip detection upon correct SOIC clip connection](https://user-images.githubusercontent.com/827570/203147643-528e9828-2666-4bd6-900f-3b915a11f633.mp4) diff --git a/Installing-and-Configuring/Flashing-Guides/x230-maximized.md b/Installing-and-Configuring/Flashing-Guides/x230-maximized.md index 9d07c78..aeb3eb9 100644 --- a/Installing-and-Configuring/Flashing-Guides/x230-maximized.md +++ b/Installing-and-Configuring/Flashing-Guides/x230-maximized.md @@ -2,7 +2,7 @@ layout: default title: Lenovo X230 Maximized permalink: /x230-maximized-flashing/ -nav_order: 1 +nav_order: 2 parent: Step 2 - Flashing Guides grand_parent: Installing and configuring --- @@ -10,12 +10,16 @@ grand_parent: Installing and configuring Lenovo X230 (Maximized) (applies to all 4mb+8mb SPI chips maximized boards) === +## ⚠️ Safety First + +**Before starting, please read our [SPI Programmer Best Practices guide]({{ site.baseurl }}/SPI-Programmer-Best-Practices/) for essential safety information and programmer recommendations.** + [X230 Hardware Maintenance Manual](https://web.archive.org/web/20201112030049/https://thinkpads.com/support/hmm/hmm_pdf/x230_x230i_hmm_en_0b48666_01.pdf) [X230 Tablet Hardware Maintenance Manual](https://web.archive.org/web/20130908100917/http://download.lenovo.com/pccbbs/mobiles_pdf/0b48730.pdf) ![Underside of the x230]({{ site.baseurl }}/images/Underside_of_the_x230.jpg) -First remove the battery or cable powering your device. The Thinkpad x230 has +**Critical**: Remove the battery AND disconnect the AC adapter before starting. The Thinkpad x230 has two SPI flash chips that hold the BIOS, ME, etc. and are located under the palm rest. To access these chips, first remove the indicated screws on the back of the laptop. @@ -62,8 +66,11 @@ First [download]({{ site.baseurl }}/Downloading) / [build]({{ site.baseurl }}/x2 Try to read the name on the top SPI flash chip. Then, connect the clip and - ch341a programmer to the top SPI flash chip. Use flashrom to check the chip - that you are connected to: + SPI programmer to the top SPI flash chip. + +**Note**: For safety and reliability, we recommend using [Tigard or CH341A rev 1.6+]({{ site.baseurl }}/SPI-Programmer-Best-Practices/) instead of older CH341A programmers. The commands below use ch341a_spi as an example, but replace with your programmer's parameters. + +Use flashrom to check the chip that you are connected to: ```shell sudo flashrom -p ch341a_spi @@ -86,7 +93,7 @@ sudo flashrom -p ch341a_spi -c “YYY” -w ~/heads/build/x86/x230-maximized/x23 ``` Try to read the name on the bottom SPI flash chip. Then, connect the clip and - ch341a programmer to the bottom SPI flash chip. Use flashrom to check the chip + SPI programmer to the bottom SPI flash chip. Use flashrom to check the chip that you are connected to: ```shell From 8b2a37a2d5b2885659f43895806e931a8314c2f0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 11 Jul 2025 02:44:31 +0000 Subject: [PATCH 3/3] Add wiring color code reference and CH347 programmer information Co-authored-by: tlaurion <827570+tlaurion@users.noreply.github.com> --- .../SPI-Programmer-Best-Practices.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Installing-and-Configuring/Flashing-Guides/SPI-Programmer-Best-Practices.md b/Installing-and-Configuring/Flashing-Guides/SPI-Programmer-Best-Practices.md index beafd56..eed5129 100644 --- a/Installing-and-Configuring/Flashing-Guides/SPI-Programmer-Best-Practices.md +++ b/Installing-and-Configuring/Flashing-Guides/SPI-Programmer-Best-Practices.md @@ -67,6 +67,16 @@ Based on extensive community testing and feedback, here are the recommended SPI - **Additional features**: EHCI debugging, serial console - **Best for**: Advanced debugging, development +### 5. **CH347 (Newer alternative to CH341A)** +- **Cost**: $5-15 USD +- **Speed**: Significantly faster than CH341A +- **Voltage**: 3.3V only (5V tolerant inputs) +- **Protocols**: SPI, I2C +- **Safety**: Safer than old CH341A (no dangerous 5V output) +- **Best for**: Budget option with better performance than CH341A + +**Note**: The CH347 is a newer alternative to CH341A with proper 3.3V operation and faster speeds. However, it lacks voltage selection for 1.8V chips. + ## Programmer Comparison Table | Programmer | Cost | Speed (16MB) | Voltage Selection | Protocols | Debugging Features | Reliability | @@ -75,6 +85,7 @@ Based on extensive community testing and feedback, here are the recommended SPI | **CH341A rev 1.6+** | $5-15 | ~120 seconds | 1.8V, 2.5V, 3.3V, 5V | SPI, I2C | None | Good | | **Raspberry Pi Pico** | $4-10 | ~30 seconds | 3.3V (configurable) | SPI | None | High | | **BeagleBone Black** | $60-90 | ~16 seconds | 3.3V, 1.8V | SPI, UART | EHCI debugging | High | +| **CH347** | $5-15 | ~60 seconds | 3.3V only | SPI, I2C | None | Good | | **CH341A old** | $2-10 | ~480 seconds | 5V (dangerous) | SPI, I2C | None | **Not recommended** | ## Essential Safety Procedures @@ -120,6 +131,23 @@ Pin Functions: 8 - VCC (Power) ``` +### Wiring Color Code Reference (from community testing) + +When using custom wiring with color-coded cables, this mapping has been tested: + +| SPI Chip Pin | Pomona Clip | Function | Wire Color | CH341A/Programmer | +|:------------:|:-----------:|:--------:|:----------:|:-----------------:| +| Pin 1 (dot) | Pin 1 (red dot) | VCC | Red | 25XX (red stripe) | +| Pin 2 | Pin 2 | SO/MISO | Blue | DO (blue) | +| Pin 3 | Pin 3 | WP# | Brown | NC | +| Pin 4 | Pin 4 | GND | Black | GND (black) | +| Pin 5 | Pin 5 | SI/MOSI | Purple | DI (purple) | +| Pin 6 | Pin 6 | SCLK | Orange | CLK (orange) | +| Pin 7 | Pin 7 | HOLD# | White | NC | +| Pin 8 | Pin 8 | VCC | Red | VCC | + +**Note**: Always verify pin 1 orientation by looking for the dot or notch on the chip. The red wire should connect to pin 1. + ## Connection Procedures ### Using Tigard