SD Card

A 40 Pin Dip packaged development board enabling you to create internet connected products

SD Card

Postby wpfundstein » Wed Oct 22, 2014 10:59 pm

Hi,

SD Card is not working. i use mbed compiler.

code (mbed)
Code: Select all
SDFileSystem sd(p16, p15, p13, p17, "sd"); // MOSI, MISO, SCK, CS

    FILE *fp = fopen("/sd/sdtest.txt", "w");
    if (fp) {
        fprintf(fp, "Hello fun SD Card World!");
        fclose(fp);
        pc.printf("write SD card done\r\n");
    } else {
        pc.printf("Could not open file for write\r\n");
    }


if i use the same code on mbed LPC1768 then it works,

the Wifi-DipCortex has two SPI Interfaces. Right? SPI-1 is for the CC3000 and SPI-0 is available for other. is this right?

Werner
wpfundstein
 
Posts: 7
Joined: Fri Oct 03, 2014 12:08 am

Re: SD Card

Postby Carl-SolderSplash » Sun Oct 26, 2014 9:48 am

Hi,

I've not used that library before.

SPI1 is used by the CC3000, SPI0 is free.

The SD library could be changing part of the SPI peripheral configuration which effects both ports.

To solve this you really need to dig in to the code.

When you say it doesn't work, do you mean at all? so no wifi connection? does it enumerate on USB?
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: SD Card

Postby wpfundstein » Tue Nov 04, 2014 1:00 pm

Hi, thanks for answer.

if i power up i can see signals on the spi. the problem is the fopen command. if i use no SD Card i got the error "no sdcard inserteed". otherwise the code hangs on fopen.

Werner
wpfundstein
 
Posts: 7
Joined: Fri Oct 03, 2014 12:08 am


Return to WiFi DipCortex

Who is online

Users browsing this forum: No registered users and 5 guests

cron