https://wiki.flashrom.org/api.php?action=feedcontributions&user=GNUtoo&feedformat=atomflashrom - User contributions [en]2024-03-29T05:32:22ZUser contributionsMediaWiki 1.40.0https://wiki.flashrom.org/index.php?title=User:GNUtoo&diff=2582User:GNUtoo2023-04-27T22:32:09Z<p>GNUtoo: /* Howto(Dangerous, not ready for the wiki) */ moved</p>
<hr />
<div>I've no code in flashrom yet, but I made a flashrom compatible arduino programmer and participated in testing and documentation.<br />
<br />
== Wiki contributions ==<br />
My contributions to this wiki are available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later<br />
<br />
== My interests ==<br />
* Easily available external flashers.<br />
* BIOS->Coreboot flashing on the Libreboot compatible laptops.<br />
* NIC flashing (to flash ipxe)<br />
* GPU flashing (to flash sgabios)<br />
<br />
<br />
== My hardware ==<br />
=== Mainboard based programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flash chip<br />
! Test result<br />
|-<br />
| Asrock E350M1<br />
| <br />
* A25L032<br />
|<br />
* Works from coreboot<br />
* Untested from the BIOS<br />
|-<br />
| Asus F2A85M-PRO<br />
|<br />
|<br />
|-<br />
| Asus M4A785T-M<br />
| <br />
* W25x80 (DIP8)<br />
|<br />
* Works with the BIOS<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad T400<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad T60<br />
|<br />
* MX25L1605D/MX25L1608D<br />
|<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad X200<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X200 Tablet<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X60<br />
|<br />
* SST25VF016B<br />
|<br />
* Works with coreboot.<br />
|-<br />
| Lenovo Thinkpad X60T<br />
|<br />
* MX25L1605D/MX25L1608D <br />
|<br />
* Works with coreboot<br />
|-<br />
| <s>PC Engines Alix.1c</s><br />
|<br />
|<br />
* Works with coreboot<br />
* Works with the recovery LPC dongle<br />
|-<br />
| PC Engines APU1D4<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=== External programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flashrom driver<br />
! Status<br />
|-<br />
| Arduino uno<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| Arduino duemillanove<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| Arduino Due<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| openmoko debug board<br />
| ft2232_spi:type=openmoko<br />
|<br />
* Works fine<br />
|-<br />
| 3com PCI NIC (10b7:9200)<br />
| nic3com<br />
| <br />
* Works fine<br />
|-<br />
| Sata SII PCI card<br />
| <br />
|<br />
* writing and erasing worked fine.<br />
|-<br />
| Really old PCI realtek cards<br />
|<br />
|<br />
* No parallel chip to test<br />
|-<br />
| Bug 1.x and 2.x from buglabs<br />
| linux_spi<br />
|<br />
* Backporting some mainline kernel patches is required on some very old (2.6.35) kernel for omap3.<br />
* Works fine otherwise<br />
|-<br />
| <s> An atahpt PCI card </s><br />
|<br />
|<br />
*Didn't work when adding the PCI IDS, but the atahpt is known not to work according to the mailing list.<br />
|-<br />
| <s> old AGP Nvidia card </s><br />
|<br />
|<br />
* Worked with a patch (documented below)<br />
|-<br />
| Nvidia geforce 210 PCIe 16x card<br />
|<br />
|<br />
* didn't work when adding the PIC IDs<br />
|}<br />
<br />
I've also the following hardware:<br />
* SOIC-8 and SOIC-16 clips (like the [http://www.tme.eu/en/details/pom-5250/test-clips/pomona/5250/ pomona 5250])<br />
* some chips(2MB SO8(currently soldered), 16MB SO8)<br />
<br />
== Work in progress for the wiki ==<br />
Don't try that, it's dangerous!!!!<br />
== Howto(Dangerous, not ready for the wiki) ==<br />
<br />
* [[/Howto_flash_sgabios_on_an_Nvidia_video_card | Howto flash sgabios on an Nvidia video card]]<br />
<br />
* [[/Howto_flash_ipxe_on_an_3com_network_card| Howto flash ipxe on an 3com network card]]<br />
<br />
* [[/Howto_flash_coreboot_on_a_pcengine_apu1 | Howto flash coreboot on an PC Engine APU1]]<br />
<br />
* [[/Benchmarks]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=User:GNUtoo&diff=2581User:GNUtoo2023-04-27T22:31:55Z<p>GNUtoo: /* External programmers */ name linux_spi programmers</p>
<hr />
<div>I've no code in flashrom yet, but I made a flashrom compatible arduino programmer and participated in testing and documentation.<br />
<br />
== Wiki contributions ==<br />
My contributions to this wiki are available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later<br />
<br />
== My interests ==<br />
* Easily available external flashers.<br />
* BIOS->Coreboot flashing on the Libreboot compatible laptops.<br />
* NIC flashing (to flash ipxe)<br />
* GPU flashing (to flash sgabios)<br />
<br />
<br />
== My hardware ==<br />
=== Mainboard based programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flash chip<br />
! Test result<br />
|-<br />
| Asrock E350M1<br />
| <br />
* A25L032<br />
|<br />
* Works from coreboot<br />
* Untested from the BIOS<br />
|-<br />
| Asus F2A85M-PRO<br />
|<br />
|<br />
|-<br />
| Asus M4A785T-M<br />
| <br />
* W25x80 (DIP8)<br />
|<br />
* Works with the BIOS<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad T400<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad T60<br />
|<br />
* MX25L1605D/MX25L1608D<br />
|<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad X200<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X200 Tablet<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X60<br />
|<br />
* SST25VF016B<br />
|<br />
* Works with coreboot.<br />
|-<br />
| Lenovo Thinkpad X60T<br />
|<br />
* MX25L1605D/MX25L1608D <br />
|<br />
* Works with coreboot<br />
|-<br />
| <s>PC Engines Alix.1c</s><br />
|<br />
|<br />
* Works with coreboot<br />
* Works with the recovery LPC dongle<br />
|-<br />
| PC Engines APU1D4<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=== External programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flashrom driver<br />
! Status<br />
|-<br />
| Arduino uno<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| Arduino duemillanove<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| Arduino Due<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| openmoko debug board<br />
| ft2232_spi:type=openmoko<br />
|<br />
* Works fine<br />
|-<br />
| 3com PCI NIC (10b7:9200)<br />
| nic3com<br />
| <br />
* Works fine<br />
|-<br />
| Sata SII PCI card<br />
| <br />
|<br />
* writing and erasing worked fine.<br />
|-<br />
| Really old PCI realtek cards<br />
|<br />
|<br />
* No parallel chip to test<br />
|-<br />
| Bug 1.x and 2.x from buglabs<br />
| linux_spi<br />
|<br />
* Backporting some mainline kernel patches is required on some very old (2.6.35) kernel for omap3.<br />
* Works fine otherwise<br />
|-<br />
| <s> An atahpt PCI card </s><br />
|<br />
|<br />
*Didn't work when adding the PCI IDS, but the atahpt is known not to work according to the mailing list.<br />
|-<br />
| <s> old AGP Nvidia card </s><br />
|<br />
|<br />
* Worked with a patch (documented below)<br />
|-<br />
| Nvidia geforce 210 PCIe 16x card<br />
|<br />
|<br />
* didn't work when adding the PIC IDs<br />
|}<br />
<br />
I've also the following hardware:<br />
* SOIC-8 and SOIC-16 clips (like the [http://www.tme.eu/en/details/pom-5250/test-clips/pomona/5250/ pomona 5250])<br />
* some chips(2MB SO8(currently soldered), 16MB SO8)<br />
<br />
== Work in progress for the wiki ==<br />
Don't try that, it's dangerous!!!!<br />
== Howto(Dangerous, not ready for the wiki) ==<br />
<br />
* [[/Howto_flash_sgabios_on_an_Nvidia_video_card | Howto flash sgabios on an Nvidia video card]]<br />
<br />
* [[/Howto_flash_ipxe_on_an_3com_network_card| Howto flash ipxe on an 3com network card]]<br />
<br />
* [[/Howto_flash_coreboot_on_a_pcengine_apu1 | Howto flash coreboot on an PC Engine APU1]]<br />
<br />
* [[/Benchmarks]]<br />
<br />
* [[/Arduino_flasher_3v3]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=User:GNUtoo&diff=2580User:GNUtoo2023-04-27T22:31:09Z<p>GNUtoo: /* External programmers */ Update programmers</p>
<hr />
<div>I've no code in flashrom yet, but I made a flashrom compatible arduino programmer and participated in testing and documentation.<br />
<br />
== Wiki contributions ==<br />
My contributions to this wiki are available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later<br />
<br />
== My interests ==<br />
* Easily available external flashers.<br />
* BIOS->Coreboot flashing on the Libreboot compatible laptops.<br />
* NIC flashing (to flash ipxe)<br />
* GPU flashing (to flash sgabios)<br />
<br />
<br />
== My hardware ==<br />
=== Mainboard based programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flash chip<br />
! Test result<br />
|-<br />
| Asrock E350M1<br />
| <br />
* A25L032<br />
|<br />
* Works from coreboot<br />
* Untested from the BIOS<br />
|-<br />
| Asus F2A85M-PRO<br />
|<br />
|<br />
|-<br />
| Asus M4A785T-M<br />
| <br />
* W25x80 (DIP8)<br />
|<br />
* Works with the BIOS<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad T400<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad T60<br />
|<br />
* MX25L1605D/MX25L1608D<br />
|<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad X200<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X200 Tablet<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X60<br />
|<br />
* SST25VF016B<br />
|<br />
* Works with coreboot.<br />
|-<br />
| Lenovo Thinkpad X60T<br />
|<br />
* MX25L1605D/MX25L1608D <br />
|<br />
* Works with coreboot<br />
|-<br />
| <s>PC Engines Alix.1c</s><br />
|<br />
|<br />
* Works with coreboot<br />
* Works with the recovery LPC dongle<br />
|-<br />
| PC Engines APU1D4<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=== External programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flashrom driver<br />
! Status<br />
|-<br />
| Arduino uno<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| Arduino duemillanove<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| Arduino Due<br />
| serprog<br />
|<br />
* Works fine<br />
|-<br />
| openmoko debug board<br />
| ft2232_spi:type=openmoko<br />
|<br />
* Works fine<br />
|-<br />
| 3com PCI NIC (10b7:9200)<br />
| nic3com<br />
| <br />
* Works fine<br />
|-<br />
| Sata SII PCI card<br />
| <br />
|<br />
* writing and erasing worked fine.<br />
|-<br />
| Really old PCI realtek cards<br />
|<br />
|<br />
* No parallel chip to test<br />
|-<br />
| Some GNU/Linux embedded boards<br />
| linux_spi<br />
|<br />
* Backporting some mainline kernel patches is required on some very old (2.6.35) kernel for omap3.<br />
* Works fine otherwise<br />
|-<br />
| <s> An atahpt PCI card </s><br />
|<br />
|<br />
*Didn't work when adding the PCI IDS, but the atahpt is known not to work according to the mailing list.<br />
|-<br />
| <s> old AGP Nvidia card </s><br />
|<br />
|<br />
* Worked with a patch (documented below)<br />
|-<br />
| Nvidia geforce 210 PCIe 16x card<br />
|<br />
|<br />
* didn't work when adding the PIC IDs<br />
|}<br />
<br />
I've also the following hardware:<br />
* SOIC-8 and SOIC-16 clips (like the [http://www.tme.eu/en/details/pom-5250/test-clips/pomona/5250/ pomona 5250])<br />
* some chips(2MB SO8(currently soldered), 16MB SO8)<br />
<br />
== Work in progress for the wiki ==<br />
Don't try that, it's dangerous!!!!<br />
== Howto(Dangerous, not ready for the wiki) ==<br />
<br />
* [[/Howto_flash_sgabios_on_an_Nvidia_video_card | Howto flash sgabios on an Nvidia video card]]<br />
<br />
* [[/Howto_flash_ipxe_on_an_3com_network_card| Howto flash ipxe on an 3com network card]]<br />
<br />
* [[/Howto_flash_coreboot_on_a_pcengine_apu1 | Howto flash coreboot on an PC Engine APU1]]<br />
<br />
* [[/Benchmarks]]<br />
<br />
* [[/Arduino_flasher_3v3]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=User:GNUtoo&diff=2579User:GNUtoo2023-04-27T22:29:15Z<p>GNUtoo: /* External programmers */ due is supported by frser-duino</p>
<hr />
<div>I've no code in flashrom yet, but I made a flashrom compatible arduino programmer and participated in testing and documentation.<br />
<br />
== Wiki contributions ==<br />
My contributions to this wiki are available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later<br />
<br />
== My interests ==<br />
* Easily available external flashers.<br />
* BIOS->Coreboot flashing on the Libreboot compatible laptops.<br />
* NIC flashing (to flash ipxe)<br />
* GPU flashing (to flash sgabios)<br />
<br />
<br />
== My hardware ==<br />
=== Mainboard based programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flash chip<br />
! Test result<br />
|-<br />
| Asrock E350M1<br />
| <br />
* A25L032<br />
|<br />
* Works from coreboot<br />
* Untested from the BIOS<br />
|-<br />
| Asus F2A85M-PRO<br />
|<br />
|<br />
|-<br />
| Asus M4A785T-M<br />
| <br />
* W25x80 (DIP8)<br />
|<br />
* Works with the BIOS<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad T400<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad T60<br />
|<br />
* MX25L1605D/MX25L1608D<br />
|<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad X200<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X200 Tablet<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X60<br />
|<br />
* SST25VF016B<br />
|<br />
* Works with coreboot.<br />
|-<br />
| Lenovo Thinkpad X60T<br />
|<br />
* MX25L1605D/MX25L1608D <br />
|<br />
* Works with coreboot<br />
|-<br />
| <s>PC Engines Alix.1c</s><br />
|<br />
|<br />
* Works with coreboot<br />
* Works with the recovery LPC dongle<br />
|-<br />
| PC Engines APU1D4<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=== External programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Status<br />
|-<br />
| Arduino uno (serprog)<br />
|<br />
* Requires a 5v->3.3v level shifter for most current flash chips.<br />
* Issues with the 8u2/8u3 when using the serial port at high speed.<br />
|-<br />
| Arduino duemillanove (serprog)<br />
|<br />
* Requires a 5v->3.3v level shifter for most current flash chips.<br />
* Works fine otherwise.<br />
|-<br />
| Arduino Due ( serprog )<br />
|<br />
* 3.3v level output on SPI.<br />
* Not working: No support for it yet.<br />
|-<br />
| openmoko debug board (ft2232_spi:type=openmoko)<br />
|<br />
* Works fine<br />
|-<br />
| 3com PCI NIC (10b7:9200) (nic3com)<br />
| <br />
* Works fine<br />
|-<br />
| Sata SII PCI card<br />
|<br />
* writing and erasing worked fine.<br />
|-<br />
| Really old PCI realtek cards<br />
|<br />
* No parallel chip to test<br />
|-<br />
| Some GNU/Linux embedded boards (linux_spi)<br />
|<br />
* Backporting some mainline kernel patches is required on some very old (2.6.35) kernel for omap3.<br />
* Works fine otherwise<br />
|-<br />
| <s> An atahpt PCI card </s><br />
|<br />
*Didn't work when adding the PCI IDS, but the atahpt is known not to work according to the mailing list.<br />
|-<br />
| <s> old AGP Nvidia card </s><br />
|<br />
* Worked with a patch (documented below)<br />
|-<br />
| Nvidia geforce 210 PCIe 16x card<br />
|<br />
* didn't work when adding the PIC IDs<br />
|}<br />
<br />
I've also the following hardware:<br />
* SOIC-8 and SOIC-16 clips (like the [http://www.tme.eu/en/details/pom-5250/test-clips/pomona/5250/ pomona 5250])<br />
* some chips(2MB SO8(currently soldered), 16MB SO8)<br />
<br />
== Work in progress for the wiki ==<br />
Don't try that, it's dangerous!!!!<br />
== Howto(Dangerous, not ready for the wiki) ==<br />
<br />
* [[/Howto_flash_sgabios_on_an_Nvidia_video_card | Howto flash sgabios on an Nvidia video card]]<br />
<br />
* [[/Howto_flash_ipxe_on_an_3com_network_card| Howto flash ipxe on an 3com network card]]<br />
<br />
* [[/Howto_flash_coreboot_on_a_pcengine_apu1 | Howto flash coreboot on an PC Engine APU1]]<br />
<br />
* [[/Benchmarks]]<br />
<br />
* [[/Arduino_flasher_3v3]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=User:GNUtoo&diff=2578User:GNUtoo2023-04-27T22:28:51Z<p>GNUtoo: /* External programmers */ update clips</p>
<hr />
<div>I've no code in flashrom yet, but I made a flashrom compatible arduino programmer and participated in testing and documentation.<br />
<br />
== Wiki contributions ==<br />
My contributions to this wiki are available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later<br />
<br />
== My interests ==<br />
* Easily available external flashers.<br />
* BIOS->Coreboot flashing on the Libreboot compatible laptops.<br />
* NIC flashing (to flash ipxe)<br />
* GPU flashing (to flash sgabios)<br />
<br />
<br />
== My hardware ==<br />
=== Mainboard based programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flash chip<br />
! Test result<br />
|-<br />
| Asrock E350M1<br />
| <br />
* A25L032<br />
|<br />
* Works from coreboot<br />
* Untested from the BIOS<br />
|-<br />
| Asus F2A85M-PRO<br />
|<br />
|<br />
|-<br />
| Asus M4A785T-M<br />
| <br />
* W25x80 (DIP8)<br />
|<br />
* Works with the BIOS<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad T400<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad T60<br />
|<br />
* MX25L1605D/MX25L1608D<br />
|<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad X200<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X200 Tablet<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X60<br />
|<br />
* SST25VF016B<br />
|<br />
* Works with coreboot.<br />
|-<br />
| Lenovo Thinkpad X60T<br />
|<br />
* MX25L1605D/MX25L1608D <br />
|<br />
* Works with coreboot<br />
|-<br />
| <s>PC Engines Alix.1c</s><br />
|<br />
|<br />
* Works with coreboot<br />
* Works with the recovery LPC dongle<br />
|-<br />
| PC Engines APU1D4<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=== External programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Status<br />
|-<br />
| Arduino uno (serprog)<br />
|<br />
* Requires a 5v->3.3v level shifter for most current flash chips.<br />
* Issues with the 8u2/8u3 when using the serial port at high speed.<br />
|-<br />
| Arduino duemillanove (serprog)<br />
|<br />
* Requires a 5v->3.3v level shifter for most current flash chips.<br />
* Works fine otherwise.<br />
|-<br />
| Arduino Due ( no support for it yet )<br />
|<br />
* 3.3v level output on SPI.<br />
* Not working: No support for it yet.<br />
|-<br />
| openmoko debug board (ft2232_spi:type=openmoko)<br />
|<br />
* Works fine<br />
|-<br />
| 3com PCI NIC (10b7:9200) (nic3com)<br />
| <br />
* Works fine<br />
|-<br />
| Sata SII PCI card<br />
|<br />
* writing and erasing worked fine.<br />
|-<br />
| Really old PCI realtek cards<br />
|<br />
* No parallel chip to test<br />
|-<br />
| Some GNU/Linux embedded boards (linux_spi)<br />
|<br />
* Backporting some mainline kernel patches is required on some very old (2.6.35) kernel for omap3.<br />
* Works fine otherwise<br />
|-<br />
| <s> An atahpt PCI card </s><br />
|<br />
*Didn't work when adding the PCI IDS, but the atahpt is known not to work according to the mailing list.<br />
|-<br />
| <s> old AGP Nvidia card </s><br />
|<br />
* Worked with a patch (documented below)<br />
|-<br />
| Nvidia geforce 210 PCIe 16x card<br />
|<br />
* didn't work when adding the PIC IDs<br />
|}<br />
<br />
I've also the following hardware:<br />
* SOIC-8 and SOIC-16 clips (like the [http://www.tme.eu/en/details/pom-5250/test-clips/pomona/5250/ pomona 5250])<br />
* some chips(2MB SO8(currently soldered), 16MB SO8)<br />
<br />
== Work in progress for the wiki ==<br />
Don't try that, it's dangerous!!!!<br />
== Howto(Dangerous, not ready for the wiki) ==<br />
<br />
* [[/Howto_flash_sgabios_on_an_Nvidia_video_card | Howto flash sgabios on an Nvidia video card]]<br />
<br />
* [[/Howto_flash_ipxe_on_an_3com_network_card| Howto flash ipxe on an 3com network card]]<br />
<br />
* [[/Howto_flash_coreboot_on_a_pcengine_apu1 | Howto flash coreboot on an PC Engine APU1]]<br />
<br />
* [[/Benchmarks]]<br />
<br />
* [[/Arduino_flasher_3v3]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=User:GNUtoo&diff=2577User:GNUtoo2023-04-27T22:27:38Z<p>GNUtoo: /* Mainboard based programmers */ given back</p>
<hr />
<div>I've no code in flashrom yet, but I made a flashrom compatible arduino programmer and participated in testing and documentation.<br />
<br />
== Wiki contributions ==<br />
My contributions to this wiki are available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later<br />
<br />
== My interests ==<br />
* Easily available external flashers.<br />
* BIOS->Coreboot flashing on the Libreboot compatible laptops.<br />
* NIC flashing (to flash ipxe)<br />
* GPU flashing (to flash sgabios)<br />
<br />
<br />
== My hardware ==<br />
=== Mainboard based programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flash chip<br />
! Test result<br />
|-<br />
| Asrock E350M1<br />
| <br />
* A25L032<br />
|<br />
* Works from coreboot<br />
* Untested from the BIOS<br />
|-<br />
| Asus F2A85M-PRO<br />
|<br />
|<br />
|-<br />
| Asus M4A785T-M<br />
| <br />
* W25x80 (DIP8)<br />
|<br />
* Works with the BIOS<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad T400<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad T60<br />
|<br />
* MX25L1605D/MX25L1608D<br />
|<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad X200<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X200 Tablet<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X60<br />
|<br />
* SST25VF016B<br />
|<br />
* Works with coreboot.<br />
|-<br />
| Lenovo Thinkpad X60T<br />
|<br />
* MX25L1605D/MX25L1608D <br />
|<br />
* Works with coreboot<br />
|-<br />
| <s>PC Engines Alix.1c</s><br />
|<br />
|<br />
* Works with coreboot<br />
* Works with the recovery LPC dongle<br />
|-<br />
| PC Engines APU1D4<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=== External programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Status<br />
|-<br />
| Arduino uno (serprog)<br />
|<br />
* Requires a 5v->3.3v level shifter for most current flash chips.<br />
* Issues with the 8u2/8u3 when using the serial port at high speed.<br />
|-<br />
| Arduino duemillanove (serprog)<br />
|<br />
* Requires a 5v->3.3v level shifter for most current flash chips.<br />
* Works fine otherwise.<br />
|-<br />
| Arduino Due ( no support for it yet )<br />
|<br />
* 3.3v level output on SPI.<br />
* Not working: No support for it yet.<br />
|-<br />
| openmoko debug board (ft2232_spi:type=openmoko)<br />
|<br />
* Works fine<br />
|-<br />
| 3com PCI NIC (10b7:9200) (nic3com)<br />
| <br />
* Works fine<br />
|-<br />
| Sata SII PCI card<br />
|<br />
* writing and erasing worked fine.<br />
|-<br />
| Really old PCI realtek cards<br />
|<br />
* No parallel chip to test<br />
|-<br />
| Some GNU/Linux embedded boards (linux_spi)<br />
|<br />
* Backporting some mainline kernel patches is required on some very old (2.6.35) kernel for omap3.<br />
* Works fine otherwise<br />
|-<br />
| <s> An atahpt PCI card </s><br />
|<br />
*Didn't work when adding the PCI IDS, but the atahpt is known not to work according to the mailing list.<br />
|-<br />
| <s> old AGP Nvidia card </s><br />
|<br />
* Worked with a patch (documented below)<br />
|-<br />
| Nvidia geforce 210 PCIe 16x card<br />
|<br />
* didn't work when adding the PIC IDs<br />
|}<br />
<br />
I've also the following hardware:<br />
* [http://www.tme.eu/en/details/pom-5250/test-clips/pomona/5250/ pomona clip] for recovering my x60<br />
* some chips(2MB SO8(currently soldered), 16MB SO8)<br />
<br />
== Work in progress for the wiki ==<br />
Don't try that, it's dangerous!!!!<br />
== Howto(Dangerous, not ready for the wiki) ==<br />
<br />
* [[/Howto_flash_sgabios_on_an_Nvidia_video_card | Howto flash sgabios on an Nvidia video card]]<br />
<br />
* [[/Howto_flash_ipxe_on_an_3com_network_card| Howto flash ipxe on an 3com network card]]<br />
<br />
* [[/Howto_flash_coreboot_on_a_pcengine_apu1 | Howto flash coreboot on an PC Engine APU1]]<br />
<br />
* [[/Benchmarks]]<br />
<br />
* [[/Arduino_flasher_3v3]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2576Arduino flasher 3.3v2023-04-27T22:26:33Z<p>GNUtoo: /* Theory */ fix broken link with archive.org</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [https://web.archive.org/web/20181004225154/ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
| 16<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
| 8<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| 15<br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
| 7<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
| 10<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
| 2<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
| 9<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
| 1<br />
|-<br />
|}<br />
<br />
Then connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
==== Flashing ====<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. Thanks also for telling me about the Macronix issues on the Thinkpad X200. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=User:GNUtoo&diff=2350User:GNUtoo2018-05-10T07:01:56Z<p>GNUtoo: /* Howto(Dangerous, not ready for the wiki) */</p>
<hr />
<div>I've no code in flashrom yet, but I made a flashrom compatible arduino programmer and participated in testing and documentation.<br />
<br />
== Wiki contributions ==<br />
My contributions to this wiki are available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later<br />
<br />
== My interests ==<br />
* Easily available external flashers.<br />
* BIOS->Coreboot flashing on the Libreboot compatible laptops.<br />
* NIC flashing (to flash ipxe)<br />
* GPU flashing (to flash sgabios)<br />
<br />
<br />
== My hardware ==<br />
=== Mainboard based programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Flash chip<br />
! Test result<br />
|-<br />
| Asrock E350M1<br />
| <br />
* A25L032<br />
|<br />
* Works from coreboot<br />
* Untested from the BIOS<br />
|-<br />
| Asus F2A85M-PRO<br />
|<br />
|<br />
|-<br />
| Asus M4A785T-M<br />
| <br />
* W25x80 (DIP8)<br />
|<br />
* Works with the BIOS<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad T400<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad T60<br />
|<br />
* MX25L1605D/MX25L1608D<br />
|<br />
* Works with coreboot<br />
|-<br />
| Lenovo Thinkpad X200<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X200 Tablet<br />
|<br />
|<br />
|-<br />
| Lenovo Thinkpad X60<br />
|<br />
* SST25VF016B<br />
|<br />
* Works with coreboot.<br />
|-<br />
| Lenovo Thinkpad X60T<br />
|<br />
* MX25L1605D/MX25L1608D <br />
|<br />
* Works with coreboot<br />
|-<br />
| PC Engines Alix.1c<br />
|<br />
|<br />
* Works with coreboot<br />
* Works with the recovery LPC dongle<br />
|-<br />
| PC Engines APU1D4<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=== External programmers ===<br />
{| class="wikitable" border="1"<br />
! Device or programmer<br />
! Status<br />
|-<br />
| Arduino uno (serprog)<br />
|<br />
* Requires a 5v->3.3v level shifter for most current flash chips.<br />
* Issues with the 8u2/8u3 when using the serial port at high speed.<br />
|-<br />
| Arduino duemillanove (serprog)<br />
|<br />
* Requires a 5v->3.3v level shifter for most current flash chips.<br />
* Works fine otherwise.<br />
|-<br />
| Arduino Due ( no support for it yet )<br />
|<br />
* 3.3v level output on SPI.<br />
* Not working: No support for it yet.<br />
|-<br />
| openmoko debug board (ft2232_spi:type=openmoko)<br />
|<br />
* Works fine<br />
|-<br />
| 3com PCI NIC (10b7:9200) (nic3com)<br />
| <br />
* Works fine<br />
|-<br />
| Sata SII PCI card<br />
|<br />
* writing and erasing worked fine.<br />
|-<br />
| Really old PCI realtek cards<br />
|<br />
* No parallel chip to test<br />
|-<br />
| Some GNU/Linux embedded boards (linux_spi)<br />
|<br />
* Backporting some mainline kernel patches is required on some very old (2.6.35) kernel for omap3.<br />
* Works fine otherwise<br />
|-<br />
| <s> An atahpt PCI card </s><br />
|<br />
*Didn't work when adding the PCI IDS, but the atahpt is known not to work according to the mailing list.<br />
|-<br />
| <s> old AGP Nvidia card </s><br />
|<br />
* Worked with a patch (documented below)<br />
|-<br />
| Nvidia geforce 210 PCIe 16x card<br />
|<br />
* didn't work when adding the PIC IDs<br />
|}<br />
<br />
I've also the following hardware:<br />
* [http://www.tme.eu/en/details/pom-5250/test-clips/pomona/5250/ pomona clip] for recovering my x60<br />
* some chips(2MB SO8(currently soldered), 16MB SO8)<br />
<br />
== Work in progress for the wiki ==<br />
Don't try that, it's dangerous!!!!<br />
== Howto(Dangerous, not ready for the wiki) ==<br />
<br />
* [[/Howto_flash_sgabios_on_an_Nvidia_video_card | Howto flash sgabios on an Nvidia video card]]<br />
<br />
* [[/Howto_flash_ipxe_on_an_3com_network_card| Howto flash ipxe on an 3com network card]]<br />
<br />
* [[/Howto_flash_coreboot_on_a_pcengine_apu1 | Howto flash coreboot on an PC Engine APU1]]<br />
<br />
* [[/Benchmarks]]<br />
<br />
* [[/Arduino_flasher_3v3]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2346Serprog2018-02-27T15:22:47Z<p>GNUtoo: /* Frser-duino */ fix typo</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
=== Frser-duino ===<br />
This project contains [https://github.com/urjaman/frser-duino/ source code] to install on Arduino devices.<br />
<br />
That person also have various ports [https://github.com/urjaman?tab=repositories on github] for several microcontroller boards, such as:<br />
* [https://github.com/urjaman/frser-teensyflash frser-teensyflash]: A port for the teensy microcontroller board<br />
<br />
There also vaious other interesting projects such as:<br />
* [https://github.com/urjaman/fast-usbserial fast-usbserial]: A software to make arduino with 8u2 or 16u2 flashing faster and more reliable]<br />
* [[Serprog/Arduino_flasher#Alternative:_Shield_with_SPI_and_LPC.2FFWH_for_5V_Arduinos|An Arduino shield for flashing]]<br />
<br />
=== Using a 5v Arduino at 3.3V ===<br />
Information on it can be found in the [[Arduino_flasher_3.3v]] page<br />
<br />
=== 5V arduino with level shifter ===<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
=== Arduino Mega flasher by fritz ===<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
<br />
Some information is lacking on this flasher, such as the software used in it. Feel free to add information on it if you find some.<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2345Serprog2018-02-27T15:22:21Z<p>GNUtoo: /* Frser-duino */</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
=== Frser-duino ===<br />
This project contains [https://github.com/urjaman/frser-duino/ source code] to install on Arduino devices.<br />
<br />
That person also have various ports [https://github.com/urjaman?tab=repositories on github] for several microcontroller boards, such as:<br />
* [https://github.com/urjaman/frser-teensyflash frser-teensyflash]: A port for the teensy microcontroller board<br />
<br />
There also vaious other interesting projects such as:<br />
* [https://github.com/urjaman/fast-usbserial fast-usbserial]: A software to make arduino with 8u2 or 16u2 flashing faster and more reliable]<br />
* [[Alternative:_Shield_with_SPI_and_LPC.2FFWH_for_5V_Arduinos|An Arduino shield for flashing]]<br />
<br />
=== Using a 5v Arduino at 3.3V ===<br />
Information on it can be found in the [[Arduino_flasher_3.3v]] page<br />
<br />
=== 5V arduino with level shifter ===<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
=== Arduino Mega flasher by fritz ===<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
<br />
Some information is lacking on this flasher, such as the software used in it. Feel free to add information on it if you find some.<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2344Serprog2018-02-27T15:22:06Z<p>GNUtoo: /* Frser-duino */</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
=== Frser-duino ===<br />
This project contains [https://github.com/urjaman/frser-duino/ source code] to install on Arduino devices.<br />
<br />
That person also have various ports [https://github.com/urjaman?tab=repositories on github] for several microcontroller boards, such as:<br />
* [https://github.com/urjaman/frser-teensyflash frser-teensyflash]: A port for the teensy microcontroller board<br />
<br />
There also vaious other interesting projects such as:<br />
* [https://github.com/urjaman/fast-usbserial fast-usbserial]: A software to make arduino with 8u2 or 16u2 flashing faster and more reliable]<br />
* [[Alternative:_Shield_with_SPI_and_LPC.2FFWH_for_5V_Arduinos An Arduino shield for flashing]]<br />
<br />
=== Using a 5v Arduino at 3.3V ===<br />
Information on it can be found in the [[Arduino_flasher_3.3v]] page<br />
<br />
=== 5V arduino with level shifter ===<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
=== Arduino Mega flasher by fritz ===<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
<br />
Some information is lacking on this flasher, such as the software used in it. Feel free to add information on it if you find some.<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2343Serprog2018-02-27T15:20:36Z<p>GNUtoo: /* Various Arduino based flashers */ Sort by importance</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
=== Frser-duino ===<br />
This project contains [https://github.com/urjaman/frser-duino/ source code] to install on Arduino devices.<br />
<br />
That person also have various ports [https://github.com/urjaman?tab=repositories on github] for several microcontroller boards, such as:<br />
* [https://github.com/urjaman/frser-teensyflash frser-teensyflash]: A port for the teensy microcontroller board<br />
<br />
There also vaious other interesting projects such as:<br />
* [https://github.com/urjaman/fast-usbserial fast-usbserial]: A software to make arduino with 8u2 or 16u2 flashing faster and more reliable]<br />
<br />
=== Using a 5v Arduino at 3.3V ===<br />
Information on it can be found in the [[Arduino_flasher_3.3v]] page<br />
<br />
=== 5V arduino with level shifter ===<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
=== Arduino Mega flasher by fritz ===<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
<br />
Some information is lacking on this flasher, such as the software used in it. Feel free to add information on it if you find some.<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2342Serprog2018-02-27T15:19:53Z<p>GNUtoo: /* Frser-duino */</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
=== Arduino Mega flasher by fritz ===<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
<br />
Some information is lacking on this flasher, such as the software used in it. Feel free to add information on it if you find some.<br />
<br />
=== 5V arduino with level shifter ===<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
=== Frser-duino ===<br />
This project contains [https://github.com/urjaman/frser-duino/ source code] to install on Arduino devices.<br />
<br />
That person also have various ports [https://github.com/urjaman?tab=repositories on github] for several microcontroller boards, such as:<br />
* [https://github.com/urjaman/frser-teensyflash frser-teensyflash]: A port for the teensy microcontroller board<br />
<br />
There also vaious other interesting projects such as:<br />
* [https://github.com/urjaman/fast-usbserial fast-usbserial]: A software to make arduino with 8u2 or 16u2 flashing faster and more reliable]<br />
<br />
=== Using a 5v Arduino at 3.3V ===<br />
Information on it can be found in the [[Arduino_flasher_3.3v]] page<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2341Serprog2018-02-27T15:16:15Z<p>GNUtoo: /* Frser-duino */</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
=== Arduino Mega flasher by fritz ===<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
<br />
Some information is lacking on this flasher, such as the software used in it. Feel free to add information on it if you find some.<br />
<br />
=== 5V arduino with level shifter ===<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
=== Frser-duino ===<br />
This project contains [https://github.com/urjaman/frser-duino/ source code] to install on Arduino devices.<br />
<br />
That person also have other interesting related projects [https://github.com/urjaman?tab=repositories on github], such as:<br />
* [https://github.com/urjaman/frser-teensyflash The code ported] to the teensy microcontroller board, and various ports in separate repositories.<br />
<br />
=== Using a 5v Arduino at 3.3V ===<br />
Information on it can be found in the [[Arduino_flasher_3.3v]] page<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2340Serprog2018-02-27T15:09:22Z<p>GNUtoo: /* Using a 5v Arduino at 3.3V */</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
=== Arduino Mega flasher by fritz ===<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
<br />
Some information is lacking on this flasher, such as the software used in it. Feel free to add information on it if you find some.<br />
<br />
=== 5V arduino with level shifter ===<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
=== Frser-duino ===<br />
The source can be found [https://github.com/urjaman/frser-duino/ here]<br />
<br />
=== Using a 5v Arduino at 3.3V ===<br />
Information on it can be found in the [[Arduino_flasher_3.3v]] page<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=User:Arduino_flasher_3.3v&diff=2339User:Arduino flasher 3.3v2018-02-27T15:08:45Z<p>GNUtoo: GNUtoo moved page User:Arduino flasher 3.3v to Arduino flasher 3.3v: Ready for inclusion in main wiki</p>
<hr />
<div>#REDIRECT [[Arduino flasher 3.3v]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2338Arduino flasher 3.3v2018-02-27T15:08:45Z<p>GNUtoo: GNUtoo moved page User:Arduino flasher 3.3v to Arduino flasher 3.3v: Ready for inclusion in main wiki</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
| 16<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
| 8<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| 15<br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
| 7<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
| 10<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
| 2<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
| 9<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
| 1<br />
|-<br />
|}<br />
<br />
Then connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
==== Flashing ====<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. Thanks also for telling me about the Macronix issues on the Thinkpad X200. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=User:GNUtoo/Arduino_flasher_3v3&diff=2337User:GNUtoo/Arduino flasher 3v32018-02-27T15:08:19Z<p>GNUtoo: GNUtoo moved page User:GNUtoo/Arduino flasher 3v3 to User:Arduino flasher 3.3v: Ready for inclusion in main wiki</p>
<hr />
<div>#REDIRECT [[User:Arduino flasher 3.3v]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2336Arduino flasher 3.3v2018-02-27T15:08:19Z<p>GNUtoo: GNUtoo moved page User:GNUtoo/Arduino flasher 3v3 to User:Arduino flasher 3.3v: Ready for inclusion in main wiki</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
| 16<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
| 8<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| 15<br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
| 7<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
| 10<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
| 2<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
| 9<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
| 1<br />
|-<br />
|}<br />
<br />
Then connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
==== Flashing ====<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. Thanks also for telling me about the Macronix issues on the Thinkpad X200. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2335Serprog2018-02-27T15:07:32Z<p>GNUtoo: Regroup arduino based flashers</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
=== Arduino Mega flasher by fritz ===<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
<br />
Some information is lacking on this flasher, such as the software used in it. Feel free to add information on it if you find some.<br />
<br />
=== 5V arduino with level shifter ===<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
=== Frser-duino ===<br />
The source can be found [https://github.com/urjaman/frser-duino/ here]<br />
<br />
=== Using a 5v Arduino at 3.3V ===<br />
<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Serprog&diff=2334Serprog2018-02-27T15:05:07Z<p>GNUtoo: /* Arduino flasher by GNUtoo */ I was not the only contributor</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== Arduino Mega flasher by fritz ==<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
FIXME: More info?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Various Arduino based flashers ==<br />
<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
== Frser-duino ==<br />
The source can be found [https://github.com/urjaman/frser-duino/ here]<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2333Arduino flasher 3.3v2018-02-27T15:02:27Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
| 16<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
| 8<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| 15<br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
| 7<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
| 10<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
| 2<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
| 9<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
| 1<br />
|-<br />
|}<br />
<br />
Then connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
==== Flashing ====<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. Thanks also for telling me about the Macronix issues on the Thinkpad X200. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2332Arduino flasher 3.3v2018-02-27T15:01:55Z<p>GNUtoo: /* Flashing */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
| 16<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
| 8<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| 15<br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
| 7<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
| 10<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
| 2<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
| 9<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
| 1<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
==== Flashing ====<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. Thanks also for telling me about the Macronix issues on the Thinkpad X200. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2331Arduino flasher 3.3v2018-02-27T15:01:39Z<p>GNUtoo: /* Flashing */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
| 16<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
| 8<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| 15<br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
| 7<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
| 10<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
| 2<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
| 9<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
| 1<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
=== Flashing ===<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. Thanks also for telling me about the Macronix issues on the Thinkpad X200. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2330Arduino flasher 3.3v2018-02-27T14:01:21Z<p>GNUtoo: /* Thanks */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
| 16<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
| 8<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| 15<br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
| 7<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
| 10<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
| 2<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
| 9<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
| 1<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. Thanks also for telling me about the Macronix issues on the Thinkpad X200. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2329Arduino flasher 3.3v2018-02-27T14:00:23Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
| 16<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
| 8<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| 15<br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
| 7<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
| 10<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
| 2<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
| 9<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
| 1<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2328Arduino flasher 3.3v2018-02-27T13:58:33Z<p>GNUtoo: /* Introduction */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats and warnings:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* You need to read the tutorial, if you don't understand it, it's probably not for you. In doubt you could ask for some help in flashrom IRC channel or on the mailing list.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
|<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
|<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| <br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
|<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
|<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2327Arduino flasher 3.3v2018-02-27T13:57:23Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the Arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the Arduino<br />
<br />
Here's how to connect the flash chips to the programmer:<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
|<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
|<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| <br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
|<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
|<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2326Arduino flasher 3.3v2018-02-27T13:56:48Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
|<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
|<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| <br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
|<br />
|-<br />
| GND<br />
| GND (Ground)<br />
!<br />
| GND<br />
|<br />
|<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2325Arduino flasher 3.3v2018-02-27T13:55:57Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip pin name<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
|<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
|<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| <br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
|<br />
|-<br />
| GND<br />
| GND<br />
!<br />
| GND<br />
|<br />
|<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2324Arduino flasher 3.3v2018-02-27T13:55:30Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
|<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
|<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| <br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
|<br />
|-<br />
| GND<br />
| GND<br />
!<br />
| GND<br />
|<br />
|<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2323Arduino flasher 3.3v2018-02-27T13:55:06Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
|<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
|<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| <br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
|<br />
|-<br />
| GND<br />
| GND<br />
!<br />
| GND<br />
|<br />
|<br />
|- <br />
| 5V<br />
| 3.3V<br />
!<br />
| VCC<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| WP# (Write Protect)<br />
|<br />
|<br />
|-<br />
| 5V<br />
| 3.3V<br />
!<br />
| HOLD#<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2322Arduino flasher 3.3v2018-02-27T13:52:18Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK (Clock)<br />
!<br />
| CLK<br />
|<br />
|<br />
|-<br />
| D12<br />
| MISO (Master In Slave Out)<br />
!<br />
| MISO or SO<br />
|<br />
|<br />
|-<br />
| D11<br />
| MOSI (Master Out Slave In)<br />
!<br />
| MOSI or SI<br />
| <br />
| <br />
|-<br />
| D10<br />
| CS# (Chip Select)<br />
!<br />
| CS# or CS OR SS<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2321Arduino flasher 3.3v2018-02-27T13:49:12Z<p>GNUtoo: </p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires you to to never connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2320Arduino flasher 3.3v2018-02-27T13:48:03Z<p>GNUtoo: /* Flashing the arduino */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Installing the code on the arduino ====<br />
Before installing the code on arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can install the code with:<br />
$ make flash-ftdi<br />
<br />
Once it is installed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2319Arduino flasher 3.3v2018-02-27T13:47:06Z<p>GNUtoo: /* Build the code and flash it */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code installing it on the arduino ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* You can then build the code:<br />
$ make ftdi<br />
<br />
==== Flashing the arduino ====<br />
Before flashing the arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can flash it with:<br />
$ make flash-ftdi<br />
<br />
Once it is flashed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2318Arduino flasher 3.3v2018-02-27T13:45:47Z<p>GNUtoo: /* Connect the programmer to a flash cihp */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
<br />
==== Flashing the arduino ====<br />
Before flashing the arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can flash it with:<br />
$ make flash-ftdi<br />
<br />
Once it is flashed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
=== Using the programmer ===<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2317Arduino flasher 3.3v2018-02-27T13:44:42Z<p>GNUtoo: /* HOWTO */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
<br />
==== Flashing the arduino ====<br />
Before flashing the arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can flash it with:<br />
$ make flash-ftdi<br />
<br />
Once it is flashed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
Again like before the important parts are:<br />
serprog: Programmer name is "frser-duino"<br />
And:<br />
No EEPROM/flash device found.<br />
<br />
If you made it up to this point, you successfully built the flasher.<br />
<br />
==== Connect the programmer to a flash cihp ====<br />
Since the flasher has been built, you probably want to use it.<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2316Arduino flasher 3.3v2018-02-27T13:42:40Z<p>GNUtoo: /* Build the programmer */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
<br />
==== Flashing the arduino ====<br />
Before flashing the arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can flash it with:<br />
$ make flash-ftdi<br />
<br />
Once it is flashed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
==== Connect the programmer to a flash cihp ====<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2315Arduino flasher 3.3v2018-02-27T13:41:25Z<p>GNUtoo: /* Connect the programmer to the USBSerial adapter */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
<br />
==== Flashing the arduino ====<br />
Before flashing the arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can flash it with:<br />
$ make flash-ftdi<br />
<br />
Once it is flashed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter RX to the TX of the arduino<br />
* Connect the FTDI adapter TX to the RX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2314Arduino flasher 3.3v2018-02-27T13:40:49Z<p>GNUtoo: /* Build the programmer */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
<br />
==== Flashing the arduino ====<br />
Before flashing the arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can flash it with:<br />
$ make flash-ftdi<br />
<br />
Once it is flashed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
==== Connect the programmer to the USB<->Serial adapter ====<br />
To do that:<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
Here's a sumarry of the above:<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2313Arduino flasher 3.3v2018-02-27T13:39:49Z<p>GNUtoo: /* Build the code and flash it */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
==== Building frser-duino ====<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
<br />
==== Flashing the arduino ====<br />
Before flashing the arduino we want to make sure that we are talking to the right device.<br />
To do that make sure that the arduino is not connected to your computer and run:<br />
$ ls -l /dev/ttyUSB0 <br />
If everything went fine it will output something like that:<br />
ls: cannot access '/dev/ttyUSB0': No such file or directory<br />
If instead it looks like that:<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
then something else is connected to your computer at /dev/ttyUSB0.<br />
If you can't figure what's going on by yourself, it's better to get help<br />
on the flashrom IRC channel to fix the issue.<br />
<br />
Then connect your arduino to the computer and run the same command:<br />
$ ls -l /dev/ttyUSB0 <br />
This time it's supposed to output a line that looks more or less like that<br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
At this point we're pretty confident that /dev/ttyUSB0 corresponds to the arduino, so we can flash it with:<br />
$ make flash-ftdi<br />
<br />
Once it is flashed we can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
This will make flashrom talk to the arduino to verify if everything is fine up to this point.<br />
<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2312Arduino flasher 3.3v2018-02-27T13:33:42Z<p>GNUtoo: /* Build the code and flash it */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
<br />
$ ls -l /dev/ttyUSB0 <br />
crw-rw---- 1 root uucp 188, 0 27 févr. 14:30 /dev/ttyUSB0<br />
<br />
<br />
$ make flash-ftdi<br />
<br />
You can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
If everything went fine it will look more or less like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
This is the important line:<br />
serprog: Programmer name is "frser-duino"<br />
It means that flashrom is able to talk to the flasher, which reports itself as "frser-duino"<br />
We also have the following line:<br />
No EEPROM/flash device found.<br />
which tells that it didn't find any flash. This is what's supposed to happen since we didn't connect any yet.<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2311Arduino flasher 3.3v2018-02-27T13:31:17Z<p>GNUtoo: /* Build the code and flash it */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
$ make flash-ftdi<br />
<br />
You can now test that everything went fine with:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
If everything went fine it will look like that:<br />
$ flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied<br />
/dev/mem: Permission denied<br />
flashrom v1.0 on Linux 4.15.2-gnu-1 (i686)<br />
flashrom is free software, get the source code at https://flashrom.org<br />
<br />
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<br />
serprog: Programmer name is "frser-duino"<br />
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0xfef80000.<br />
No EEPROM/flash device found.<br />
Note: flashrom can never write if the flash chip isn't found automatically.<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2310Arduino flasher 3.3v2018-02-27T13:29:09Z<p>GNUtoo: /* Build the code and flash it */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
First download frser-duino:<br />
$ git clone --recursive https://github.com/urjaman/frser-duino.git<br />
$ cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
$ make ftdi<br />
$ make flash-ftdi<br />
<br />
You can now test that everything went fine with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2309Arduino flasher 3.3v2018-02-27T13:28:18Z<p>GNUtoo: /* Build the code and flash it */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
First download frser-duino:<br />
git clone --recursive https://github.com/urjaman/frser-duino.git<br />
cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
# make ftdi<br />
# make flash-ftdi<br />
<br />
You can now test that everything went fine with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2308Arduino flasher 3.3v2018-02-27T13:27:27Z<p>GNUtoo: /* Page license and thanks */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
First download frser-duino:<br />
git clone --recursive https://github.com/urjaman/frser-duino.git<br />
cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
# make ftdi<br />
# make flash-ftdi<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.<br />
<br />
== Page license ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2307Arduino flasher 3.3v2018-02-27T13:27:05Z<p>GNUtoo: </p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
First download frser-duino:<br />
git clone --recursive https://github.com/urjaman/frser-duino.git<br />
cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
# make ftdi<br />
# make flash-ftdi<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Page license and thanks ==<br />
This page is available under the following licenses:<br />
* [https://creativecommons.org/licenses/by-sa/3.0/legalcode CC-BY-SA 3.0]<br />
* [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA 4.0] or later<br />
* [https://www.gnu.org/licenses/fdl.txt GFDL 1.3] or later<br />
<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2306Arduino flasher 3.3v2018-02-27T13:26:16Z<p>GNUtoo: /* Build the programmer */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
First download frser-duino:<br />
git clone --recursive https://github.com/urjaman/frser-duino.git<br />
cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
# make ftdi<br />
# make flash-ftdi<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* You can now check that the programmer is responding with:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Since you didn't connect yet a flash chip, it will says it found no flash chips:<br />
[TODO]<br />
<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.</div>GNUtoohttps://wiki.flashrom.org/index.php?title=Arduino_flasher_3.3v&diff=2305Arduino flasher 3.3v2018-02-27T13:24:41Z<p>GNUtoo: /* Build the programmer */</p>
<hr />
<div>== Introduction ==<br />
This explains how to:<br />
* Easily lower the voltage of an arduino<br />
* Use that arduino to flash a coreboot image on a GM45 Thinkpad with a SOIC16 chip<br />
<br />
It requires:<br />
* An AVR Arduino at 5v<br />
* An USB<->Serial adapter capable of providing enough current to power up:<br />
** The arduino<br />
** The flash chip<br />
** The circuits around the flash chip<br />
<br />
It was tested with:<br />
* An Arduino.org "nano version 3.3"<br />
* A Sparkfun "FTDI Basic 3v3" (Uses an FTDI FT232R)<br />
<br />
Caveats:<br />
* It requires not to ever connect an USB cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. This would result in the I/O voltage being 5V instead of 3.3V. If you think you may accidentally connect it this way, this flasher isn't the right solution for you.<br />
* For now it requires to patch frser-duino<br />
<br />
== Theory ==<br />
In the [http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf Atmega328/P datasheet], the "32.3. Speed Grades" chapter describes (pages 368 and 369) the link between maximum frequency of the microcontroller and the voltage. At 3.3v, the maximum frequency is 12Mhz.<br />
<br />
== HOWTO ==<br />
=== Build the code and flash it ===<br />
First download frser-duino:<br />
git clone --recursive https://github.com/urjaman/frser-duino.git<br />
cd frser-duino<br />
Then modify the F_CPU value in main.h to be 12Mhz instead of 16Mhz:<br />
F_CPU will look like that:<br />
#define F_CPU 16000000UL<br />
Change it to:<br />
#define F_CPU 12000000UL<br />
* Flash the Arduino with frser-duino<br />
# make ftdi<br />
# make flash-ftdi<br />
<br />
=== Build the programmer ===<br />
* Connect the FTDI adapter to RX and TX of the arduino<br />
* Connect the 3V3 of the FTDI adapter to the 5V pin of the Arduino<br />
* Connect the GND of the FTDI adapter to the GDN of the arduino.<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino<br />
! USB<->Serial port adapter<br />
|-<br />
| RX<br />
| TX<br />
|-<br />
| TX<br />
| RX<br />
|- <br />
| 5v<br />
| 3.3v<br />
|- <br />
| GND<br />
| GND<br />
|-<br />
|}<br />
<br />
* If you use a clip (Like a SOIC-8 or SOIC16 Pomona clip), connect it to the arduino<br />
* Connect the chip to the clip, or if you don't use a clip, the chip to the arduino<br />
<br />
{| class="wikitable" border="1"<br />
! Arduino pin number<br />
! Function<br />
|<br />
! Flash chip function<br />
! SOIC8 Flash chip pin <br />
! SOIC16 Flash chip pin <br />
|-<br />
| D13<br />
| CLK<br />
!<br />
| CLK<br />
|<br />
|-<br />
|}<br />
<br />
* Connect an USB cable between the USB<->Serial adapter and the computer. Never connect the cable between the Arduino USB port and the computer while the flasher is connected to a flash chip. That would result in the I/O voltage being 5V instead of 3.3V.<br />
<br />
== Flashing ==<br />
Run flashrom like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
With some strange macronix flash chip (that are present in the Thinkpad X200) you might need to add spispeed=100k like that:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000,spispeed=100k<br />
<br />
== Thanks ==<br />
Thanks a lot to SwiftGeek on IRC (#libreboot on Freenode) for finding the first workaround to make it detect flash chips at lower voltage. This project would not have been possible without that.</div>GNUtoo