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.

[参考译文] TM4C129XNCZAD:与EPI的外部SDRAM集成。

Guru**** 2390755 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1096755/tm4c129xnczad-external-sdram-integration-with-epi

部件号:TM4C129XNCZAD

大家好,

我正在尝试将外部SDRAM (W9812G6KH-6)与TM4C129X微控制器配合使用,以便驱动 具有更大帧缓冲区大小的LCD模块。

我已经为 外部SDRAM编写了以下EPI代码。 我正在使用PH0,PH1,PH2,PH3,PN2,PN3引脚。

#define EPI_Porta_pins (GPIO PIN_7 | GPIO PIN_6)
#define EPI_PORTB_PINS (GPIO_PIN_3)
#define EPI_PORTC_PINS (GPIO PIN_7 | GPIO PIN_6 | GPIO PIN_5 | GPIO PIN_4)
#define EPI_PORTG_PINS (GPIO PIN_1 | GPIO PIN_0)
#define EPI_Porth_pins (GPIO PIN_3 | GPIO PIN_2 | GPIO PIN_1 |GPIO PIN_0)
#define EPI_PORTK_PINS (GPIO_PIN_5)
#define EPI_PORTL_PINS (GPIO PIN_3 | GPIO PIN_2 | GPIO PIN_1 | GPIO PIN_0)
#define EPI_PORTM_PINS (GPIO PIN_3 | GPIO PIN_2 | GPIO PIN_1 | GPIO PIN_0)
#define EPI_PORTN_PINS (GPIO PIN_3 | GPIO PIN_2)

静态易失性uint16_t *g_pui16EPISdram,P11,P22,P33,p44;

void epi_init(void)

SysCtlPeripheralEnable(sysctl_Periph_EPI0);

SysCtlPeripheralEnable(sysctl_Periph_GPIOA);
SysCtlPeripheralEnable(sysctl_Periph_GPIOB);
SysCtlPeripheralEnable(sysctl_Periph_gpicoc);
SysCtlPeripheralEnable(sysctl_Periph_GPIOG);
SysCtlPeripheralEnable(sysctl_Periph_GPIOH);
SysCtlPeripheralEnable(sysctl_Periph_GPIOK);
SysctlPeripheralEnable(sysctl_Periph_GPIOL);
SysCtlPeripheralEnable(sysctl_Periph_gpIOM);
SysctlPeripheralEnable(sysctl_Periph_gpion);
SysCtlPeripheralEnable(sysctl_Periph_GPIOP);

GPIO _Porta_AHB_PCTL_R |= 0xFF0万;

GPIO _PORTB_AHB_PCTL_R |= 0x0000F000;

GPIO _PORTC_AHB_PCTL_R |= 0xFFFF0000;

GPIO _PORTG_AHB_PCTL_R |= 0x0万FF;

GPIO _PortH_AHB_PCTL_R |= 0x0000FFFF;

GPIO _PORTK_PCTL_R |= 0x00F0万;

GPIO _PORTL_PCTL_R |= 0x0000FFFF;

GPIO _PORTM_PCTL_R |= 0x0000FFFF;

GPIO _PORTN_PCTL_R |= 0x0000FF00;

GPIOPinTypeEPI (GPIO_Porta_base,epi_Porta_pins);
GPIOPinTypeEPI (GPIO _PORTB_BASE,EPI_PORTB_PINS);
GPIOPinTypeEPI (GPIO _PORTC_BASE,EPI_PORTC_PINS);
GPIOPinTypeEPI (GPIO _PORTG_BASE,EPI_PORTG_PINS);
GPIOPinTypeEPI (GPIO_Porth_base,epi_Porth_pins);
GPIOPinTypeEPI (GPIO _PORTK_BASE,EPI_PORTK_PINS);
GPIOPinTypeEPI (GPIO _PORTL_BASE,EPI_PORTL_PINS);
GPIOPinTypeEPI (GPIO _PORTM_BASE,EPI_PORTM_PINS);
GPIOPinTypeEPI (GPIO _PORTN_BASE,EPI_PORTN_PINS);

EPIDividerSet (EPI0_BASE,1);
EPIModeSet (EPI0_BASE,EPI_MODE_SDRAM);
EPIConfigSDRAMSet (EPI0_BASE,(EPI_SDRAM_CORE _FREQ_50_100 | EPI_SDRAM_FULL电源|EPI_SDRAM_SIZE _128MBIT),1024);
EPIAddressMapSet (EPI0_BASE,EPI_ADDR_RAM_SIZE 16 MB | EPI_ADDR_RAM_BASE);
While (HWREG (EPI0_BASE + EPI_O_STAT)和EPI_STAT_INITSEQ)

}
g_pui16EPISdram =(uint16_t *) 0x6000万;

G_pu16EPISdram[0]= 0x21;
G_pu16EPISdram[1]= 0x124;
G_pu16EPISdram[2]= 0x213;
G_pu16EPISdram[3]= 0x123;

p11 = g_pui16EPISdram[0];
p22 = g_pui16EPISdram[1];
p33 = g_pui16EPISdram[2];
P44 = g_pui16EPISdram[3];

}

内部主(无效)

MAP_SysClockClockFreqSet(((sysctl_XTAL_25MHz|sysctl_OSC主|sysctl_use_PLL |sysctl_CFG_VCO_240),1.2亿);

epi_init();

while (1){}

}

当我运行代码时,我得到的是P11=0,P22=1,P33=2,p44=3。

我想知道我的代码有什么问题吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好,

     您是否有机会在 C:\ti\TivaWare_C_Series-SDRA.SDRA\Examples\Peripherals\EPI\SDRAM.c中引用2.2 示例0.295 ? 您是否还可以使用逻辑分析器查看数据信号并检查是否满足 W9812G6KH-6的所有定时要求?