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 10 Nov 2004 11:09 AM by  mikee@logicpd.com
static memory controller problem
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
ylin
New Member
New Member
Posts:


--
09 Nov 2004 08:58 AM
    I'm having some problems with the static memory controller. Eventually, I need to read from our own CPLD on our target board. For now, I'm using the zoom development board with LOLO. This is essentially the sequence of code I'm trying to execute:

    #include "lh7a400_smc.h"
    #include "lh7a400_chip.h"

    typedef unsigned short UINT16;
    UINT16* xdata = (UINT16*)SMC_CS3_BASE; //SMC_CS3_BASE defined as 0x30000000

    UINT16 data;

    gpio_sclke_select(GPIO_NO_SCLKE);
    SMC->bcr3 = 0x00000000;
    SMC->bcr3 |= 0x10000827; //16 bit data, 1 wait state

    //execute this in main()
    data = *xdata;


    Whenever the statement "data = *xdata" is executed, my progrm hangs. The chip select doesn't go low, the address lines don't change either when I probe the signals on an oscilloscope.

    Any ideas?

    thanks,

    Yujie
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    09 Nov 2004 01:45 PM
    ylin,

    Are you writing this as a LogicLoader application? If so, I'm not sure that LoLo maps that chunk of memory. If it doesn't and you use the jump command to start your application, you will get a data abort exception or something because that isn't a valid address. Try using the exec command to launch your application as that will shut off the MMU.

    Alternatively, you can use the remap command to add that address space to the memory map.

    --mikee
    ylin
    New Member
    New Member
    Posts:


    --
    10 Nov 2004 10:25 AM
    thank you problem fixed.
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    10 Nov 2004 11:09 AM
    ylin,

    I'm glad you solved your problem. If you have time, could you please post the solution here?

    That way, we can document the solution for people that might run into the same issue in the future.

    Best regards,
    --mikee
    You are not authorized to post a reply.