Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

HABOT

Member Since 19 Feb 2013
Offline Last Active Jan 25 2015 12:20 AM
-----

Topics I've Started

Slow I/O to MicroSD

28 April 2014 - 08:09 PM

Hello,

 

I'm reading an array of sensor on a periodic basis (every 10 milliseconds) and making some pre-parsing on the data before posting data to another MCU. I try to take care of the almost 192KB of available RAM that NP2 supports but some times other background running processes just hang up when some memory limit is reached.

 

The operation I'm taking about is very memory consuming so I decided to implement a "memory swapping" strategy by creating a library that writes data to disk (MicroSD) based on file segments and data block layout. A worker thread reads the cursor on the swapping area and takes the data back when needed. Data cursor is administered by the library.

 

It works perfectly but It slowed down the core loop because writing to the MicroSD and then reading again at a high rate seems to be very expensive or just very slow. I tried to find a 2GB MicroSD with a higher speed Class than Class 2, but they don't exist.

 

I also tried by formatting the MicroSD with different FAT32 allocation blocks and it worked at maximum rate by allocating blocks of 4096 bytes (using one allocation block on many writings therefore avoiding continuos allocation).

 

 

I wonder if is there another strategy or way to perform I/O at a high rate on the microSD card avoiding this bottleneck?

 

thanks!


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.