chipKIT® Development Platform

Inspired by Arduino™

SD card with Ethernet

Created Fri, 19 Oct 2012 07:41:55 +0000 by Ian Billing


Ian Billing

Fri, 19 Oct 2012 07:41:55 +0000

I am having difficulty in getting the SD library to work with the ChiKitEthernet library.

I have a Max32 with Network shield and SD card.

With the network shield I am able to run a webserver, telnet client and compile and run all of the examples.

With the SD card I am able to read from the card and write to the card and run all of the examples.

However - as soon as I try to run the two together I loose access to the SD card.

As soon as the sketch executes Ethernet.begin()

The SD card functionality ceases.

There are a few references to this problem on the forums but I am unable to find a definitive solution.

All assistance is greatly appreciated.

Ian


Jacob Christ

Sun, 21 Oct 2012 11:53:41 +0000

Couple of thoughts...

#1 Make sure you are using the bleeding edge version of MPIDE since there have been a lot of fixes in the last few months and maybe not an official release.

#2 Initialize SD before Ethernet.

If you are still having problems report back here and we will get you up and running. I have both SD and Ethernet working together.

See video below:

http://www.youtube.com/watch?v=3ctn3qwlgRQ&list=FLFYaVs4It2fe5knXyDTs1ew&feature=mh_lolz

Jacob


Ian Billing

Tue, 23 Oct 2012 14:45:53 +0000

Thanks Jacob

I have tried 0023-20120819 0023-20120903 and 0023-20121013

The latest official release is 0903 which fails and the other two (unofficial) also fail.

The SD card works fine until I initialize the network shield with ethernet.begin() or ChipKitEthermet.begin() or DNETck::begin() - I have used all libraries but have the same problem.

I have intialized SD first and second and both ways it fails.

If I intitialize the SD first, then read from the SD card it is fine until I initialize the network shield - the all SD access fails.

Any help will be appreciated

Regards Ian


Jacob Christ

Tue, 23 Oct 2012 16:47:35 +0000

This sounds hauntingly familiar... I think there is a solution. It may require a new bootloader or something else. I'm going to point some others to this topic and see they can help out.

Jacob


Ian Billing

Tue, 23 Oct 2012 19:10:49 +0000

I have got some support from KeithV and I have followed his suggestions of uploading a new bootloader and moving to the latest mpide (20121013).

So at least I am up to date with the latest platform but, yes, I still am unable to access the SD card after I initialize the network shield

Regards Ian


kesi54

Sat, 10 Nov 2012 19:50:16 +0000

I am having this same issue with the WiFi shield on a uc32 board. I can successfully run the test programs for TCP echo server, and the SD card examples. When I try to use the SD card along with the WiFi it fails. I have tried including SD.begin(4) at the beginning of the setup() but for some reason the program seems to hang when I do this. I have not been able to find any example using both the networking and an SD card. I would greatly appreciate it if anyone could point me in the right direction.


kesi54

Wed, 14 Nov 2012 02:27:17 +0000

I actually solved my problem. Turned out to be something much simpler than I expected. The file name I was trying to use on the SD card was too long. I wasn't aware of the limited file name length. WiFi is working fine together with the SD card now that I am using a shorter file name.


Mark597

Sun, 02 Dec 2012 22:18:25 +0000

Did anybody find a solution to this problem? MAX32 + Ethernet + SD

I'm having the same problem as Ian. The SD stops as soon as the Ethernet.begin(mac, ip) is run.

Never mind I figured out the problem. I/O 7 is used by the Ethernet board.