Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 21 Apr 2006 02:28 PM by  Anonymous
Need help with CF Drivers
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages
ryu2112
New Member
New Member
Posts:


--
09 Apr 2006 10:22 PM
    Hello, I am using the CF drivers from the bsps package (lh79520_sdk_cf_driver.c) provided by sharp and I am having a lot of trouble.

    What I am trying to do is read data from the compact flash card given a sector. (as told by the bsps code).

    this is what i have:
    RAM_STAT is linked to the SDRAM on my Logic Board. (i am only writing 16 bytes for testing purposes).

    typedef struct
    {
    UNS_16 data1;
    UNS_16 data2;
    UNS_16 data3;
    UNS_16 data4;
    UNS_16 data5;
    UNS_16 data6;
    UNS_16 data7;
    UNS_16 data8;

    } RAM_START;

    #define RAM_ADD (0x00000000)
    #define RAM_STAT ((RAM_START *)(RAM_ADD))

    int main(void)
    {
    UNS_16 data[256];

    cfmem_init () //initialize
    cfmem_set_sector (5); //set sector number
    cfmem_start_sector_read();
    cfmem_read_data (data, sizeof(data));


    (RAM_STAT->data1) = (UNS_16) data[0];
    (RAM_STAT->data2) = (UNS_16) data[1];
    (RAM_STAT->data3) = (UNS_16) data[2];
    (RAM_STAT->data4) = (UNS_16) data[3];
    (RAM_STAT->data5) = (UNS_16) data[4];
    (RAM_STAT->data6) = (UNS_16) data[5];
    (RAM_STAT->data7) = (UNS_16) data[6];
    (RAM_STAT->data8) = (UNS_16) data[7];

    return 0;
    }


    After i execute the code, I examine the SDRAM location of where I stored the data, and the data is always "0xFFFF". I tried changing to different sectors, but I still get the same results. Can anybody help?
    Anonymous
    Posts:


    --
    21 Apr 2006 02:28 PM
    Hi Andy,

    Since it's been awhile since you've posted this with no response I would recommend contacting Sharp for assistance on this if you haven't already. Sharp also has forums here:

    http://forums.sharpsma.com/

    Thanks,
    You are not authorized to post a reply.