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.
我使用AM3359连接两片ISSI IS43DR81280B-3DBL DDR2内存,按照WIKI上的设置对EMIF进行了设置,但是内存还是无法读写。原理图、PCB以及电源波形在附件中。参数设置如下:
#define EMIF_SDCFG ((SDRAM_TYPE<<29)|(IBANK_POS<<27)|(DDR_TERM<<24)|(DDR2_DDQS<<23)|(DDR3_DODT<<21)|(DISABLE_DLL<<20)|(SDRAM_DRIVE<<18)|(CWL<<16)|(NARROW_MODE<<14)|(CL<<10)|(ROW_SIZE<<7)|(IBANK<<4)|(EBANK<<3)|(COLUMN_SIZE<<0))
#define SDRAM_TYPE (0x2 & 0x7) //DDR2
#define IBANK_POS (0x0 & 0x3) //Lower OCP
#define DDR_TERM (0x0 & 0x7) //150ohm
#define DDR2_DDQS (0x1 & 0x1) //dif DQS
#define DDR3_DODT (0x0 & 0x3) //
#define DISABLE_DLL (0x0 & 0x1) //DLL (0)OFF
#define SDRAM_DRIVE (0x0 & 0x3) //Normal drive
#define CWL (0x0 & 0x3) //
#define NARROW_MODE (0x1 & 0x3) //16 bit
#define CL (0x4 & 0xf) //CL=4
#define ROW_SIZE (0x6 & 0x7) //ROW = 15 bit
#define IBANK (0x3 & 0x7) //i_bank = 8
#define EBANK (0x0 & 0x1) //1 CS
#define COLUMN_SIZE (0x2 & 0x7) //Column = 10bit
#define EMIF_TIM3 ((TCKES<<21)|(ZQCS<<15)|(TDQSCK<<13)|(TRFC<<4)|(TRAS_MAX<<0))
#define TCKES (0x0 & 0x7)
#define ZQCS (0x0 & 0x7F)
#define TDQSCK (0x0 & 0x3)
#define TRFC (39 & 0x1FF) //127.5/3.75 =
#define TRAS_MAX (7 & 0xf) //tras_max/trefi -1 =70/7.8d -1 =7.97 =7
#define EMIF_TIM2 ((TXP<<28)|(TODT<<25)|(TXSNR<<16)|(TXSRD<<6)|(TRTP<<3)|(TCKE<<0))
#define TXP (2 & 0x7) //>2
#define TODT (2 & 0x7) //TAOND =2
#define TXSNR (42 & 0x1FF) //>trfc+10
#define TXSRD (199 & 0x3FF) //>200
#define TRTP (1 & 0x7) //>7.5ns
#define TCKE (2 & 0x7) //>3
#define EMIF_TIM1 ((TRP<<25)|(TRCD<<21)|(TWR<<17)|(TRAS<<12)|(TRC<<6)|(TRRD<<3)|(TWTR<<0))
#define TRP (3 & 0xF) //>15ns
#define TRCD (3 & 0xF) //>15ns
#define TWR (3 & 0xF) //>15ns
#define TRAS (11 & 0x1F) //>40ns
#define TRC (15 & 0x1F) //>55ns
#define TRRD (2 & 0x7) //>7.5ns
#define TWTR (1 & 0x7) //>7.5ns
#define DDR2_RD_DQS 40
#define DDR2_PHY_FIFO_WE 75
#define DDR2_WR_DQS 0x04
另外有个问题,DDR2中有MR、EMR1、EMR2三个寄存器要设置,请问AM3359是在那里进行设置的,是在C代码中初始化的(这个没找到)?还是DDR PHY去设置的?
谢谢!
可以参考一下链接
http://processors.wiki.ti.com/index.php/AM335x_EMIF_Configuration_tips#DDR_PHY_Registers
及附件中的DDR2 参数配置工具