[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4694: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4695: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4696: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
8devices Community - View topic - MMC/SD SPI disk
www.8devices.com
View unanswered posts | View active topics It is currently 19 Apr 2024, 09:34



Reply to topic  [ 50 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
 MMC/SD SPI disk 
Author Message

Joined: 24 Apr 2012, 10:46
Posts: 15
I have copied some .mp3 to the SD card using "scp" from my computer to the carambola vía LAN.

So far these are the stats:
Writing... 6 files of 4MBytes each approx
Max throughput: 88.4Kb/s
Min: 65.2Kb/s
average: 76.98Kb/s

Reading... 6 files of 4Mbytes each approx
Max throughtput: 81.5Kb/s
Min: 78.5Kb/s
average: 80.18Kb/s

CPU usage reported by the "Realtime graphs" of LUCI says below 5. I believe it's 5% which is real good because all I have read about this mmc-over-gpio hack is 100% while accesing the SD. Maybe the statistics reported by luci are not good, or there have been improvements in the last few years. I think people feel more comfortable using USB disks than this hack which needs some soldering in routers, nowadays it's more common to find routers with usb sockets.

I don't feel it's unusable at all. In fact, I think I will prepare the PCB for using the SPI pins and also GPIOs just removing some 0ohms resistors in case the TRUE-SPI becomes available.


21 May 2012, 16:39
Profile

Joined: 24 Apr 2012, 10:46
Posts: 15
I've found a file under build_dir/linux-ramips_rt305x/linux-3.2.13/drivers/mmc/host called gpiommc.c. This file contains the following lines:

/* Assign default configuration */
dev->pdata.pins.gpio_di = GPIO_INVALID;
dev->pdata.pins.gpio_do = GPIO_INVALID;
dev->pdata.pins.gpio_clk = GPIO_INVALID;
dev->pdata.pins.gpio_cs = GPIO_INVALID;
dev->pdata.pins.cs_activelow = 1;
dev->pdata.mode = SPI_MODE_0;
dev->pdata.no_spi_delay = 0;
dev->pdata.max_bus_speed = 25000000; /* 5 MHz */

I've changed max_bus_speed from 5000000 to 25000000, which I suppose it's Mhz.

Unfortunately speed isn't 5 times the previous.

Tried the same test and these are the results:

Reading... 6 files of 4Mbytes each approx
Max throughtput: 87.7Kb/s
Min: 86.4Kb/s
average: 87.13Kb/s

If what I've changed is something relevant for speed improvement, these results make me think the max speed using gpios have been reached somewhere between 5 and 25MHz. Sure It's closer to 5 than to 25.


21 May 2012, 19:02
Profile

Joined: 05 Apr 2012, 10:23
Posts: 25
Location: Lithuania
I've mentioned in SPI related post, that there is huge uneccessary delay, in SPI driver. I was able to increase spi performance up to 5 times or so.

viewtopic.php?f=5&t=79


22 May 2012, 05:56
Profile WWW

Joined: 24 Apr 2012, 10:46
Posts: 15
Thanks jedas for the info, I will check it. I'm not sure gpio-spi emulation follows the same path than spi. I will give it a try


22 May 2012, 07:49
Profile

Joined: 05 Apr 2012, 10:23
Posts: 25
Location: Lithuania
Sorry, it won't be the same on gpios.


22 May 2012, 13:49
Profile WWW

Joined: 25 Jan 2012, 15:04
Posts: 9
Hi wtelecom

We're very interested in learning how you managed to get the SDcard working.

When you say you included the necessary modules in menuconfig and LUCI what do you mena?

Have you applied the code/patch provided by Carambola on their wiki (http://www.8devices.com/wiki_carambola/ ... ash_m25p64)

Otherwise what procedures did you take to get the SD card to work?

Thank you in advance.

Pedro.


28 May 2012, 22:52
Profile

Joined: 24 Apr 2012, 10:46
Posts: 15
Hi robosavvy,

I haven't patched any files.
I just changed some in the "kernel menuconfig". As it's easier to configure all carambola params using Luci, I realized that there was a module called "luci-app-mmc-over-gpio".
I also installed filesystem modules:
- kmod-fs-ext4
- kmod-fs-vfat

I believe when the luci-app is installed all necessary kmod-mmc-* all installed too, as I walk through every menu to check all that smelt like "mmc" and everything was right fine.

Once you uploaded the new firmware, there is one more menu item under "SYSTEM" in luci. It's called "MMC/SD driver configuration".
There you have to activate the driver and set the pins to what you've used.
Mine are these:
DI = 11
DO = 9
CLK = 12
CS = 13
Mode = 0
Just remember to wire VCC (3,3) and both GNDs of the SD card.

After a reboot, you should see some kernel messages in the dmesg out.

Now, you just have to mount the new card.
> mount /dev/mmcblk0p1 /mnt/mmccard

I ran into some trouble installing python after that as the new modules have used more flash. My free space went a little low. I need the full python not the mini. I have installed it in the mmc card and it works like a charm. I haven't noticed the low speed.

Now I have to check the sources of the installed modules because when installing the mmc-over-gpio I'm not able to use the UART1. I believe I should change the shared mode to the 4 free & 4 uart and maybe change also some GPIO pins.


30 May 2012, 08:25
Profile

Joined: 25 Jan 2012, 15:04
Posts: 9
Thanks a lot for the reply.

We'll be giving this a try shortly.

Also let us know how it goes with UART1. We do need both UARTs (and SD card) in our set up.

We've been working with some other RALINK based board but we want to move to Carambola for a number of reasons, the most important being the 2 UARTs, SD card and chip antenna.

With regards to Python we've also experienced the same issue with low flash. When you say it works like a charm from MMC are you using the hack to increase the speed of SD (the one you posted) or are you using all default files?

Thanks
Pedro.


30 May 2012, 08:42
Profile

Joined: 14 May 2012, 15:48
Posts: 196


30 May 2012, 09:02
Profile

Joined: 22 May 2012, 21:23
Posts: 24
Just a random question:
Is'nt that dangerous to disable the linux standard output?
Imagine you board got buged and don't startup properly, you can't reverse the inittab back to original so you can't upload another version of the OS and the board is bricked. I did not see any JTAG or anything...
What do you think?


30 May 2012, 09:16
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 50 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.