This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Help check am1808 ddr2 configuration

Other Parts Discussed in Thread: AM1808, OMAP-L138

Hi, we use am1808 + ddr2 on our custom board.

The ddr2 just can't work. We have tried many configurations hard and still failed.

This becomes a bottleneck of bringing up the board.

DDR2 (1Gbits, 16-bit) : K4T1G164QF-BCE6

DDR2 memory controller configurations : see attached excel file

//////////////////////////////

DDR->DDRPHYCTL1 = 0x000000C5;
sdcr = 0x00134832 & ~0x00808000; // no BOOTUNLOCK and TIMUNLOCK
DDR->SDCR = (sdcr | 0x00800000); // set BOOTUNLOCK
DDR->SDCR = (sdcr | 0x00008000); // clear BOOTUNLOCK and set TIMUNLOCK
DDR->SDTIMR1 = 0x2692320A;
DDR->SDTIMR2 = 0x3C94C722;
DDR->SDCR &= (~0x00008000); // clear TIMUNLOCK
//DDR->SDCR2 = 0;
DDR->SDRCR = 0x00000492;

// set ddr2 to sync reset.
SETBIT(DDR->SDRCR, 0xC0000000);

// sync reset the ddr clock.
EVMAM1808_lpscTransition(PSC1, DOMAIN0, LPSC_EMIF3A, PSC_SYNCRESET);

// enable the clock.
EVMAM1808_lpscTransition(PSC1, DOMAIN0, LPSC_EMIF3A, PSC_ENABLE);

// disable self refresh.
CLRBIT(DDR->SDRCR, 0xC0000000);

//////////////////////////////

In CCS memory view, the memory content (start at 0xC0000000) seems very unstable after configuring the memory controller registers.

It looks like the read data in the memory view is a stream scrolling to the left and repeats.

Writing a value to DDR2 address may be shifted (? maybe read problem).

We don't want to give up our board easily.

Please help us check the settings and give suggestions.

Thanks.

Robert

f740_k4t1g164qf_bce6.xls
  • Robert,

    Have you looked at and followed the recommendations in the schematic review checklist http://processors.wiki.ti.com/index.php/OMAP-L13x_/_C674x_/_AM1x_Schematic_Review_Checklist and DDR routing guidelines http://processors.wiki.ti.com/index.php/DDR_Routing_Checklist#DDR2.2FmDDR.2FDDR3_Routing_Checklist?

    Also, make sure you are enabling clocks to any peripheral before writing to any of it's registers. You can try out your DDR setup portion of your code on an AM1808 or OMAP-L138 EVM/LCDK to isolate software configuration or board layout issue.

    Regards,

    Sunil Kamath

  • We found that the "scrolling stream" problem was caused by unconnected DDR_DQGATE0 and DDR_DQGATE1 pins on our board.

    To workaround this, we configure EXT_STRBEN=0 (Internal strobe gating mode) in DRPYC1R register. The scrolling problem disappears . 

    (but the ddr2 still doesn't work stably...)

    Is "Internal strobe gating mode" a reliable method?  How does it work?

    Thanks.

  • Robert,

    Both internal and external modes are reliable if used as recommended.Strobe gating is employed to avoid glitches on the strobe lines to be detected as valid strobe edges.

    The Internal Strobe Gating Mode (EXT_STRBEN=0) can ONLY be used for low frequency operation - i.e. when the board and IO delays introduced in the DDR signal path is assumed to be considerable less than the clock period and can be neglected. It is difficult to name a cut-off frequency - the gate can open anywhere during the DQS pre-amble from memory device (see memory datasheet for duration) for read operation. Under ideal conditions where there is no delay or jitter, the margin  available is equal to the entire pre-amble. This margin gets reduced due to a number of factors such as IO transmitter delay, IO receiver delay, round trip delay on board and memory access time. If the sum of the above four parameters exceed the pre-amble window width, then internal gating scheme will not work

    At higher frequencies, board and IO delays introduced in the DDR signal path are comparable to clock periods and the External Strobe Gating mode (EXT_STRBEN=1) has to be used. The delays are estimated by looping back the gating signal over the board through DDR_DQGATE0 and DDR_DQGATE1 pins. The route on the board for the loop back signal should closely match the combination of the ADDR_CTRL signal route and the data signal route.

    If you cannot use the internal strobe gating mode due to restrictions as mentioned above, you will have to spin your board to use the DQGATE pins as recommended  - see section 5.11 in the AM1808 datasheet and the schematics and layout of the LCDK (http://processors.wiki.ti.com/index.php/L138/C6748_Development_Kit_%28LCDK%29) for an example of how this is accomplished.

    Regards,

    Sunil Kamath

  • Thank you for the explanation.

    One more question: Suppose the sum of the four parameters exceed the pre-amble window width, is there a way to compensate this by configuring some registers?

    Since what's done is done on our board, we manage to let the board work with Internal Gating Mode at this point.

    Thanks.

  • Robert,

    No, there are no register fields that can be configured for this purpose. The alternate option is to use the external strobe gate mode.

    Regards,

    Sunil Kamath

  • Hi,

    I have question about DDR2 DDRPHYCTL1 register.

    What kind of difference does processing of AM1808 have by
    choosing DDRPHYCR1.CONFIG_EXT_STRBEN external or internal?
    I can't find any information about this from DDR2 User's Guide.

    I had read access problem but when I changed the setting of CONFIG_EXT_STRBEN
    from external to internal, the problem was solved.

    best regards,
    g.f.