Main Site Documentation

Cerberus + Sd-Card problems, please


#1

Hi GHI teams, for my first post on this forum i want say thanks for your work :wink:

I have many problem with sd-card and my cerberus based project, all card i put on reader dont want mount: FAT 32 blah blah in debug mode …and i not alone in this case.

Can you give me a date for the release of a patch, or can you give me other way ?

Best regards.

ps: latest firmware loaded, Board is Cerberus 1.1, latest Framework is used.


#2

We have an SDK coming in few days that fixes many issues in the SD drivers for cerberus. I think it should solve most problems

Welcome to the community.


#3

What’s the latest release date/time for the fix?


#4

Like I said only 2 days ago, few days :slight_smile:


#5

The programmer’s tautology “Only a few days…”. :slight_smile:


#6

yea… :stuck_out_tongue:


#7

We have redbull, coffee and other caffeine products everywhere and working very hard to make it happen ASAP :slight_smile: The SDK has been done for 2 weeks but little things keep popping up…so yeah, few days :slight_smile:

From what I know, if a software developer gave you an exact completion date/time, they are only guessing at best.


#8

That image reminded me immediately of the magazine ads from the late 80s early 90s for the linker (I think it was blinker) where they showed the developer that had turned to a skeleton waiting for his code to be linked.


#9

I was hoping you were just pulling a Scotty, Gus. For the record though, a couple or few days to me means less than a week so I’ll follow up in about 3 days. :slight_smile:


#10

An exact date is the way a developer politely tells you to go away.


#11

You got it


#12

I may have stumbled on a temporary solution for SD card writing for the Cerb family boards. I received a Cerberuino today to tinker with. I was able to mount and use the same SD card having issues with the SD card module and Cerberus board using its onboard SD holder. So I tried the same code in a new program for the Cerberus board without using the SD card module in the diagram but using the module physically. It worked as it did with the Cerberuino!

I modified the code in the #4 post located here:
http://www.ghielectronics.com/community/forum/topic?id=10052

Here’s my version:

using System;
using System.Collections;
using System.Threading;
using System.IO;

using Microsoft.SPOT;
using Microsoft.SPOT.IO;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;

namespace DigAnaMon_SDcheck
{
    public partial class Program
    {
        private GT.Timer _timer;
        private string _root;
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            
            GHI.OSHW.Hardware.StorageDev.MountSD();
            if (VolumeInfo.GetVolumes()[0].IsFormatted)
            {
                _root = VolumeInfo.GetVolumes()[0].RootDirectory;
                _timer = new GT.Timer(5000);
                _timer.Tick += new GT.Timer.TickEventHandler(TimerTick);
                _timer.Start();
            }


            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
        }

        void TimerTick(GT.Timer timer)
        {
            string fileName = Path.Combine(_root, "file.txt");
            Stream stream;
            if (File.Exists(fileName))
            {
                stream = File.OpenWrite(fileName);
                stream.Position = stream.Length;
                Debug.Print("Opening file...");
            }
            else
            {
                stream = File.Create(fileName);
                Debug.Print("File not found so creating file.txt");
            }
            using (var writer = new StreamWriter(stream))
            {
                writer.WriteLine(Guid.NewGuid().ToString());
                Debug.Print("Writing to file");
            }
            stream.Dispose();
            Debug.Print("File closed after write");
            timer.Stop();
        }

    }
}