Show Posts
Pages: 1 [2] 3 4 ... 109
16  Using Arduino / Storage / Re: SD.h library on: August 07, 2014, 01:37:04 pm
SD.h is old and buggy.  It is a wrapper for an old version of SdFat that I wrote in 2009.

You added a bug to the example that caused a memory leak so it is now really broken.

Code:
      Serial.println(entry.size(), DEC);
     }
     entry.close();  <-------- Don't remove this, it frees memory.
   }

The example stopped listing files when free memory was exhausted.

You don't need these but they won't hurt.
Code:
      // no more files
       Serial.println("**nomorefiles**");
       entry.rewindDirectory();  <--------------- Not needed
       entry.close();  <-------------------------  Not needed, the file didn't open so there is no memory.
       break;

This is what was listed on the first call.  Files are not sorted so it is correct.
Quote
001.TXT      33
002.TXT      15
003.TXT      15
004.TXT      13
005.TXT      15
006.TXT      15
007.TXT      15
008.TXT      15
009.TXT      185
NEWFOL~2/
   006.TXT      15
   007.TXT      15
   008.TXT      15
   009.TXT      185
   001.TXT      33
   002.TXT      15
   003.TXT      15
   004.TXT      13
   005.TXT      15
**nomorefiles**
**nomorefiles**

Here is where you ran out of memory on the second call.
Quote
001.TXT      33
002.TXT      15
003.TXT      15
**nomorefiles**  <------------------ Memory gone

Here is the third call, no memory so no list.
Quote
**nomorefiles**

SdFat does not use dynamic memory.  This happen due to poor design of the SD.h wrapper which allocates memory when you open a file and frees it when you close a file.

I just posted a new version of SdFat http://forum.arduino.cc/index.php?topic=259317.0.  It has an ls() function so you don't need to write a list files function.  Download it and look at the examples.  It's far more complex than SD.h, that's why the Arduino company wrote the SD.h wrapper to reduce the number of API functions.
17  Using Arduino / Storage / SdFat update on GitHub on: August 05, 2014, 02:21:20 pm
I have posted a new version of SdFat on GitHub https://github.com/greiman/SdFat.

This version of SdFat has a large number of internal modifications.  I have done a number of tests but I suspect it may break some applications.  Please try this SdFat library and report any problems.

Try the LowLatencyLogger example, it uses one of the new features.  It is easily modifiable and does not use an RTOS or tricky ISR.  I was able to log four analog pins on an Uno at 500 Hz and at 5000 Hz on a Due.  I used a low cost class 4 SanDisk card.

Here are the three functions I used.  You need to modify these for your needs.
Code:
const uint8_t ADC_DIM = 4;
struct data_t {
  unsigned long time;
  unsigned short adc[ADC_DIM];
};

// Acquire a data record.
void acquireData(data_t* data) {
  data->time = micros();
  for (int i = 0; i < ADC_DIM; i++) {
    data->adc[i] = analogRead(i);
  }
}

// Print a data record.
void printData(Print* pr, data_t* data) {
  pr->print(data->time);
  for (int i = 0; i < ADC_DIM; i++) {
    pr->write(',');  
    pr->print(data->adc[i]);
  }
  pr->println();
}

// Print data header.
void printHeader(Print* pr) {
  pr->print(F("time"));
  for (int i = 0; i < ADC_DIM; i++) {
    pr->print(F(",adc"));
    pr->print(i);
  }
  pr->println();
}

I have added several new examples, deleted a few, and modified many of the rest.

The StdioBench example demonstrates another feature I am working on, stdio style I/O.  The StdioStream class has stdio style buffering with a configurable amount of ungetc() push-back to make parsing easier.

Here are results comparing Arduino Print with StdioStream formatting on Uno.
Quote
Starting test
uint8_t 0 to 255, 100 times
fileSize: 116500
print millis: 6180
stdio millis: 837
ratio: 7.38

uint16_t 0 to 20000
fileSize: 128890
print millis: 6500
stdio millis: 863
ratio: 7.53

uint32_t 0 to 20000
fileSize: 128890
print millis: 6475
stdio millis: 962
ratio: 6.73

uint32_t 1000000000 to 1000010000
fileSize: 120000
print millis: 5771
stdio millis: 866
ratio: 6.66

float nnn.ffff, 10000 times
fileSize: 100000
print millis: 9366
stdio millis: 1498
ratio: 6.25
18  Using Arduino / Storage / Re: Suggest a temporary storage? on: August 04, 2014, 08:29:51 am
You will still get over 30 years of use from a FRAM chip.

28 sensors at 200/sec is only 5,600 values per second.  That's not a lot of data for FRAM. You could write 40 bytes per value for 30 years.
19  Using Arduino / Storage / Re: can't initialize SDcard anymore - Ard. UNO on: August 04, 2014, 08:22:04 am
The attached zip file contains a new development version of SdFat with a new version of the QuickStart.ino example.

Please place the SdFat folder in you libraries folder, run the QuickStart example, and post the output.

QuickStart.ino is designed to diagnose initialization problems.  QuickStart is in the SdFat/examples/QuickStart folder.

I wrote the old version of SdFat that is used in SD.h but it is old and buggy so I don't want to diagnose your problem using SD.h.
20  Using Arduino / Storage / Re: Suggest a temporary storage? on: August 04, 2014, 06:32:59 am
Wow!  You must plan on logging a lot of data.  

The Fuji FRAM is good for over a trillion read/write cycles so the chip is good for over 100,000 TB if you don't burn one location.

If you fill it once a second, it will last for  1,000,000,000/(365*24*3600)  = 31 years.

Te 23LC1024 is also a good solution.  I use them also as a RAM disk http://forum.arduino.cc/index.php?topic=229485.0.
21  Using Arduino / Storage / Re: Suggest a temporary storage? on: August 03, 2014, 05:07:20 pm
FRAM might work.  Here is a chip I like http://forum.arduino.cc/index.php?topic=236038.0.

The 256KB chip is 3.3V and would be easy to interface.

I don't know how much power it would draw while writing at 8 MHz.  I expect less than at 25 MHz SPI.  It is low power when idle.  Write time is very short at SPI bus speeds.
Quote
Operating power supply current 10.6 mA (Max@25 MHz)
Standby current 35 μA (Typical), 150 μA (Max)
Sleep current 10 μA (Max)
22  Using Arduino / Storage / Re: SdFat recursive File listing on: August 02, 2014, 04:14:36 pm
Hope your path will not be too deep if you have an Uno.  You are using a lot of memory on the stack for each level of recursion.

You will  need to maintain the path in a global variable as part of the recursion or maintain a list of pointers to each directory file in a global array. 
23  Using Arduino / Storage / Re: SdFat recursive File listing on: August 02, 2014, 01:58:23 pm
Here is an ls() function like your pf().  It recursively list files in a subdir.
Code:
#include <SdFat.h>

const uint8_t SD_CHIP_SELECT = 10;
SdFat  sd;
//--------------------------------------------------------------
void ls(char *path) {
  SdBaseFile dir;
  if (!dir.open(path, O_READ) || !dir.isDir()) {
    Serial.println("bad dir");
    return;
  }
  dir.ls(&Serial, LS_R);
}
//-------------------------------------------------------------
void setup() {
  Serial.begin(9600);
  if (!sd.begin(SD_CHIP_SELECT)) sd.errorHalt();
  sd.ls(&Serial, LS_R);
  Serial.println("Done with root");
  ls("DIR0");
  Serial.println("Done with DIR0");
}
void loop() {}

Here is output
Quote
A0.TXT
B0.TXT
DIR0/
  A1.TXT
  B1.TXT
  DIR1/
    A2.TXT
    B2.TXT
Done with root
A1.TXT
B1.TXT
DIR1/
  A2.TXT
  B2.TXT
Done with DIR0
24  Using Arduino / Storage / Re: SdFat recursive File listing on: August 02, 2014, 01:22:07 pm
This changes the file that sd.vwd() point to.
Code:
 sd.chdir(dir);

Restoring the position has no meaning since sd.vwd() now is a handle for "dir", not the file that you referenced with this.

Code:
 pos = sd.vwd()->curPosition();

You can not modify a global variable in a recursive function and have recursion work correctly.

What feature do you need in ls()?
25  Using Arduino / Storage / Re: Benchmarks for new SanDisk and Samsung MicroSDs on: August 02, 2014, 12:18:05 pm
The list was too long for the forum limit so here are the Samsung cards.

Here is a Samsung 16 GB Evo http://www.amazon.com/gp/product/B00IVPU7KE
Quote
Samsung Evo 16 GB

Type is FAT32
Card size: 15.72 GB (GB = 1E9 bytes)

Manufacturer ID: 0X1B
OEM ID: SM
Product: 00000
Version: 1.0
Serial number: 0X2A620035
Manufacturing date: 3/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
322.44,28452,1424,1582
317.18,28356,1424,1608
316.62,26956,1424,1611
317.52,31996,1424,1606
318.11,26992,1424,1603
317.96,32592,1424,1604
318.37,33372,1424,1602
318.78,27456,1424,1600
318.71,26896,1424,1600
319.06,27464,1424,1599

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
501.88,2024,1004,1014
501.93,2024,1004,1014
501.88,2024,1004,1014
501.93,2024,1004,1014
501.82,2024,1004,1014

Here is the 32 GB Samsung Evo http://www.amazon.com/gp/product/B00IVPU7KE.
Quote
Samsung Evo 32 GB

Type is FAT32
Card size: 31.44 GB (GB = 1E9 bytes)

Manufacturer ID: 0X1B
OEM ID: SM
Product: 00000
Version: 1.0
Serial number: 0X780282A4
Manufacturing date: 5/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
330.58,30080,1444,1543
328.24,29600,1492,1554
327.93,27408,1492,1555
328.69,27320,1492,1551
328.45,27052,1492,1553
327.48,43476,1492,1557
328.71,27372,1492,1552
328.75,28084,1492,1551
328.28,27376,1492,1553
328.86,35408,1492,1551

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
502.43,2016,1004,1013
502.38,2012,1004,1013
502.28,2016,1004,1013
502.33,2016,1004,1013
502.28,2016,1004,1013

The Samsung Pro is great on the PC and STM32 but not so much on Uno http://www.amazon.com/gp/product/B00IVPU7DG.
Quote
Samsung Pro 16 GB

Type is FAT32
Card size: 16.00 GB (GB = 1E9 bytes)

Manufacturer ID: 0X1B
OEM ID: SM
Product: 00000
Version: 1.0
Serial number: 0X9B541463
Manufacturing date: 3/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
276.96,36204,1424,1843
257.49,37008,1492,1982
257.81,36996,1492,1980
258.64,36964,1492,1973
258.58,36040,1488,1974
258.93,36900,1492,1971
259.63,35216,1488,1966
260.17,37708,1488,1962
260.05,36068,1492,1963
260.48,36088,1492,1959

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
501.22,2024,1004,1015
501.17,2020,1004,1016
501.27,2016,1004,1015
501.27,2020,1004,1015
501.32,2016,1004,1015

The 32 GB Samsung Pro http://www.amazon.com/gp/product/B00IVPU7DG.
Quote
Samsung Pro 32 GB

Type is FAT32
Card size: 32.01 GB (GB = 1E9 bytes)

Manufacturer ID: 0X1B
OEM ID: SM
Product: 00000
Version: 1.0
Serial number: 0XFC5E3635
Manufacturing date: 4/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
287.27,24024,1432,1776
278.77,24996,1496,1830
279.69,23140,1496,1824
280.09,23568,1496,1822
280.20,22452,1492,1821
281.04,22140,1496,1816
280.79,25672,1496,1817
280.99,23224,1496,1816
282.32,25372,1496,1807
282.13,26596,1496,1808

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
503.95,2012,1000,1010
503.85,2012,1000,1010
503.85,2008,1000,1010
503.90,2008,1000,1010
503.80,2012,1000,1010

Finally don't buy the Samsung 8 GB class 6 card http://www.amazon.com/gp/product/B00IVPU6GO. It has poor max write latency.
Quote
Samsung 8 GB class 6

Type is FAT32
Card size: 7.89 GB (GB = 1E9 bytes)

Manufacturer ID: 0X1B
OEM ID: SM
Product: 00000
Version: 1.0
Serial number: 0X450D3E3
Manufacturing date: 2/2014

File size 5 MB
Buffer size 512 bytes
Starting write test, please wait.

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
234.74,98936,1708,2175
244.84,104760,1716,2085
247.08,104732,1712,2066
248.74,104888,1716,2052
247.06,105728,1712,2066
249.14,105096,1716,2049
247.06,98920,1712,2066
248.81,105164,1712,2051
247.01,95652,1716,2065
248.46,104932,1712,2054

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
469.85,3188,1036,1084
469.89,2560,1036,1084
469.81,2564,1036,1084
469.85,2568,1036,1084
435.17,47756,1032,1171
26  Using Arduino / Storage / Benchmarks for new SanDisk and Samsung MicroSDs on: August 02, 2014, 12:15:32 pm
I recently bought a number of high end MicroSD cards for SDIO tests on fast STM32 micros.  Performance with 4-bit SDIO is great, read/write at over 20 MB/sec is possible.

I decided to benchmark these cards on an Uno.  Performance is limited since these cards were not designed for SPI.

Here is a long list of benchmarks.   Each test has 10 reps of writing a 5 MB file and five reps of reading a 5 MB file. The biggest difference is write speed and maximum write latency.  

First let me warn you that there are many fake cards floating around.  The first result is a fake SanDisk 8 GB Ultra sold on Amazon by  Nano-Real www.amazon.com/gp/product/B0085EG6OW.

Note the slow, 76 KB/sec, write speed and long , over 140 ms, max write latency.
Quote
Fake 8 GB Ultra

Type is FAT32
Card size: 7.99 GB (GB = 1E9 bytes)

Manufacturer ID: 0X12
OEM ID: 4V
Product: MS
Version: 0.0
Serial number: 0XE1480000
Manufacturing date: 5/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
75.86,144628,2472,6741
76.34,142692,4740,6698
76.36,142648,4732,6697
76.33,142756,4732,6699
76.20,148644,4732,6711
76.37,142544,4728,6695
76.39,142628,4736,6694
76.43,142504,4724,6690
76.31,142584,4728,6701
76.44,142612,4728,6690

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
341.44,2332,1164,1493
341.44,2324,1164,1493
341.44,2332,1164,1493
341.46,2336,1164,1493
341.44,2332,1164,1494

Here is a real SanDisk 16 GB Ultra http://www.amazon.com/gp/product/B007XZM6VG.  Much better.
Quote
16 GB SanDisk Ultra

Type is FAT32
Card size: 15.93 GB (GB = 1E9 bytes)

Manufacturer ID: 0X3
OEM ID: SD
Product: SL16G
Version: 8.0
Serial number: 0XFC434325
Manufacturing date: 4/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
251.28,22896,1696,2031
250.98,20788,1696,2034
250.61,32348,1696,2037
251.15,20412,1684,2032
250.76,20664,1700,2035
251.30,20036,1696,2031
251.01,19960,1696,2032
251.48,20056,1664,2030
251.24,20736,1672,2032
250.92,20160,1696,2034

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
500.07,2028,1000,1018
500.17,2024,1000,1018
500.12,2028,1000,1018
500.02,2020,996,1018
500.07,2020,1000,1018

Here is a strange result, the 32 GB version is not very good for write latency on SPI but OK on STM32 with SDIO http://www.amazon.com/gp/product/B007XZM6VG.
Quote
SanDisk 32 GB Ultra

Type is FAT32
Card size: 31.91 GB (GB = 1E9 bytes)

Manufacturer ID: 0X3
OEM ID: SD
Product: SL32G
Version: 8.0
Serial number: 0XC2E6F10D
Manufacturing date: 6/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
241.93,75572,1608,2110
246.17,69084,1620,2073
242.12,79292,1624,2108
245.67,76168,1620,2078
243.48,85104,1620,2096
241.57,63892,1624,2113
244.10,78440,1616,2091
244.94,70436,1624,2084
239.76,90892,1624,2129
243.35,82420,1620,2097

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
480.74,2428,1044,1059
480.74,2420,1044,1059
480.78,2424,1044,1059
480.78,2428,1044,1059
480.83,2428,1044,1059

Here is the 16 GB SanDisk Extreme http://www.amazon.com/gp/product/B00FRHTXR2.  Very good max write latency.
Quote
SanDisk 16 GB Extreme

Type is FAT32
Card size: 15.93 GB (GB = 1E9 bytes)

Manufacturer ID: 0X3
OEM ID: SD
Product: SE16G
Version: 8.0
Serial number: 0X3752B221
Manufacturing date: 10/2013

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
287.22,10724,1484,1776
296.38,10556,1592,1721
295.38,10552,1624,1727
295.14,10556,1588,1729
295.16,10564,1624,1728
295.28,10564,1624,1728
295.25,10548,1588,1728
295.28,10568,1624,1728
295.30,10552,1584,1728
295.07,10544,1624,1729

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
495.41,2036,1004,1027
495.46,2032,1004,1027
495.46,2020,1004,1027
495.56,2020,1004,1027
495.46,2032,1004,1027

The SanDisk 32 GB Extreme is also good http://www.amazon.com/gp/product/B00FRHTXR2.
Quote
SandDisk 32 GB Extreme

Type is FAT32
Card size: 31.91 GB (GB = 1E9 bytes)

Manufacturer ID: 0X3
OEM ID: SD
Product: SE32G
Version: 8.0
Serial number: 0XF6D24F1
Manufacturing date: 5/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
282.76,10768,1504,1805
292.53,10624,1644,1744
292.28,10596,1648,1746
292.45,10332,1644,1744
292.05,10588,1608,1747
292.50,10600,1648,1744
292.29,10628,1648,1745
292.34,10604,1644,1745
292.46,10604,1648,1744
292.46,10612,1608,1744

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
487.54,2060,1016,1044
487.58,2056,1016,1044
487.54,2064,1012,1044
487.58,2056,1016,1044
487.58,2060,1016,1044

Here is a lower cost SanDisk 8 GB class 4 card http://www.amazon.com/SanDisk-microSD-High-Capacity-microSDHC/dp/B00488G6P8 .  Not bad.
Quote
SandDisk 8 GB class 4

Type is FAT32
Card size: 7.95 GB (GB = 1E9 bytes)

Manufacturer ID: 0X3
OEM ID: SD
Product: SS08G
Version: 8.0
Serial number: 0XE40B0A50
Manufacturing date: 3/2014

File size 5 MB
Buffer size 512 bytes

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
262.33,21176,1636,1945
260.62,25600,1648,1958
260.03,21880,1648,1963
260.63,17612,1612,1958
260.32,19124,1624,1961
260.21,17396,1604,1961
260.74,17220,1648,1957
260.29,17696,1616,1961
260.79,17220,1600,1957
260.28,18920,1644,1961

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
484.18,2088,1040,1051
484.23,2092,1040,1051
484.23,2092,1040,1051
484.18,2096,1040,1051
484.18,2096,1040,1051
27  Using Arduino / Storage / Re: SdFat recursive File listing on: August 02, 2014, 08:22:50 am
Here is the problem.
Code:
 sd.chdir(dir);

This changes sd.vwd() to a different directory so the recursion will not work.  Your in the wrong directory when the recursive call returns.

You need to keep the state of the directory at every level.

That's why ls() does the recursion like this with an additional file, s.
Code:
     SdBaseFile s;
      if (s.open(this, index, O_READ)) s.ls(pr, flags, indent + 2);

I wrote ls() quickly a long time ago and should revisit ls().  I may do that soon since I am writing a new generic FAT filesystem that is not SD or Arduino dependent.
28  Using Arduino / Storage / Counterfeit SD Cards. on: August 01, 2014, 05:05:42 pm
I recently bought a number of SanDisk cards from Amazon and some from Amazon sellers.   Several were counterfeit.

Here is an example.  I bought Sandisk Ultra 8GB, 16GB, and 32GB.  The 8GB is clearly counterfeit  Here is it's CID and a performance test:
Quote
Manufacturer ID: 0X12
OEM ID: 4V
Product: MS
Version: 0.0
Manufacturing date: 5/2014

Type is FAT32
Card size: 7.99 GB
File size 5 MB
Buffer size 512 bytes
Starting write test, please wait.

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
70.61,137276,2476,7242
70.77,136732,5280,7226
70.96,119376,5276,7206
71.02,119312,5216,7200
70.93,119272,5276,7210
71.03,119172,5216,7199
71.04,119156,5212,7198
71.04,119112,5216,7199
70.93,119152,5212,7209
71.03,119132,5212,7199
Starting read test, please wait.

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
263.50,80812,1168,1937
264.59,2856,1168,1929
264.59,2856,1164,1929
264.60,2860,1168,1929
264.59,2860,1168,1929

The write speed, 71 KB/se,c and write latency,119 ms, are really poor.  The CID is totally wrong.

Here is the 16 GB version of the card.  I think it is genuine.
Quote
Manufacturer ID: 0X3
OEM ID: SD
Product: SL16G
Version: 8.0
Manufacturing date: 4/2014

Type is FAT32
Card size: 15.93 GB
File size 5 MB
Buffer size 512 bytes
Starting write test, please wait.

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
243.48,20076,1740,2096
243.57,21888,1744,2096
243.96,21560,1740,2092
243.51,22836,1744,2096
243.84,21416,1744,2093
243.46,20164,1712,2096
243.64,20392,1744,2095
243.74,22168,1744,2094
243.90,20640,1744,2093
243.82,21536,1740,2093
Starting read test, please wait.

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
496.94,2052,1004,1024
497.08,2056,1004,1024
497.04,2056,1004,1024
496.99,2056,1004,1024
497.04,2060,1004,1024
Seems OK.  New cards don't do too well on SPI but 243 KB/sec is way better than 71 KB/sec and 20 ms compared to 119 ms for write latency.

Here is a 32 GB that seems to have a good CID but poor latency.
Quote
Manufacturer ID: 0X3
OEM ID: SD
Product: SL32G
Version: 8.0
Manufacturing date: 6/2014

Type is FAT32
Card size: 31.91 GB
File size 5 MB
Buffer size 512 bytes
Starting write test, please wait.

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
243.57,78984,1624,2096
242.66,69304,1620,2103
245.36,77012,1612,2080
242.28,76568,1624,2107
246.34,98144,1620,2072
244.45,68888,1620,2088
241.52,100384,1616,2113
243.85,96224,1624,2093
243.36,74688,1620,2097
243.53,93152,1620,2096
Starting read test, please wait.

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
480.83,2412,1044,1059
480.83,2416,1044,1059
480.83,2424,1044,1059
480.88,2416,1044,1059
480.88,2412,1044,1059
The long unstable write latency might mean it's not genuine.  I don't have another 32 GB card.  I have another 16 GB card and it has short write latency.

Kind of disgusting.
29  Development / Suggestions for the Arduino Project / Re: Does Arduino have a future? on: July 28, 2014, 08:51:44 am
Quote
Unfortunately, there is no way to create OS-like functionality without incurring some overhead.
Modern embedded OSes are often more efficient than ad hoc solutions.  The algorithms in these systems have been under development for over 40 years.  It's like the difference between a bubble sort and quick sort.

Quote
A lot of intermediate-sized OS development gets distracted by "real time", which complicates everything and may not be necessary (arguably, Arduino is already NOT "real-time.")
Real-time and RTOS are unfortunate terms for an OS designed for embedded systems.  It's not about fast, it's about appropriate features.

Here are some quotes from "Introduction to Embedded Systems" by Lee & Seshia.  Download link  http://leeseshia.org/download.html
Quote
The computers in embedded systems often do not interact directly with humans in the same way that desktop or handheld computers do. As a consequence, the collection of services that they need from an operating system (OS) may be very different. The dominant general-purpose OSs for desktops today, Microsoft Windows, Mac OS X, and Linux, provide services that may or may not be required in an embedded processor.

An OS for embedded systems should have a few additional featues.
Quote
These OSs share many features with general-purpose OSs, but typically have specialized the kernel to become a real-time operating system (RTOS). An RTOS provides bounded latency on interrupt servicing as well as a scheduler for processes that takes into account real-time constraints.

A microkernel and modularity is desirable.
Quote
The core of any operating system is the kernel, which controls the order in which processes are executed, how memory is used, and how information is communicated to peripheral devices and networks (via device drivers). A microkernel is very small operating system that provides only these services (or even a subset of these services).

I also believe features to support the "Internet of Things" are also important.  The OS should make it easy to inter-operate with phones and other modern smart devices.

Quote
The problem is that there are thousands of RTOS to choose from, but drivers and middleware for them is lacking. I think this is one area where diversity doesn't help, and a single standard would allow people to develop drivers and middleware instead of re-inventing the RTOS.
I have evaluated RTOSes for many years.  If you screen the long list of OSes with a few key requirements such as HAL support or driver support for your chip and a modular micokernel, the list will soon be reduced to a manageable size.

The major chip companies all support an RTOS with FreeRTOS being most popular.

RTOSes are now used in the majority of 32-bit embedded systems.  Billions of copies of OSes like VxWorks and FreeRTOS are now in every day products.
30  Using Arduino / Storage / Re: SD card adapter bought on ebay on: July 27, 2014, 04:29:57 pm
Quote
I have one of those,  and it works fine with 5V supply and 5V on the signal lines.

The LC Studio modules do work with some SD cards.  I have checked several cases where cards work.  The card draws a lot of current on the 5V signal lines which may not good for the card or the Arduino  The Arduino can only supply enough current to reach about 4 V on the signal lines.

The card input lines should not draw current so I think the excess current is due to input protection devices in the card.

Not a desirable condition.
Pages: 1 [2] 3 4 ... 109