problems with SD card #423
Replies: 19 comments
-
Posted at 2015-05-21 by @gfwilliams Can you try calling I'm pretty surprised appendFile gives you trouble though - that should have written everything to the SD card and closed the file. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-21 by JumJum This happened with an SD after formatting (long run) under windows.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-21 by @gfwilliams What is the filesystem type you are formatting to? It should be fat32, not exfat. And this is on a normal Espruino board, via the micro SD slot? Sure seems strange - plenty of people have been using this without issues. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-22 by JumJum Filesystem is fat32 on a normal Espruino board with micro SD slot. I'm working on a simple datalogger, reading values from several sensors over days and writing to file in JSON format. Will be used first to collect environmental data from mq-sensors, temperature, humidity, ....There is no big problem doing this with older version. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-22 by @gfwilliams Thanks for narrowing it down - 1v73 was the version with:
With this commit Looks to me like one thing that has changed is the SPI bit rate - it usually defaults to 100000, but it had been running the SD card at 1000000... Maybe you could try:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-22 by JumJum Sorry same problem, my testing is this:
BTW, called E.unmountSD and readdir/readFile still returns data. I will go back to 1v72 to get my small project running. Promised to my friends, to get it running this week. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-22 by @gfwilliams Thanks... I wonder whether it's having a file open and reading the directory at the same time? If you use repeated I'm kind of surprised 1v72 works and 1v73 doesn't in that case though.
Yes, calling any filesystem function will cause the SD card to be re-mounted... I'll file a bug for this and will see what I can do when I get a moment. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-22 by JumJum Yes, same problem with appendFile. This is where I started having problems. Instead of appending, it created new files with same name. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-27 by JumJum Just checked with 1v79 and an external sdcard (catalex SPI MicroSD Card Adapter V1.0) on Espruino V1.3. Connected like this:
Got same problems as mentioned above, lot of strange characters. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-28 by @gfwilliams What if you set the baud rate as suggested above:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-28 by JumJum Same problem with high baudrate, see images in entry 1 / 3 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-31 by JumJum Tested with DrAzzys bigram, because I need some more memory. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-01 by @gfwilliams Thanks for checking - I'll see what I can do about this today. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-01 by @gfwilliams Fixed! Sorry about that - it was a bit of a mess :( It'll be in the latest Git build, or 1v80 when it comes out. Looks like it was probably the append, and I think it was less likely you hit the problem when just reading and writing - why I never spotted anything when I initially made the change. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by @allObjects ...it looks like that it is time to build a test farm: a farm of connected Espruinos, each of them paired with key sensor/add-on boards to help to execute the regression tests... virtual testing just does not cut it anymore... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by LawrenceGrif @allObjects & @gordon I'm happy to set-up a rig as proposed and test releases. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by @gfwilliams I've actually already got two Espruino boards in my loft that I use for tests/benchmarking. In this case the SD code actually worked, for reading directories, and reading/writing files. AFAIK it was just appending them that was a problem - so hardly surprising it didn't pass the test. Benchmark code is here Perhaps we could come up with some simple design that we could share - like one board on top of the other, or perhaps even just one board with certain IO lines shorted. You just need to connect up Reset/BOOT0 pins so that one device can be reliably be put into bootloader mode. Then, we could all come up with a whole bunch of different tests to run. PS. the build with it fixes is here |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by JumJum Just finished testing and everything works fine with latest build. Thanks for fixing |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-02 by @gfwilliams Great! Thanks for letting me know! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-05-21 by JumJum
Writing to SD card creates strange results.
Sometimes file is created several times.
Sometimes file holds strange characters.
Sometimes readdir returns strange characters.
Please see attached screenshot.
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions