User Tools

Site Tools


midge:details

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

midge:details [2018/04/09 15:36] (current)
Line 1: Line 1:
 +===== Flash memory =====
 +Typical ADM5120 based devices have 2M of internal flash memory
 +
 +<​code>​
 +           ​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
 +    +-----------------------+
 +</​code>​
 +
 +Note: if you change MIDGE_*_BLOCKS you should rebuild kernel (make clean-all)
 +
 +
 +
 +===== Filesystems =====
 +Midge uses **[[http://​squashfs.sourceforge.net/​|squashfs]]+lzma** as initial root filesystem.
 +After boot up, root filesystem is switched to **tmpfs**.
 +
 +
 +
 +
 +===== Overclocking =====
 +
 +There is method for overclocking ADM5120.
 +
 +==== A4~A3: Pll setting ====
 +  * 00=175MHz (default)
 +  * 01=200MHz
 +  * 10=Reserved <​----------- 225MHz
 +  * 11=Reserved <​----------- 250MHz ​
 +
 +{{midge:​ovrclk.gif}}
 +
 +^For 200Mhz| Move resistor R89 to R88 place |
 +^For 225Mhz| ​                               |
 +^For 250Mhz| (no successful results) ​       |
 +
 +
 +
 +===== Simple JTAG =====
 +
 +**Original schematic diagram:**
 +
 +{{midge:​jtag-schematic.gif}}
 +
 +**Platine [[http://​www.hamradio.crimea.ua/​downloads/​info/​zft-lab/​MidgeJtag-01_20060701.lay|(download)]] from ZFT Lab. developed in SprintLayout programm:**
 +
 +{{midge:​jtag-platine.jpg}}
 +
 +**Photo from ZFT Lab. of complete device:**
 +
 +{{midge:​jtag-photo.jpg}}
 +
 +
 +====== 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 [[http://​www.sunspot.co.uk/​Projects/​SWEEX/​second_rs232.html|here]].
 +
 +===== Hardware =====
 +Assuming you already made the [[console_cable|First Uart Mod]] using a M232, **not** a telephone data cable, you have four free pins on your M232. Make the following connections:​
 +<​code>​
 +ADM5120 PIN130 over an 1k resistor to MAX232 Pin 9.
 +ADM5120 PIN131 without resistor to MAX232 Pin 10.
 +</​code>​
 +
 +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).
 +
 +<​code>​
 +M232 T[1,2]OUT - DB9 female Pin 2
 +M232 R[1,​2]IN ​ - DB9 female Pin 3
 +</​code>​
 +
 +
 +==== 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).
 +
 +<​code>​
 +M232 T[1,2]OUT - DB9 male Pin 3
 +M232 R[1,​2]IN ​ - DB9 male Pin 2
 +</​code>​
 +
 +
 +
 +
 +====== 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|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
 +<​code>​
 +#!/bin/sh
 +/​usr/​sbin/​setserial /dev/ttyS0 irq 1 baud_base 115200
 +/​usr/​sbin/​setserial /dev/ttyS1 irq 2 baud_base 2400
 +</​code>​
 +  * make additional settings with ''​stty''​ (TODO: which ?)
 +
 +===== Quick and dirty =====
 +Write your own program, which makes all the settings for you. Based on [[http://​www.sunspot.co.uk/​Projects/​SWEEX/​files/​serialports/​rs232_c_progs/​rs232io_ttyS1_96.c|sunspots work]] I use [[http://​schimmelnetz.de/​projekte/​eddi/​files/​set_ttyS1_2400_8N1.c|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)