351

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Too bad original MPR-A1 board layout is slightly differ than MPR-L8.

Re: HAME MPR-A1 - Small and cheap router with built-in battery

The pins should not be hard to trace.  Can you take a good picture of the back of the HAME-A1?  I will need to see the area with all the backside connections of the RT5350.  There is a big GND plane (at least on the L8) that makes pin identification easy from the back side.

353

Re: HAME MPR-A1 - Small and cheap router with built-in battery

I hope my resolution is quiet enough to point the traces big_smile

MPR-A1 back side

MPR-A1 front side

354 (edited by oschemes 2013-03-25 23:40:27)

Re: HAME MPR-A1 - Small and cheap router with built-in battery

The pics are good.

On the backside, I am pretty sure that these two lines are the mem config.  One will already populated with 4.7k, and one is missing it's 4.7k resistor.  BUT, when looking at the front pic I get lost..

Here's the back.  The mem config vias are easy to find, I've circled in red.  The trace with a blue arrow is the one I'm guessing needs the resistor.

A1_Back

Here's the front.  It's one of these two locations, but it's too hard to tell using an image.  You'll easily be able to figure it out if you have the board in hand, and can flip it over from top, side, etc.

A1_Front

Good luck, and let us know!!

355

Re: HAME MPR-A1 - Small and cheap router with built-in battery

@oschemes

You were right -- I got my full memory now , here is the right spot to put 4k7 R on Hame MPR-A1 v2.1



http://img405.imageshack.us/img405/4827/hamefront4.jpg


Full boot log with linuxpro's whole flash :

U-Boot 1.1.3 (Dec  3 2011 - 14:09:01)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb4000
spi_wait_nsec: 42
spi device id: 1 2 15 4d 0 (2154d00)
find flash: S25FL032P
raspi_read: from:30000 len:1000
.*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 3.5.2.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 512 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 64 MBytes
Flash component: SPI Flash
Date:Dec  3 2011  Time:14:09:01
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

 ##### The CPU freq = 360 MHZ ####
 estimate memory size =32 Mbytes

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                    0

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
.   Image Name:   MIPS OpenWrt Linux-3.7.9
   Created:      2013-02-20   2:58:59 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    844202 Bytes = 824.4 kB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:ce1aa
.............   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

[    0.000000] Linux version 3.7.9 (trac@UbuntuServer32) (gcc version 4.6.4 20121210 (prerelease) (Linaro GCC 4.6-2012.12) ) #2 Wed Feb 20 10:58:49 CST 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT5350 id:1 rev:3 running at 360.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=MPR-A1 console=ttyS1,57600 mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=00000006
[    0.000000] Readback ErrCtl register=00000006
[    0.000000] Memory: 62248k/65536k available (1964k kernel code, 3288k reserved, 335k data, 196k init, 0k highmem)
[    0.000000] Unhandled kernel unaligned access[#1]:
[    0.000000] Cpu 0
[    0.000000] $ 0   : 00000000 00000030 2442242e 83802004
[    0.000000] $ 4   : 83803080 24422442 00000000 00000001
[    0.000000] $ 8   : 83802000 838030f4 00000000 00000000
[    0.000000] $12   : 00000000 00000000 00000000 00000000
[    0.000000] $16   : 80290000 83801000 83803080 80240000
[    0.000000] $20   : 80290000 83801080 80290000 00000000
[    0.000000] $24   : 00000000 00000014
[    0.000000] $28   : 8022c000 8022de98 81fe4000 8024b408
[    0.000000] Hi    : 00000000
[    0.000000] Lo    : 0000000f
[    0.000000] epc   : 8024b0f4 0x8024b0f4
[    0.000000]     Not tainted
[    0.000000] ra    : 8024b408 0x8024b408
[    0.000000] Status: 11000002    KERNEL EXL
[    0.000000] Cause : 40808014
[    0.000000] BadVA : 2442244a
[    0.000000] PrId  : 0001964c (MIPS 24KEc)
[    0.000000] Modules linked in:
[    0.000000] Process swapper (pid: 0, threadinfo=8022c000, task=80232648, tls=00000000)
[    0.000000] Stack : 80290000 802455d8 80270000 0000f328 00010000 000007ac 00000cd8 0000014f
        8025ecb0 80270000 80260000 802654b7 80230000 00000000 81fe4000 00000000
        81fe4000 8023f738 00000000 801f0000 0000004c 00000000 ffffffff ffffffff
        8023f2a4 00000000 80265408 00000000 81fe4000 81fc4000 81fc8030 1fffffff
        81fe4000 81fc88b0 00000000 00000000 00000000 00000000 00000000 00000000
        ...
[    0.000000] Call Trace:[<802455d8>] 0x802455d8
[    0.000000] [<8023f738>] 0x8023f738
[    0.000000] [<8023f2a4>] 0x8023f2a4
[    0.000000]
[    0.000000]
Code: 24630004  08092c40  2442ffec <ac44001c> 8c420014  2442ffec  24450014  14a3fffb  00000000
[    0.000000] ---[ end trace 4eaa2a86a8e2da22 ]---
[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!

Thank you man for your big help !!

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Great!  Thanks for posting your pic, it will help the other MPR-A1 users!

I'm sure you know this, but now you need to rebuild your OpenWrt with Squonk's rt5350 patches, and set the kernel config to mem=32M.  Squonk showed me where this is located - for those who may not know, here is his clip from email.
-----------
make kernel_menuconfig' -> Kernel hacking -> 'rootfstype=squashfs,jffs2 mem=32M' or by editing the CONFIG_CMDLINE directly in target/linux/ramips/config/default.
Once you have changed the memory size, recompile with 'make target/clean world' and reflash.
------------
I am still using linuxpro's bootloader, but I reflashed the system code to a fresh OpenWRT build that has enough USB support to shift the bootup to a USB drive formatted ext4.  Now I have 8GB of space to install LuCI and all sorts of other stuff.  Doubling the ram to 32MB was a big help.


Also - to all:  I discovered that the reason HAME and clones sometimes do not boot up with the serial port attached is due to noise on one of the OTHER empty config lines located near the 40MHz oscillator.  I have not added any resistors to fix it, but I do know that if you just pinch your fingers hard onto the empty resistor footprints near the osc (Directly above the "Ra" in Ralink in xopal's picture) the troublesome devices will boot even with serial attached.  It's strange, 2 of my devices act nicely, 4 do not.

Re: HAME MPR-A1 - Small and cheap router with built-in battery

@xopal - I notice your board is only counting 32MB of memory in the first line.  That's the same as mine.  Either there is still some config missing, or linuxpro has a different setting than we do.  I see you are using the correct chip.

@linuxpro - xopal also has 48LC32M16A2 but using your bootloader it's only detecting 32M.  Can you take a similar photo of your board so we can see if any other config resistors are missing?  This is very puzzling.

358 (edited by xopal 2013-03-27 03:24:10)

Re: HAME MPR-A1 - Small and cheap router with built-in battery

@oschemes

Yeah I know how to fix kernel panic's issue with Squonk's patches , but my concern now  how to utilize full memory attached to hame board.

Trying to revert back to original MPR-A1 U-boot  and memory read still 32MB.

U-Boot 1.1.7 (Dec 13 2011 - 13:49:42)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb4000
spi_wait_nsec: 42
spi device id: 1 2 15 4d 0 (2154d00)
find flash: S25FL032P
raspi_read: from:30000 len:1000
.*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 512 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 64 MBytes
Flash component: SPI Flash
Date:Dec 13 2011  Time:13:49:42
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

 ##### The CPU freq = 360 MHZ ####
 estimate memory size =32 Mbytes
raspi_read: from:40028 len:6

359 (edited by oschemes 2013-03-27 04:55:16)

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Yes,we need to hear from linuxpro.  Although he posted in the HAME thread here, I am beginning to suspect that he has a different board with 2x32 SDRAM.

<Edit: Some DRAM notes, added Later>

Interestingly enough, if you have a Uboot with working md/mm commands, you can mm (or mw) the DRAM config registers at 0x1000 0300 and 0x1000 0304 and your writes are live.  Usually it's 0x10000304 that you want to mess with, so as long as you set the MSB to 1 the RT5350 seems to reinit the DRAM controller to what you tell it to.

Writing the memory shorter (from 64MB to 32MB) does nothing, since ram above 32MB is not being used due to the unknown hardware issue under investigation.  But E0x00600 for 16MB truncates ram above where Uboot is running, and will result in a crash after the mm sequence is completed.  E0230600 should config it for 128MB, whether or not that IC even exists - no difference from the 64Mb config as far as I can see.

The data/IO logic of the DRAM controller responds faithfully to md commands up to 0x3FFF FFFF, after which you get the hardcoded message baddbadd for any reads at or above the 64MB limit of 0x40000000.  You can test this by reading 0x200 0000 (>32MB) or 0x300 0000 (>48MB) while touching the data pins of the DRAM (near the top). 

Uboot will read garbage when the chip is touched, and will read 00's when not touched.  This means the bus is still live, but our chip is not under command at the moment.  Perhaps CE1 is being activated instead of the CE0 our chip is tied to. 

Alas, it seems like Ralink really has crippled their DRAM controller when spawning the 5350 from the big brother 3050, and the 32MB per chip is being enforced in the chip address hardware while the rest of the DRAM controller is left the same.  So for now, save your money and buy the 256Mbit chips for memory upgrade.  Is there any possible hack to address 64MB in one chip?  Maybe - More investigation is needed.

360 (edited by linuxpro 2013-03-27 06:55:34)

Re: HAME MPR-A1 - Small and cheap router with built-in battery

if one ram chip, only detect 32RAM.

but DDR2 can be 64MB ram. big_smile

DDNAS Trac site: trac.rtnas.com    It is Marvell 88F6710 (Armada370+ 88E6171R). sale: $69.99
DDNAS info site: www.rtnas.com

Re: HAME MPR-A1 - Small and cheap router with built-in battery

now, RT7620N better RT5350F.
RT7620

RMB 65
$11

DDNAS Trac site: trac.rtnas.com    It is Marvell 88F6710 (Armada370+ 88E6171R). sale: $69.99
DDNAS info site: www.rtnas.com

362 (edited by Squonk 2013-03-27 07:46:44)

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Still no USB, though sad

Does the MR305R has either RT7620N or RT5350F, and how can you tell?

Datasheet for RT7620N?

Where did you get this price?

Too many pocket WiFi routers / modules to list!

Re: HAME MPR-A1 - Small and cheap router with built-in battery

http://www.amazon.cn/MERCURY-%E6%B0%B4% … amp;sr=8-1

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Please explain what you mean,I don't think rt5350 can interface DDR2.
Plus, your picture above shows 128Mbit dram, not 512Mbit.  Please take a photo of the board with 512Mbit (64MB) dram on rt5350.

linuxpro wrote:

if one ram chip, only detect 32RAM.

but DDR2 can be 64MB ram. big_smile

Re: HAME MPR-A1 - Small and cheap router with built-in battery

oschemes wrote:

Interestingly enough, if you have a Uboot with working md/mm commands, you can mm (or mw) the DRAM config registers at 0x1000 0300 and 0x1000 0304 and your writes are live.  Usually it's 0x10000304 that you want to mess with, so as long as you set the MSB to 1 the RT5350 seems to reinit the DRAM controller to what you tell it to.

oschemes, that sounds really interesting. Do you think if it's possible to run a uboot script at startup or before booting the kernel changing the DRAM parameters and start the kernel whith these parameters ? That would avoid the need of soldering that damn small resistor ...

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Hmm. probably.  I will have to go back and check on one of the virgin devices we have around here, but it seems reasonable that if we init the DRAM controller to 32MB it would override the bootstrap load.

If I recall correctly, you already have 32M on your board but bootstrap was limiting you to 16MB.  Have you tried putting the resistor on, or you don't think you'd have any luck in soldering it.  FYI - our first attempt used a little 1/8W leaded resistor that had it's leads bent over and clipped short.  It worked but is kind of a danger of knocking it off and ripping the pads off too.

Do you want to be the guinea pig of just shorting the terminals instead of installing a resistor?  smile

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Hello! Looks twice this whole thread, but can't understand:

Is there any chance to flash firmware not soldering Serial console cable?

I'm able to compile openwrt with latest patches, i'm able to do Firmware upgrade from tftp 11.11.11.12, router reboots, and stays on old original firmware...

Re: HAME MPR-A1 - Small and cheap router with built-in battery

oschemes wrote:

Please explain what you mean,I don't think rt5350 can interface DDR2.
Plus, your picture above shows 128Mbit dram, not 512Mbit.  Please take a photo of the board with 512Mbit (64MB) dram on rt5350.

linuxpro wrote:

if one ram chip, only detect 32RAM.

but DDR2 can be 64MB ram. big_smile

sorry, i recheck my datasheet, your right, ONLY SUPPORT SDR....

DDNAS Trac site: trac.rtnas.com    It is Marvell 88F6710 (Armada370+ 88E6171R). sale: $69.99
DDNAS info site: www.rtnas.com

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Squonk wrote:

Still no USB, though sad

Does the MR305R has either RT7620N or RT5350F, and how can you tell?

Datasheet for RT7620N?

Where did you get this price?

buy one MW305R....

7620N BOM price is $7.
7620A BOM price is $9.

Now, i want make MT7620A version , has USB and NAND.

DDNAS Trac site: trac.rtnas.com    It is Marvell 88F6710 (Armada370+ 88E6171R). sale: $69.99
DDNAS info site: www.rtnas.com

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Hmm... soldered serial on my board (Embedsys EBS-PMA-W1)

Looks like here PunBB bbcode test

In this example: Black - GND, green/white - RX/TX. Red - not connected. COM1 - standart onboard serial port used.

Got strange symbols

 ©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©Оґ©╩U╚╣┘=C}²ё•ЕКЕКЕКЕКSCCoCQ]emC_ї²²О©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОО©ОC}1-7/©╩││шш⌡╚}╘UCuШm┘CEm

Symbols are run, so I think something wrong with my settings? 57600-8-N-1, flow control disabled in HyperTerminal. Same picture in KITTY serial.

May be you can give me some advice?

371

Re: HAME MPR-A1 - Small and cheap router with built-in battery

It was noise on usb-ttl, change your usb-ttl converter with CP210 or CH341, it works for me.

372

Re: HAME MPR-A1 - Small and cheap router with built-in battery

Bad ground can also give garbled output.  Sure you've got TX/RX right?  Which usb-serial converter?

373 (edited by oschemes 2013-04-02 04:32:22)

Re: HAME MPR-A1 - Small and cheap router with built-in battery

linuxpro wrote:

sorry, i recheck my datasheet, your right, ONLY SUPPORT SDR....

@linuxpro - No problem, don't worry about that.  I'm glad you came back, I hope you can help me.

In post #321 on 2013-03-19, you showed

U-Boot 1.1.3 (Feb  5 2013 - 14:38:11)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb4000

Did this output come from HAME MPR-A1??  If you could copy the flash from this board, I would be very grateful.  And if you could take a picture of this board with the 64MB DRAM chip, that will help very much.

Your U-Boot shows that it has successfully found 64MB of DRAM and has put top of memory at 0x84000000.  That is perfect!

But on my board, I can modify the resistor to change the bootstrap, but even with the DRAM controller (supposedly) init'd to 64MB my U-Boot only initializes 32MB (top=0x82000000).  The rest of the DRAM is wasted.

U-Boot 1.1.3 (Dec  3 2011 - 14:09:01)

Board: Ralink APSoC DRAM:  32 MB

relocate_code Pointer at: 81fb4000

I have written (with EEPROM programmer) the flash you posted, but the U-Boot is Dec 3 as I show above.  I would like to try the Feb 5 U-Boot you are using.

Can you help?

374 (edited by oschemes 2013-04-02 04:39:32)

Re: HAME MPR-A1 - Small and cheap router with built-in battery

olegvekhov wrote:

Symbols are run, so I think something wrong with my settings? 57600-8-N-1, flow control disabled in HyperTerminal. Same picture in KITTY serial.

May be you can give me some advice?

@olegvekhov:  Try 115200, or 38400.  If the garbage is always the same the connection is OK and the port speed is wrong.  If the garbage is always different then your ground is not connected properly.  The metal shield on RS232 is not always GND, but the PCB copper fill usually is GND.

Re: HAME MPR-A1 - Small and cheap router with built-in battery

oschemes wrote:
linuxpro wrote:

sorry, i recheck my datasheet, your right, ONLY SUPPORT SDR....

@linuxpro - No problem, don't worry about that.  I'm glad you came back, I hope you can help me.

In post #321 on 2013-03-19, you showed

U-Boot 1.1.3 (Feb  5 2013 - 14:38:11)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb4000

Did this output come from HAME MPR-A1??  If you could copy the flash from this board, I would be very grateful.  And if you could take a picture of this board with the 64MB DRAM chip, that will help very much.

Your U-Boot shows that it has successfully found 64MB of DRAM and has put top of memory at 0x84000000.  That is perfect!

But on my board, I can modify the resistor to change the bootstrap, but even with the DRAM controller (supposedly) init'd to 64MB my U-Boot only initializes 32MB (top=0x82000000).  The rest of the DRAM is wasted.

U-Boot 1.1.3 (Dec  3 2011 - 14:09:01)

Board: Ralink APSoC DRAM:  32 MB

relocate_code Pointer at: 81fb4000

I have written (with EEPROM programmer) the flash you posted, but the U-Boot is Dec 3 as I show above.  I would like to try the Feb 5 U-Boot you are using.

Can you help?

https://plus.google.com/photos/10895775 … rOE1eLG9AE

DDNAS Trac site: trac.rtnas.com    It is Marvell 88F6710 (Armada370+ 88E6171R). sale: $69.99
DDNAS info site: www.rtnas.com