Jump to content
  • 0

Problems with Wi-Fire and SD card


ltheoret

Question

Hi,

I liked my WF32 so much i bought a uC32 and a Wi-Fire. Had a little issue with the uC32 board but got that resolved in an other post.

Now the Wi-Fire will not read the SD Card but the WF32 can. The wi-Fire can connect to the network but cannot display a server page as it fails to initialize or read the SD card.

I have been looking all over the forums for info but cannot find any info i understan about the Wi-Fire and SD card. Is there a simple way to test to see if my problem is software or hardware.

I was using the  deWebIOServer packare I found with an WF32 instructable. This works well with the WF32 and the wifi part works with the Wi-Fire also but not the SD Card part. I went out and purchased mor SD cards. the original was a 'Kinston 32GB micro SD HC I'. the 2 new ones are 'Kinston 16 GB misro SD HC I'. they all work with the WF32 but non work with the WI-Fire.

I used the SD example from the SD library and changed the SS from 4 to 52 and can read all the SD Cards with the Wi-Fire. Now does any body know why it does not work in the deWebIOServer server example? It also uses the SD library and SS is set to 52 by default.

Luc

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Hi,

No, this new build you suggested does not read the microSD card, but it seams to compile better on the Wifi end of it. I found the Arduino 1.6.5 with the ChipKIT core works the best but not properly with the Wi-Fire board. the WF32 works well with all compilers.

Woops Spoke too soon, I downloaded the wrong build. Now the microSD card works, Just cant connect to the network, It finds it but wont connect??

Thanks

 

Luc

Link to comment
Share on other sites

Luc,

Sorry about not getting back to you sooner.  I guess the SD library uses for loops to delay to meet timing and since the library was made for other PIC32 then the delays are adjusted for 80MHz not the WI-FIRE's 200MHz.

I'm trying to find a work around that doesn't involve modifying the SD card library.

Marshall

Link to comment
Share on other sites

Luc,

I was trying to talk to the engineer that wrote the SD card library but he is out for the holidays.  

There is an update in the works but I am unsure when it is supposed to be coming out.  

For a temporary solution, I did find where you can easily change the timing.  You should be able add just add NOPs to the spiSend() function found in the Sd2Card.cpp file in the SD library.  In theory you should be able to change the number of NOPs to (# of NOPS * 200)/80.  I think that would be close enough.

Sorry for not having a better solution at the moment. I'll get back to you when I hear back from one of our engineers next week.  He may have solved this problem but it isn't out in the release yet.

Hope this helps, best of luck and Happy New Year!

Marshall

Link to comment
Share on other sites

Looks like I have a similar problem. I don't have a WF32 to compare with, nor do I have another SD card to try (I'll do that next when I get a chance). But so far I have been unable to get anything SD card related working on my WI-FIRE. I tried increasing the number of NOPs in SD2Card.cpp as suggested, doesn't seem to have helped.

Link to comment
Share on other sites

Found a solution that works for me. Instead of MPIDE, I used arduino ide 1.6.7, and installed the latest github build of the chipkit core. http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core PR Builder/lastBuild/ . All of my SD card stuff is happy now. Note that the "official" beta chipkit core does not build anything correctly with 1.6.7, it truly was necessary to move to the bleeding edge dev build. Anyway, whatever the issue was, I guess they fixed it.

Link to comment
Share on other sites

Well I may have spoke to soon. The basic Cardinfo scrip always seems to work, and the htmlserver sometimes works, but more often than not I get a Failed to mount drive 0: Error: 3 error. I still need to try another sd card, but given that it can be read by cardinfo, I doubt that's it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...