<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error while reading/writing NVSRAM via IFC in QorIQ</title>
    <link>https://community.nxp.com/t5/QorIQ/Error-while-reading-writing-NVSRAM-via-IFC/m-p/1400140#M10733</link>
    <description>&lt;P&gt;&lt;SPAN&gt;The FTIM Timing Registers (FTIM0-FTIM3) must be programmed per the values specified in the SRAM datasheet mapped to IFC module.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to T1042 RM, ip_clk is IFC module input clock, divided clock from platform clock. ip_clk = 1/2 * (Platform Clock).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;IFC_CLK is used when IFC was selected as GPCM mode. IFC_CLK was divided clock from ip_clk. IFC_CLK = 1/(CCR[CLK_DIV] + 1) * ip_clk. IFC_CLK cycle is 1/IFC_CLK.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Take GPCM_FTIM1[TRAD] for example, T1042 platform clock is 600 MHz, then IFC ip_clk = 300 MHZ, and CCR[CLK_DIV] = 3 (IFC:CCR = 0x03008000), then IFC_CLK = 75 MHZ. (IFC_CLK cycle tIFC = 1/75MHz = 13.3 ns).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to T1042RM GPCM read operation, for non-burst mode TRAD value should be programmed as {(2 + n)*(CCR[CLK_DIV] + 1)}, where n defines the memory access time in terms of IFC_CLK. Memory takes n ifc_clk to output data after output enable is asserted or after new address is sampled. n can take values 0,1,2,3...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to CY14V116N-BZ30XIT has (OE# Output enable to data valid) tDOE &amp;lt;= 14 ns So we can conclude that TRAD should be &amp;lt;= (floor(14ns/13.3) + 2) * (3 + 1) = (1 + 2) * 4 = 12.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt; Suggest customer set FTIM Timing Registers (FTIM0-FTIM3) with correct value according to T1042/SRAM datasheet.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt; Mesure IFC read/write waveform to met CY14V116N-BZ30XIT timing specification.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Mon, 17 Jan 2022 08:52:35 GMT</pubDate>
    <dc:creator>yipingwang</dc:creator>
    <dc:date>2022-01-17T08:52:35Z</dc:date>
    <item>
      <title>Error while reading/writing NVSRAM via IFC</title>
      <link>https://community.nxp.com/t5/QorIQ/Error-while-reading-writing-NVSRAM-via-IFC/m-p/1389096#M10708</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;It is failed to read and write into NVSRAM, CY14V116N-BZ30XIT for NXP T1042, using following U-Boot revision;&lt;/P&gt;&lt;P&gt;U-Boot 2015.07 (Dec 19 2021 - 19:44:07 +0300)&lt;BR /&gt;powerpc-pokymllib32-linux-gcc (GCC) 5.2.0&lt;BR /&gt;GNU ld (GNU Binutils) 2.25.1&lt;/P&gt;&lt;P&gt;Following timing is set in uboot;&lt;/P&gt;&lt;P&gt;#define CONFIG_SYS_NVRAM_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NVRAM_BASE) | \&lt;BR /&gt;CSPR_PORT_SIZE_16 | \&lt;BR /&gt;CSPR_MSEL_GPCM | \&lt;BR /&gt;CSPR_V)&lt;/P&gt;&lt;P&gt;#define CONFIG_SYS_NVRAM_AMASK IFC_AMASK(2*1024*1024)&lt;/P&gt;&lt;P&gt;#define CONFIG_SYS_NVRAM_BASE 0xc0000000&lt;BR /&gt;#define CONFIG_SYS_NVRAM_BASE_PHYS (0xf00000000ull | CONFIG_SYS_NVRAM_BASE)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define CONFIG_SYS_CSPR3_EXT 0xf&lt;BR /&gt;#define CONFIG_SYS_CSPR3 CONFIG_SYS_NVRAM_CSPR&lt;BR /&gt;#define CONFIG_SYS_AMASK3 CONFIG_SYS_NVRAM_AMASK&lt;BR /&gt;#define CONFIG_SYS_CSOR3 CSOR_NOR_TRHZ_20&lt;BR /&gt;#define CONFIG_SYS_CS3_FTIM0 (FTIM0_GPCM_TACSE(0xff) | \&lt;BR /&gt;FTIM0_GPCM_TEADC(0xff) | \&lt;BR /&gt;FTIM0_GPCM_TEAHC(0xff))&lt;BR /&gt;#define CONFIG_SYS_CS3_FTIM1 (FTIM1_GPCM_TACO(0xff) | \&lt;BR /&gt;FTIM1_GPCM_TRAD(0xff))&lt;BR /&gt;#define CONFIG_SYS_CS3_FTIM2 (FTIM2_GPCM_TCS(0xff) | \&lt;BR /&gt;FTIM2_GPCM_TCH(0xff) | \&lt;BR /&gt;FTIM2_GPCM_TWP(0xff))&lt;BR /&gt;#define CONFIG_SYS_CS3_FTIM3 0x0&lt;/P&gt;&lt;P&gt;In uboot terminal, md is called to observe the content of SRAM&lt;/P&gt;&lt;P&gt;=&amp;gt; md 0xfc0000000&lt;BR /&gt;c0000000: 00000000 00000000 00000000 00000000 ................&lt;/P&gt;&lt;P&gt;Then mw is used to write some data into SRAM.&lt;/P&gt;&lt;P&gt;If it is called twice and it has word size of data, it works;&lt;/P&gt;&lt;P&gt;=&amp;gt;&lt;BR /&gt;=&amp;gt; mw.w fc0000000 1234&lt;BR /&gt;=&amp;gt; mw.w fc0000000 1234&lt;BR /&gt;=&amp;gt; md fc0000000 4&lt;BR /&gt;c0000000: 12340000 00000000 00000000 00000000 .4..............&lt;BR /&gt;=&amp;gt;&lt;/P&gt;&lt;P&gt;If it is written once it returns wild data at the first md command;&lt;/P&gt;&lt;P&gt;=&amp;gt; mw.w fc0000000 5678&lt;BR /&gt;=&amp;gt; md fc0000000 4&lt;BR /&gt;c0000000: c000c000 c000c000 c000c000 c000c000 ................&lt;BR /&gt;=&amp;gt; md fc0000000 4&lt;BR /&gt;c0000000: 56780000 00000000 00000000 00000000 Vx..............&lt;BR /&gt;=&amp;gt;&lt;/P&gt;&lt;P&gt;If a repetitive alphanumeric hexa number like baba, cece, dede, it can't be written;&lt;/P&gt;&lt;P&gt;=&amp;gt; mw.w fc0000000 baba&lt;BR /&gt;=&amp;gt; mw.w fc0000000 baba&lt;BR /&gt;=&amp;gt; md fc0000000 4&lt;BR /&gt;c0000000: 00000000 00000000 00000000 00000000 ................&lt;/P&gt;&lt;P&gt;If repetitive numbers are numeric, it can be written into SRAM;&lt;/P&gt;&lt;P&gt;=&amp;gt; mw.w fc0000000 1212&lt;BR /&gt;=&amp;gt; mw.w fc0000000 1212&lt;BR /&gt;=&amp;gt; md fc0000000 4&lt;BR /&gt;c0000000: 12120000 00000000 00000000 00000000 ................&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help us by commenting on this problem?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Sun, 19 Dec 2021 19:27:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Error-while-reading-writing-NVSRAM-via-IFC/m-p/1389096#M10708</guid>
      <dc:creator>draven</dc:creator>
      <dc:date>2021-12-19T19:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reading/writing NVSRAM via IFC</title>
      <link>https://community.nxp.com/t5/QorIQ/Error-while-reading-writing-NVSRAM-via-IFC/m-p/1400140#M10733</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The FTIM Timing Registers (FTIM0-FTIM3) must be programmed per the values specified in the SRAM datasheet mapped to IFC module.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to T1042 RM, ip_clk is IFC module input clock, divided clock from platform clock. ip_clk = 1/2 * (Platform Clock).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;IFC_CLK is used when IFC was selected as GPCM mode. IFC_CLK was divided clock from ip_clk. IFC_CLK = 1/(CCR[CLK_DIV] + 1) * ip_clk. IFC_CLK cycle is 1/IFC_CLK.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Take GPCM_FTIM1[TRAD] for example, T1042 platform clock is 600 MHz, then IFC ip_clk = 300 MHZ, and CCR[CLK_DIV] = 3 (IFC:CCR = 0x03008000), then IFC_CLK = 75 MHZ. (IFC_CLK cycle tIFC = 1/75MHz = 13.3 ns).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to T1042RM GPCM read operation, for non-burst mode TRAD value should be programmed as {(2 + n)*(CCR[CLK_DIV] + 1)}, where n defines the memory access time in terms of IFC_CLK. Memory takes n ifc_clk to output data after output enable is asserted or after new address is sampled. n can take values 0,1,2,3...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to CY14V116N-BZ30XIT has (OE# Output enable to data valid) tDOE &amp;lt;= 14 ns So we can conclude that TRAD should be &amp;lt;= (floor(14ns/13.3) + 2) * (3 + 1) = (1 + 2) * 4 = 12.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt; Suggest customer set FTIM Timing Registers (FTIM0-FTIM3) with correct value according to T1042/SRAM datasheet.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt; Mesure IFC read/write waveform to met CY14V116N-BZ30XIT timing specification.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 17 Jan 2022 08:52:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Error-while-reading-writing-NVSRAM-via-IFC/m-p/1400140#M10733</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2022-01-17T08:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error while reading/writing NVSRAM via IFC</title>
      <link>https://community.nxp.com/t5/QorIQ/Error-while-reading-writing-NVSRAM-via-IFC/m-p/1407243#M10752</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;thanks for your reply,&lt;/P&gt;&lt;P&gt;According to your reply I tried to find gpcm timing ;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;FTIM0&lt;UL&gt;&lt;LI&gt;TACSE = tSA (nvsram parameter) (Address setup to start of write) : 0 = 1&lt;/LI&gt;&lt;LI&gt;TEADC : 4 (this parameter is about latch so I added the value which working at nor-flash)&lt;/LI&gt;&lt;LI&gt;TEAHC : 3 (this parameter is about latch so I added the value which working at nor-flash)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2. FTIM1&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TACO = tLZOE (nvsram parameter) : 3 =&amp;nbsp; 3/13 = 1&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;TRAD = I added your value&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;3. FTIM2&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TCS = tSA (nvsram parameter) (Address setup to start of write) : 0 = 1&lt;/LI&gt;&lt;LI&gt;TCH = tHA (nvsram parameter) (Address hold after end of write) : 0 = 1&lt;/LI&gt;&lt;LI&gt;TWP = tPWE (nvsram parameter) (Write pulse width) : 24 = 24/13 = 2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;4. FTIM3&lt;/P&gt;&lt;P&gt;TAAD = tAA (nvsram parameter) (Address access time) : 30 = 30/13 = 2&lt;/P&gt;&lt;P&gt;And our gpcm parameter like this :&lt;/P&gt;&lt;P&gt;#define CONFIG_SYS_NVRAM_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NVRAM_BASE) | \&lt;BR /&gt;CSPR_PORT_SIZE_16 | \&lt;BR /&gt;CSPR_MSEL_GPCM | \&lt;BR /&gt;CSPR_V)&lt;/P&gt;&lt;P&gt;#define CONFIG_SYS_NVRAM_AMASK IFC_AMASK(2*1024*1024)&lt;/P&gt;&lt;P&gt;#define CONFIG_SYS_CSPR3_EXT 0xf&lt;BR /&gt;#define CONFIG_SYS_CSPR3 CONFIG_SYS_NVRAM_CSPR&lt;BR /&gt;#define CONFIG_SYS_AMASK3 CONFIG_SYS_NVRAM_AMASK&lt;BR /&gt;#define CONFIG_SYS_CSOR3 0&lt;BR /&gt;#define CONFIG_SYS_CS3_FTIM0 (FTIM0_GPCM_TACSE(0x1) | \&lt;BR /&gt;FTIM0_GPCM_TEADC(0x4) | \&lt;BR /&gt;FTIM0_GPCM_TEAHC(0x3))&lt;BR /&gt;#define CONFIG_SYS_CS3_FTIM1 (FTIM1_GPCM_TACO(0x1) | \&lt;BR /&gt;FTIM1_GPCM_TRAD(12))&lt;BR /&gt;#define CONFIG_SYS_CS3_FTIM2 (FTIM2_GPCM_TCS(1) | \&lt;BR /&gt;FTIM2_GPCM_TCH(1) | \&lt;BR /&gt;FTIM2_GPCM_TWP(2))&lt;BR /&gt;#define CONFIG_SYS_CS3_FTIM3 0x2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I got same result as before. Do you have any comment? Are my parameters and calculations correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 18:11:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Error-while-reading-writing-NVSRAM-via-IFC/m-p/1407243#M10752</guid>
      <dc:creator>draven</dc:creator>
      <dc:date>2022-01-31T18:11:48Z</dc:date>
    </item>
  </channel>
</rss>

