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 05 Apr 2006 10:38 AM by  bethel
Compact Flash
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
bethel
New Member
New Member
Posts:


--
11 Mar 2006 10:28 PM
    Hi. I am working with the LH79524 development board, and I am trying to write my own custom Compact Flash driver. I am writing the driver for memory mode only, and I am setting my base address of the registers to 0x48200000 as per the IO specifications. Therefore my registers are between 0x48200000 and 0x4820000F. However when I try to write to these registers, they don't seem to change. Since the CF signals seem to be abstracted by the CPLD, I was wondering if there is some functions or code which I needed to run to be able to write to the registers. It seems to be reading ok, but I cannot write to them.

    Any advice, even more general than this would be appreciated. I am doing this for a student project, and therefore I do not have the money to buy the source code for the CF interface from Logic.

    Thanks for all your help.

    Brianna Bethel
    University of Colorado - Boulder
    kurtl@logicpd.com
    New Member
    New Member
    Posts:


    --
    13 Mar 2006 11:05 AM
    Brianna,
    The CPLD logic for the CF card nIOWR signal is driven by the nWE signal on the CPU which is the netname uP_nWR in the schematic. Make sure the CPU chip select register is configured to asserte nWE during writes. Also, refer to CF timing specification for minimum time required for nWE assertion for CF writes. It states a minimum of 150nS.

    Check out the timing diagram on page 60 of this document:
    http://www.compactflash.org/cfspc3_0.pdf

    Also, if you have access to an oscilloscope, how long is nIOWR being asserted currently?

    -Kurt
    mikea@logicpd.com
    New Member
    New Member
    Posts:


    --
    13 Mar 2006 03:23 PM
    One thing a lot of people forget is that this is a 16 bit area and you need to be sure you are reading and writing 16 bit. If you do a 32 bit write, you'll get two writes, the second of which over-writes what you wanted with 0x0000.

    Also, you will need to be sure you are using a 'barrier' function.

    This document from Sharp described this issue, but it looks like the link is bad now. I can't locate it on their website anymore. You may want to go to their discussion group and ask for it or your local Sharp support person.
    http://www.sharpsma.com/p...xxx_StaticMemory.pdf

    http://www.logicpd.com/su...mp;highlight=barrier
    http://www.logicpd.com/su...mp;highlight=barrier
    bethel
    New Member
    New Member
    Posts:


    --
    05 Apr 2006 10:38 AM
    Thanks for all your help! I did get it working, and my main problem was forgetting that it was a 16 bit area, so I ended up writing errant commands to the card and 'locking' the card up. When I fixed this, everything worked great.

    Thanks again!
    You are not authorized to post a reply.