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 23 Feb 2005 09:18 PM by  benlau@linux.org.hk
Question about SDRAM initialization
 8 Replies
Sort:
You are not authorized to post a reply.
Author Messages
benlau@linux.org.hk
New Member
New Member
Posts:


--
18 Feb 2005 02:18 AM
    Hi all,

    In my previous post, I reported that blob could not initialize the SDRAM correctly. And later on , Marc Singer released a new boot loader (thanks!) I did tried it on my board again. Unfortunately , it fall into the same problem.

    After read the code of bs_7400_dbg.elf, I tried to merge them and finally get apex work on my LPD7A400. By the method of try and error, I found a interesting behaviour.

    If I disable the write to PCMCIACON (#0x3. PC Card 1 and 2 Enable), bs_7400_dbg.elf will not be able to get SDRAM up for lolo.

    I am not quite understand why it need to set this value for SDRAM to work...





    b00000c8 <_enable_pcmcia>:
    b00000c8: e3a06102 mov r6, #-2147483648 ; 0x80000000
    b00000cc: e2866d81 add r6, r6, #8256 ; 0x2040
    b00000d0: e3a00000 mov r0, #0 ; 0x0
    b00000d4: e3800003 orr r0, r0, #3 ; 0x3

    b00000d8: e5860000 str r0, [r6] ; the originial code
    b00000d8: e1a00000 nop (mov r0,r0) ; the new code

    b00000dc: e1a00000 nop (mov r0,r0)
    hansr@logicpd.com
    New Member
    New Member
    Posts:


    --
    19 Feb 2005 11:33 PM
    Ben,
    check out the IO Controller Spec. document for the LH7A400 and verify you have the GPACT bit in the expected position.

    This bit tells the system CPLD how to deal with the PCMCIA control signals. If it is in PCMCIA mode, it does incorporate the PCMCIA signals into the buffer control equations and could knock over the SDRAM or other external memory if the PCMCIA card enable signals are set up as GPIO.

    My bet is that you should leave GPACT a '1' if you disable the write to PCMCIACON.

    Hans
    benlau@linux.org.hk
    New Member
    New Member
    Posts:


    --
    21 Feb 2005 06:48 PM
    Hi hansr,

    Thanks for your reply! However, I found that default value of GPACT is 0. And both of bs_7400_dbg.elf and apex do not access this register.
    hansr@logicpd.com
    New Member
    New Member
    Posts:


    --
    21 Feb 2005 06:53 PM
    Ben,
    set GPACT to a '1'.

    It has to be a '1' if you EITHER use the PCMCIA signals as GPIO OR if you don't enable the PCMCIA interface. If it is a '0' (default state), you must ensure the PCMCIA interface is enabled.

    The IOController spec states:
    GPACT: GPIO active – this bit enables or disables buffer control based on the PCMCIA slot signals. If this bit is 0, the card engine buffers and PCMCIA CE signals will be controlled via the PCMCIA control signals. If this bit is a 1, the buffer control equations will ignore the PCMCIA signals because the user intends to use them as GPIO and not as PCMCIA control signals.
    0 = input PCMCIA control signals to CPLD enabled (GPIO disabled).
    1 = input PCMCIA control signals to CPLD disabled (GPIO enabled).

    Thanks,
    Hans
    benlau@linux.org.hk
    New Member
    New Member
    Posts:


    --
    22 Feb 2005 03:25 AM
    Posted By hansr on 21 Feb 2005 6:53 PM
    Ben,
    set GPACT to a ''1''.

    It has to be a ''1'' if you EITHER use the PCMCIA signals as GPIO OR if you don''t enable the PCMCIA interface. If it is a ''0'' (default state), you must ensure the PCMCIA interface is enabled.

    The IOController spec states:
    GPACT: GPIO active – this bit enables or disables buffer control based on the PCMCIA slot signals. If this bit is 0, the card engine buffers and PCMCIA CE signals will be controlled via the PCMCIA control signals. If this bit is a 1, the buffer control equations will ignore the PCMCIA signals because the user intends to use them as GPIO and not as PCMCIA control signals.
    0 = input PCMCIA control signals to CPLD enabled (GPIO disabled).
    1 = input PCMCIA control signals to CPLD disabled (GPIO enabled).

    Thanks,
    Hans




    Sorry for my mistake.

    hmm. I have tried to set GPACT to 1 by writing 0x2 to address 0x71A00000. However, once I fetch it again, the return value is 0x0. And ofcoz the SDRAM could not be initializated if the write to PCMCIACON has been disabled.
    hansr@logicpd.com
    New Member
    New Member
    Posts:


    --
    22 Feb 2005 10:47 AM
    Ben,
    what version is your CPLD code, and what code are you using to access the bit (what address, data and access size)?

    That bit has been verified to work in version 0x37 and later of CPLD code - it sounds like the write access is not working correctly.

    Hans
    benlau@linux.org.hk
    New Member
    New Member
    Posts:


    --
    22 Feb 2005 09:55 PM
    Posted By hansr on 22 Feb 2005 10:47 AM
    Ben,
    what version is your CPLD code, and what code are you using to access the bit (what address, data and access size)?

    That bit has been verified to work in version 0x37 and later of CPLD code - it sounds like the write access is not working correctly.

    Hans




    It is 0x34. Not the most updated one. Is it possible to upgrade it?
    hansr@logicpd.com
    New Member
    New Member
    Posts:


    --
    22 Feb 2005 10:29 PM
    What revision of Card Engine are you using (on the label on the card engine)?

    CPLD update files are posted on the downloads site for the Card Engine. However, RevA LH7A400-10 card engines cannot be upgraded.

    Hans
    benlau@linux.org.hk
    New Member
    New Member
    Posts:


    --
    23 Feb 2005 09:18 PM
    Thanks! I have upgraded the CPLD.
    You are not authorized to post a reply.