Hello,
It is failed to read and write into NVSRAM, CY14V116N-BZ30XIT for NXP T1042, using following U-Boot revision;
U-Boot 2015.07 (Dec 19 2021 - 19:44:07 +0300)
powerpc-pokymllib32-linux-gcc (GCC) 5.2.0
GNU ld (GNU Binutils) 2.25.1
Following timing is set in uboot;
#define CONFIG_SYS_NVRAM_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NVRAM_BASE) | \
CSPR_PORT_SIZE_16 | \
CSPR_MSEL_GPCM | \
CSPR_V)
#define CONFIG_SYS_NVRAM_AMASK IFC_AMASK(2*1024*1024)
#define CONFIG_SYS_NVRAM_BASE 0xc0000000
#define CONFIG_SYS_NVRAM_BASE_PHYS (0xf00000000ull | CONFIG_SYS_NVRAM_BASE)
#define CONFIG_SYS_CSPR3_EXT 0xf
#define CONFIG_SYS_CSPR3 CONFIG_SYS_NVRAM_CSPR
#define CONFIG_SYS_AMASK3 CONFIG_SYS_NVRAM_AMASK
#define CONFIG_SYS_CSOR3 CSOR_NOR_TRHZ_20
#define CONFIG_SYS_CS3_FTIM0 (FTIM0_GPCM_TACSE(0xff) | \
FTIM0_GPCM_TEADC(0xff) | \
FTIM0_GPCM_TEAHC(0xff))
#define CONFIG_SYS_CS3_FTIM1 (FTIM1_GPCM_TACO(0xff) | \
FTIM1_GPCM_TRAD(0xff))
#define CONFIG_SYS_CS3_FTIM2 (FTIM2_GPCM_TCS(0xff) | \
FTIM2_GPCM_TCH(0xff) | \
FTIM2_GPCM_TWP(0xff))
#define CONFIG_SYS_CS3_FTIM3 0x0
In uboot terminal, md is called to observe the content of SRAM
=> md 0xfc0000000
c0000000: 00000000 00000000 00000000 00000000 ................
Then mw is used to write some data into SRAM.
If it is called twice and it has word size of data, it works;
=>
=> mw.w fc0000000 1234
=> mw.w fc0000000 1234
=> md fc0000000 4
c0000000: 12340000 00000000 00000000 00000000 .4..............
=>
If it is written once it returns wild data at the first md command;
=> mw.w fc0000000 5678
=> md fc0000000 4
c0000000: c000c000 c000c000 c000c000 c000c000 ................
=> md fc0000000 4
c0000000: 56780000 00000000 00000000 00000000 Vx..............
=>
If a repetitive alphanumeric hexa number like baba, cece, dede, it can't be written;
=> mw.w fc0000000 baba
=> mw.w fc0000000 baba
=> md fc0000000 4
c0000000: 00000000 00000000 00000000 00000000 ................
If repetitive numbers are numeric, it can be written into SRAM;
=> mw.w fc0000000 1212
=> mw.w fc0000000 1212
=> md fc0000000 4
c0000000: 12120000 00000000 00000000 00000000 ................
Can you please help us by commenting on this problem?
Best regards