User Tools

Site Tools


Flash memory

Typical ADM5120 based devices have 2M of internal flash memory

           PARTITION            SIZE                    DEVICE
    |       bootloader      |   64k                     /dev/mtdblock/0
    |         kernel        |   MIDGE_KERNEL_BLOCKS     /dev/mtdblock/1
    |   initfs (squashfs)   |   MIDGE_INITFS_BLOCKS     /dev/mtdblock/2
    | datafs (jffs2 or raw) |   MIDGE_DATAFS_BLOCKS     /dev/mtdblock/3

Note: if you change MIDGE_*_BLOCKS you should rebuild kernel (make clean-all)


Midge uses squashfs+lzma as initial root filesystem. After boot up, root filesystem is switched to tmpfs.


There is method for overclocking ADM5120.

A4~A3: Pll setting

  • 00=175MHz (default)
  • 01=200MHz
  • 10=Reserved ←———- 225MHz
  • 11=Reserved ←———- 250MHz

For 200Mhz Move resistor R89 to R88 place
For 225Mhz
For 250Mhz (no successful results)

Simple JTAG

Original schematic diagram:

Platine (download) from ZFT Lab. developed in SprintLayout programm:


Photo from ZFT Lab. of complete device:


Second Uart

After you have connected your router to your PC using the console_cable you possibly need to use the second uart of the ADM5120 too. A description how to make this mod you find here.


Assuming you already made the First Uart Mod using a M232, not a telephone data cable, you have four free pins on your M232. Make the following connections:

ADM5120 PIN130 over an 1k resistor to MAX232 Pin 9.
ADM5120 PIN131 without resistor to MAX232 Pin 10.

For the other two pins first make sure, what you want, a serial device or an terminal:

Router as serial device

The schematics on the console_cable-Page show you the connection if your router ist the serial device and your PC is the terminal. That meens the router is a device like a modem that you connect to the PC. You need a female DB9 connector on your router for that.

There should be -9…-12 V between Pin 3 and Pin 5 (GND).

M232 T[1,2]OUT - DB9 female Pin 2
M232 R[1,2]IN  - DB9 female Pin 3

Router as serial terminal

But if your router should be the terminal and you want to connect a device like a modem to it you need a male DB9 connector and you have to change the RX and TX pins. That meens, a simple gender changer is not enough.

There should be -9…-12 V between Pin 2 and Pin 5 (GND).

M232 T[1,2]OUT - DB9 male Pin 3
M232 R[1,2]IN  - DB9 male Pin 2

Serial settings

Setting the baud rate at runtime seems not to work. So you first have to edit the kernel sources as described for the second uart and build your own kernel.

Normal way

Install the package setserial and activate stty in bussybox and edit /etc/init.d/S15serial at runtime or ./package/setserial/files/serial.init before build with the same baudrates like in the kernel sources

/usr/sbin/setserial /dev/ttyS0 irq 1 baud_base 115200
/usr/sbin/setserial /dev/ttyS1 irq 2 baud_base 2400
  • make additional settings with stty (TODO: which ?)

Quick and dirty

Write your own program, which makes all the settings for you. Based on sunspots work I use this c programm. Change the baudrate and the device name in the sources to your needs or implement baudrate and device name as command line arguments.

Compile it using the crosscompiler, strip it and copy it into trunk/openwrt/target/linux/image/adm5120/base-files/sbin/ before you next firmware build. After you run it, your /dev/ttyS1 runs fine with 8N1, no hardware handshaking and the baudrate you entered in the sources.

midge/details.txt · Last modified: 2018/04/09 15:36 (external edit)