100%
am29f400b-arduino-flasher Am29F400B-MEGA-adapter view
Description

Imported from GitHub: multilan-tarek/am29f400b-arduino-flasher · commit ae08d3d · license GPL-3.0

Description

AMD Am29F400B Arduino MEGA Flasher

README

Am29F400B Arduino Flasher

This is a script for reading, erasing and writing the AMD Am29F400B flash memory chips using an Arduino MEGA.
These chips were used in many ECUs, TCUs and other kinds of control units in combination with the CR167 CPU from Siemens/Infineon.

Supported Chips

Am29F400BT                  | Top Boot Sector
Am29F400BB                  | Bottom Boot Sector

Software

The PC side script needs to be executed using Python 3 in a shell. (https://www.python.org/downloads/)

Flash the arduino.ino to an Arduino MEGA.

Available Commands

-r <file>                   | Read full
-r <file> <start> <size>    | Read partial
-r <file> <sector>          | Read sector
-w <file>                   | Write full
-w <file> <start> <size>    | Write partial (without erasing)
-w <file> <sector>          | Write sector
-e                          | Erase full
-e <sector>                 | Erase sector
-v                          | Prints sector protection states

Reading

Read all 512KB of data:

python3 main.py -r dump.bin

Read only data in a specific sector (e.g. SA1, see table below):

python3 main.py -r dump.bin 1

Read only a specific range (e.g. address 0x10, size 0x200, decimal and hex possible):

python3 main.py -r dump.bin 1 0x10 0x200
python3 main.py -r dump.bin 1 16 512

Writing

Write to all 512KB of available space:

python3 main.py -w new_data.bin

Write only to a specific sector (e.g. SA3, see table below):

python3 main.py -w new_data.bin 3

Write only to a specific range (e.g. address 0x20, size 0x100, decimal and hex possible):

python3 main.py -r new_data.bin 1 0x20 0x00
python3 main.py -r new_data.bin 1 32 256

Attention:
Writing to a specific range will not erase the data beforehand, because it is only possible to erase a whole sector.
So this only works if the bits you want to change are 1.
You can only change bits back from 0 to 1 with erasing.

Also, any writing can only be done if the sector is unprotected.
Check the sector protection states using the -v command.


Erasing

Erase all sectors (SA0 - SA10)

python3 main.py -e

Erase only a specific sector (e.g. SA5, see table below)

python3 main.py -e 5

Attention:
Erasing can only be done if the sector is unprotected.
Check the sector protection states using the -v command.


Hardware

Included is a simple PCB that adapts the 36 pin connector of the Arduino MEGA to the SO44 footprint.
Use a 1206 1kΩ resistor to pull up the RY/BY# signal. (only needed for erasing and writing)

The gerber file is ready for ordering at JLCPCB.

PCB Top

PCB Bottom

MEGA


Sector Layouts

The chip is seperated into 11 sectors.
Sizes and addresses of these sectors are dependent on the variant.
Hardware and software is designed to operate in byte mode.
Values would differ in word mode.

Am29F400BT

SectorAddressSize
SA00x000000x10000
SA10x100000x10000
SA20x200000x10000
SA30x300000x10000
SA40x400000x10000
SA50x500000x10000
SA60x600000x10000
SA70x700000x8000
SA80x780000x2000
SA90x7a0000x2000
SA100x7c0000x4000

Am29F400BB

SectorAddressSize
SA00x000000x4000
SA10x040000x2000
SA20x060000x2000
SA30x080000x8000
SA40x100000x10000
SA50x200000x10000
SA60x300000x10000
SA70x400000x10000
SA80x500000x10000
SA90x600000x10000
SA100x700000x10000
Comments
Sign in to comment

No comments yet. Be the first to ask about this board.