LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

MCB2300 SD card writing, without debugging

I am trying to write to a MicroSD card using a derivative board of the MCB2300 from Keil.

 

I am successfully able to write to the card, but only when the debugging is turned on. My application is eventually going to be a stand alone battery powered application so its pretty important for me to be able to save data on the card without debugging.

This is what my code looks like:

SD.png 

Does anyone have any suggestions as to why this code will not run without debugging?

 

Thanks. 

0 Kudos
Message 1 of 8
(7,833 Views)

govkid201,

 

         I haven't really seen any issues with turning debugging off. I've seen issues where turning it on makes code larger than the size limit and it won't run but the errors happen at compile. A couple of sanity steps to try would be writing to a different file name (e.g. M:\test.txt), try using a string constant with something simple in it (e.g. "data"), and also starting to write some of the information to the screen for debugging. I would start with outputting your timestamp string to the screen when debugging is turned off and then I would try unbundling the error cluster from each File I/O VI one at a time and write that string to the screen. This will tell us if the string is valid when debugging is turned off for whatever reason and also if the File I/O VI are running into any issues when debugging is turned off. I can't think of any logical reason why this would be happening but I have seen software do weird things so I'm not ruling anything out. I will also bring up the subject with our R&D team and see if they know of any issues or further troubleshooting steps. I assume that the code you posted is the only code that you are running and that it is not in a loop. If not, try just sliming it down to exactly what you posted and see if that works. Let me know what you find from the troubleshooting steps and I will post back when I have more information. Thanks! 

0 Kudos
Message 2 of 8
(7,816 Views)

I have tried different file names, as well as changing the directory. I have used just constants instead of a time stamp or other data.

My board doesn't have a screen, its a bare bones board that I built myself.

 

I have tried running very basic code, using just open/create file, write to text file (the data was "My VI works"), and close text file. still it only actually wrote to file with debugging on. 

 

 

0 Kudos
Message 3 of 8
(7,792 Views)

govkid201,

 

           I'm still waiting on getting feedback from our developers on the issue but I am trying to get hardware setup so I can try to replicate the issue here. I noticed that the MCB2300 has a SD card slot under the screen. Are you using a MicroSD card with a MicroSD to SD adapter or did you mean you are using a SD card? We have both but I just needed to know which to use. Thanks! 

0 Kudos
Message 4 of 8
(7,783 Views)
actually both. I built a custom board with the LPC2378 processor that is based on the MCB2300. I used a microsd card slot on that board. i saw that it was only able to write with debugging on. I then tried using a microsd card adapter to use the standard SD slot on a MCB2300 board that was available in the lab. Both yielded the same result. I did not have a standard SD card to try with the MCB2300.
0 Kudos
Message 5 of 8
(7,779 Views)

govkid201,

 

            I have been trying to replicate the issue for the past 3 hours with no success. No matter what permutation I try, my code will always write a file whether debugging is on or off. Take a look at my screenshots of my code:

Untitled.png 

 

Untitled1.png

 

Am I missing anything major that would be causing mine to work and not yours? I have also attached a Project that has my Read and Write applications (I created two separate VIs but I also used a SD card reader to check it on my computer between runs). Check it out and see if it runs on yours (make sure and rebuild the applications). I also wanted to point you to this example because I didn't know if you had tried it either (http://decibel.ni.com/content/docs/DOC-6254). Let me know if you see anything different because I can't seem to get it to break. Thanks!

0 Kudos
Message 6 of 8
(7,760 Views)

govkid201,

 

       Still having issues with writing to the SD card? Give us a shout out so we know where things stand. Good luck! 

0 Kudos
Message 7 of 8
(7,728 Views)
Well I have actually finished my work on the project. I was never able to get it working. What I am going to do is pass the information on to the guys who are taking over the project. Thank you for you help.
0 Kudos
Message 8 of 8
(7,726 Views)