I’ve written a simple data logger program, reading from a serial port and writing the data to an SD card and outputting some data on another serial port. On startup I read a text file on the SD card to retrieve some configuration parameters, if the SD card isn’t inserted then I use some default configuration parameters and don’t log to the SD card.
I’ve noticed that roughly every 2nd or 3rd attempt to download/deploy a new version of my software to the Hydra fails from Visual Studio if the SD card is inserted. If the SD card isn’t inserted then I never have a problem deploying a new version.
Typically I’ll be running my code with Visual Studio attached, then hit shift-F5 to detach, make a build change and then hit F5 to build/deploy/run.
The sympton is when a deploy fails with the SD card inserted is that Visual Studio will reboot the Hydra but the Debug output window stays blank. On a normal sucessful deploy the first line printed in the output window is: Found debugger! followed by a list of assemblies etc.
I call the following routine from ProgramStarted()
void InitStorage()
{
_sdCard = new GTM.GHIElectronics.SDCard(8);
if (_sdCard.IsCardInserted)
{
_sdCard.MountSDCard();
GT.StorageDevice storage = _sdCard.GetStorageDevice();
_sdRootDirectory = storage.RootDirectory;
string fileName = _sdRootDirectory + @ "\Logs\" + _startupTime.Year + "-" + _startupTime.Month + "-" + _startupTime.Day + "--" + _startupTime.Hour + "-" + _startupTime.Minute + "-" + _startupTime.Second + ".ftilog";
_dataLogFile = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.Read);
}
}
Are there any known issues with the SD card module and Hydra around these sorts of symptons?
Thanks