Hello,
We referenced the TI ICE dual port ram schematic to design our device with a 64K x 16 DPRAM (CY7C028V).
However, data can't be read/wrote properly via GPMC multiplexed address data 16bits function, and which still only read the AD0 to AD15's internal status( if pullup: 0xFFFF / pulldown: 0x0 in conf module pin register).
Any idea to the issue, please help.
void PINMUX_Config(void)
{
MUX_VAL(CONTROL_PADCONF_GPMC_AD0, (0x30 )) /* GPMC_AD0 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD1, (0x30 )) /* GPMC_AD1 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD2, (0x30 )) /* GPMC_AD2 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD3, (0x30 )) /* GPMC_AD3 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD4, (0x30 )) /* GPMC_AD4 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD5, (0x30 )) /* GPMC_AD5 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD6, (0x30 )) /* GPMC_AD6 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD7, (0x30 )) /* GPMC_AD7 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD8, (0x30 )) /* GPMC_AD8 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD9, (0x30 )) /* GPMC_AD9 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD10, (0x30 )) /* GPMC_AD10 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD11, (0x30 )) /* GPMC_AD11 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD12, (0x30 )) /* GPMC_AD12 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD13, (0x30 )) /* GPMC_AD13 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD14, (0x30 )) /* GPMC_AD14 */;
MUX_VAL(CONTROL_PADCONF_GPMC_AD15, (0x30 )) /* GPMC_AD15 */;
MUX_VAL(CONTROL_PADCONF_GPMC_CSN1, ( 0x0 )) /* GPMC_CSN1 */;
MUX_VAL(CONTROL_PADCONF_GPMC_ADVN_ALE, ( 0x0 )) /* GPMC_ADVN_ALE */;
MUX_VAL(CONTROL_PADCONF_GPMC_OEN_REN, ( 0x0 )) /* GPMC_OEN_REN */;
MUX_VAL(CONTROL_PADCONF_GPMC_WEN, ( 0x0 )) /* GPMC_WEN */;
}
void GPMC_DPRAM_Init(void)
{
int csNum = 1;
unsigned int temp;
//enable clock to GPMC module
HWREG(SOC_PRCM_REGS + CM_PER_GPMC_CLKCTRL ) |=
CM_PER_GPMC_CLKCTRL_MODULEMODE_ENABLE;
//check to see if enabled
while((HWREG(SOC_PRCM_REGS + CM_PER_GPMC_CLKCTRL) & CM_PER_GPMC_CLKCTRL_IDLEST) !=
(CM_PER_GPMC_CLKCTRL_IDLEST_FUNC << CM_PER_GPMC_CLKCTRL_IDLEST_SHIFT));
//reset the GPMC module
HWREG(SOC_GPMC_0_REGS + GPMC_SYSCONFIG ) |= GPMC_SYSCONFIG_SOFTRESET;
while((HWREG(SOC_GPMC_0_REGS + GPMC_SYSSTATUS) & GPMC_SYSSTATUS_RESETDONE) ==
GPMC_SYSSTATUS_RESETDONE_RSTONGOING);
//Configure to no idle
temp = HWREG(SOC_GPMC_0_REGS + GPMC_SYSCONFIG);
temp &= ~GPMC_SYSCONFIG_IDLEMODE;
temp |= GPMC_SYSCONFIG_IDLEMODE_NOIDLE << GPMC_SYSCONFIG_IDLEMODE_SHIFT;
HWREG(SOC_GPMC_0_REGS + GPMC_SYSCONFIG) = temp;
HWREG(SOC_GPMC_0_REGS + GPMC_IRQENABLE) = 0x0;
HWREG(SOC_GPMC_0_REGS + GPMC_TIMEOUT_CONTROL) = 0x0;
HWREG(SOC_GPMC_0_REGS + GPMC_CONFIG) = 0x2;
HWREG(SOC_GPMC_0_REGS + GPMC_CONFIG1(csNum )) = 0x00001200;
HWREG(SOC_GPMC_0_REGS + GPMC_CONFIG2(csNum )) = 0x00070800;
HWREG(SOC_GPMC_0_REGS + GPMC_CONFIG3(csNum )) = 0x00020200;
HWREG(SOC_GPMC_0_REGS + GPMC_CONFIG4(csNum )) = 0x07000800;
HWREG(SOC_GPMC_0_REGS + GPMC_CONFIG5(csNum )) = 0x00070708;
HWREG(SOC_GPMC_0_REGS + GPMC_CONFIG6(csNum )) = 0x00000180;
HWREG(SOC_GPMC_0_REGS + GPMC_CONFIG7(csNum )) = 0x00000F49; //address space starts at 0x09000000
}