<?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: K66F+16Bit SDRAM in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680802#M41909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CLKOUT signal is not clear enough, so add a 12pF capacitor will filter some noise to enhance the clock signal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt; I don't think customer need to add a capacitor to clock line. The PCB layout need to avoid the clock signal be interfered.&lt;/P&gt;&lt;P&gt;2&amp;gt; The SDRAM is different with DDR SDRAM, which doesn't need the 22ohm serial resistor to SDRAM control signal pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the most issue caused by the PCB layout.&lt;/P&gt;&lt;P&gt;Please refer &lt;A href="http://www.nxp.com/assets/documents/data/en/application-notes/AN2910.pdf"&gt;this application note&lt;/A&gt; about layout guideline for DDR2 SDRAM, some principle is also suitable to SDRAM layout.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jun 2017 03:27:40 GMT</pubDate>
    <dc:creator>Hui_Ma</dc:creator>
    <dc:date>2017-06-14T03:27:40Z</dc:date>
    <item>
      <title>K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680794#M41901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, I got the customized board on my hand. When I am testing SDRAM, I can't see any data read from SDRAM.&lt;/P&gt;&lt;P&gt;So, there are something wrong there.&lt;/P&gt;&lt;P&gt;1) MCU: MK66FN2M0VLQ18&lt;/P&gt;&lt;P&gt;2) SDRAM:MT48LC8M16A2(2 chips). See attached.&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Here is pin_mux:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;STRONG&gt;BOARD_InitPins&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CLOCK_EnableClock(&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kCLOCK_PortA&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Port A Clock Gate Control: Clock enabled */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CLOCK_EnableClock(&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kCLOCK_PortB&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Port B Clock Gate Control: Clock enabled */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CLOCK_EnableClock(&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kCLOCK_PortC&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Port C Clock Gate Control: Clock enabled */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CLOCK_EnableClock(&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kCLOCK_PortD&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Port D Clock Gate Control: Clock enabled */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CLOCK_EnableClock(&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kCLOCK_PortE&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Port E Clock Gate Control: Clock enabled */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//-----*****Just doing re-arrangement from pin_mux.c that is generated by pin tool*****-----&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****UART0 used as DEBUG interface on Demo Board*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// PORT_SetPinMux(PORTB, PIN16_IDX, kPORT_MuxAlt3); /* PORTB16 (pin E10) is configured as UART0_RX(Demo Board) */&lt;/P&gt;&lt;P&gt;// PORT_SetPinMux(PORTB, PIN17_IDX, kPORT_MuxAlt3); /* PORTB17 (pin E9) is configured as UART0_TX(Demo Board) */&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//----Configured on iNetVu 7710 Version 5.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****UART1 used as DEBUG interface*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN0_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt3&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE0 (pin 1) is configured as UART1_TX */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN1_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt3&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE1 (pin 2) is configured as UART1_RX */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****Configure UART3*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN4_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt3&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE4 (pin 7) is configured as UART3_TX */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN5_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt3&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE5 (pin 8) is configured as UART3_RX */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****Configure LPUART0*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN8_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE8 (pin 11) is configured as LPUART0_TX */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN9_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE9 (pin 12) is configured as LPUART0_RX */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****ENET Configuration*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN12_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt4&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA12 (pin 64) is configured as RMII0_RXD1 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN13_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt4&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA13 (pin 65) is configured as RMII0_RXD0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN14_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt4&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA14 (pin 66) is configured as RMII0_CRS_DV */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN15_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt4&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA15 (pin 67) is configured as RMII0_TXEN */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN16_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt4&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA16 (pin 68) is configured as RMII0_TXD0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN17_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt4&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA17 (pin 69) is configured as RMII0_TXD1 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN5_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt4&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA5 (pin 55) is configured as RMII0_RXER */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// On Demo Board&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// PORT_SetPinMux(PORTB, PIN0_IDX, kPORT_MuxAlt4); /* PORTB0 (pin H10) is configured as RMII0_MDIO */&lt;/P&gt;&lt;P&gt;// PORTB-&amp;gt;PCR[0] = ((PORTB-&amp;gt;PCR[0] &amp;amp;&lt;/P&gt;&lt;P&gt;// (~(PORT_PCR_ODE_MASK | PORT_PCR_ISF_MASK))) /* Mask bits to zero which are setting */&lt;/P&gt;&lt;P&gt;// | PORT_PCR_ODE(PCR_ODE_ENABLED) /* Open Drain Enable: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output. */&lt;/P&gt;&lt;P&gt;// );&lt;/P&gt;&lt;P&gt;// PORT_SetPinMux(PORTB, PIN1_IDX, kPORT_MuxAlt4); /* PORTB1 (pin H9) is configured as RMII0_MDC */&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//----Configured on iNetVu 7710 Version 5.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN7_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA7 (pin 59) is configured as RMII0_MDIO */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORTA-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;PCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[7] = ((PORTB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;PCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[7] &amp;amp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; (~(PORT_PCR_ODE_MASK | PORT_PCR_ISF_MASK))) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Mask bits to zero which are setting */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; | PORT_PCR_ODE(PCR_ODE_ENABLED) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Open Drain Enable: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN8_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA8 (pin 60) is configured as RMII0_MDC */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN26_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt2&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE26 (pin 47) is configured as ENET_1588_CLKIN */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;　&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****Initialize the SDRAMC pins*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;PORT_SetPinMux(PORTA, PIN6_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA6 (pin 58) is configured as CLKOUT */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Configured for RMII Network on Demo Board&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN0_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB0 (pin 81) is configured as SDRAM_CAS_b---Configured for RMII Network on Demo Board */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN1_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB1 (pin 82) is configured as SDRAM_RAS_b---Configured for RMII Network on Demo Board */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN2_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB2 (pin 83) is configured as SDRAM_WE */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN3_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB3 (pin 84) is configured as SDRAM_CS0_b */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN4_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB4 (pin 85) is configured as SDRAM_CS1_b */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;　&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Configure SDRAM Data Pins&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN20_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB20 (pin 99) is configured as SDRAM_D31, FB_AD31 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN21_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB21 (pin 100) is configured as FB_AD30, SDRAM_D30 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN22_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB22 (pin 101) is configured as FB_AD29, SDRAM_D29 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN23_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB23 (pin 102) is configured as SDRAM_D28, FB_AD28 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN12_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC12 (pin 117) is configured as FB_AD27, SDRAM_D27 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN13_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC13 (pin 118) is configured as SDRAM_D26, FB_AD26 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN14_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC14 (pin 119) is configured as SDRAM_D25, FB_AD25 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN15_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC15 (pin 120) is configured as FB_AD24, SDRAM_D24 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN5_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB5 (pin 86) is configured as PTB5 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN6_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB6 (pin 87) is configured as FB_AD23, SDRAM_D23 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN7_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB7 (pin 88) is configured as SDRAM_D22, FB_AD22 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN8_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB8 (pin 89) is configured as FB_AD21, SDRAM_D21 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN9_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB9 (pin 90) is configured as FB_AD20, SDRAM_D20 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN10_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB10 (pin 91) is configured as FB_AD19, SDRAM_D19 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN11_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB11 (pin 92) is configured as SDRAM_D18, FB_AD18 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****UART0 used as DEBUG interface on Demo Board*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN16_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB16 (pin 95) is configured as FB_AD17, SDRAM_D17---Used as DEBUG interface on Demo Board */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN17_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB17 (pin 96) is configured as FB_AD16, SDRAM_D16---Used as DEBUG interface on Demo Board */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Configure SDRAM Address&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN18_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB18 (pin 97) is configured as SDRAM_A23, FB_AD15 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN0_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC0 (pin 103) is configured as FB_AD14, SDRAM_A22 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN1_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC1 (pin 104) is configured as SDRAM_A21, FB_AD13 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN2_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC2 (pin 105) is configured as SDRAM_A20, FB_AD12 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN4_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC4 (pin 109) is configured as FB_AD11, SDRAM_A19 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN5_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC5 (pin 110) is configured as FB_AD10, SDRAM_A18 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN6_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC6 (pin 111) is configured as SDRAM_A17, FB_AD9 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN7_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC7 (pin 112) is configured as SDRAM_A16, FB_AD8 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN8_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC8 (pin 113) is configured as SDRAM_A15, FB_AD7 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN9_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC9 (pin 114) is configured as SDRAM_A14, FB_AD6 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN10_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC10 (pin 115) is configured as SDRAM_A13, FB_AD5 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN2_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD2 (pin 129) is configured as SDRAM_A12, FB_AD4 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN3_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD3 (pin 130) is configured as SDRAM_A11, FB_AD3 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN4_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD4 (pin 131) is configured as SDRAM_A10, FB_AD2 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN5_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD5 (pin 132) is configured as FB_AD1, SDRAM_A9 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Configure SDRAM Control signal&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN7_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD7 (pin 136) is configured as SDRAM_CKE */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN17_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC17 (pin 124) is configured as SDRAM_DQM3 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN16_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC16 (pin 123) is configured as SDRAM_DQM2 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN18_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC18 (pin 125) is configured as SDRAM_DQM1 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN19_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC19 (pin 126) is configured as SDRAM_DQM0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****Configure &lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; high address*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN28_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA28 (pin 79) is configured as FB_A25 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN29_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA29 (pin 80) is configured as FB_A24 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN15_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD15 (pin 144) is configured as FB_A23 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN14_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD14 (pin 143) is configured as FB_A22 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN13_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD13 (pin 142) is configured as FB_A21 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN12_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD12 (pin 141) is configured as FB_A20 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN11_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD11 (pin 140) is configured as FB_A19 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN10_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD10 (pin 139) is configured as FB_A18 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN9_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD9 (pin 138) is configured as FB_A17 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN8_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt6&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD8 (pin 137) is configured as FB_A16 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Configure &lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; RW, OE, chip select and etc Control signal&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTB, PIN19_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTB19 (pin 98) is configured as FB_OE_b */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN11_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC11 (pin 116) is configured as FB_RW_b */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN0_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD0 (pin 127) is configured as FB_CS1_b */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN1_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt5&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD1 (pin 128) is configured as FB_CS0_b */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//----*****Configure I2C0*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN10_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt2&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE10 (pin 13) is configured as I2C3_SDA */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN11_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt2&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE11 (pin 14) is configured as I2C3_SCL */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//----*****Configure CANBUS*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN24_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt2&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE24 (pin 45) is configured as CAN1_TX */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN25_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt2&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE25 (pin 46) is configured as CAN1_RX */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;　&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//----*****Configure as GPIO*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Configured on Demo Board&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN10_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA10 (pin M9) is configured as PTA10 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORTA-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;PCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[10] = ((PORTA-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;PCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[10] &amp;amp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK))) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Mask bits to zero which are setting */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; | PORT_PCR_PS(PCR_PS_UP) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Pull Select: Internal &lt;SPAN style="text-decoration: underline;"&gt;pullup&lt;/SPAN&gt; resistor is enabled on the corresponding pin, if the corresponding PE field is set. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; | PORT_PCR_PE(PCR_PE_ENABLED) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Pull Enable: Internal &lt;SPAN style="text-decoration: underline;"&gt;pullup&lt;/SPAN&gt; or &lt;SPAN style="text-decoration: underline;"&gt;pulldown&lt;/SPAN&gt; resistor is enabled on the corresponding pin, if the pin is configured as a digital input. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// PORT_SetPinMux(PORTA, PIN10_IDX, kPORT_MuxAsGpio); /* PORTA10 (pin 62) is configured as PTA10 */&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN11_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA11 (pin 63) is configured as PTA11 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN3_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC3 (pin 106) is configured as PTC3 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTC, PIN9_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTC9 (pin D7) is configured as PTC9 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTD, PIN6_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTD6 (pin 133) is configured as PTD6 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN2_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE2 (pin 3) is configured as PTE2 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN3_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE3 (pin 4) is configured as PTE3 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN6_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE6 (pin 9) is configured as PTE6 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN7_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE7 (pin 10) is configured as PTE7 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN12_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE12 (pin 15) is configured as PTE12 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN27_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE27 (pin 48) is configured as PTE27 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTE, PIN28_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAsGpio&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTE28 (pin 49) is configured as PTE28 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//----*****Configure JTAG*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN0_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt7&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA0 (pin 50) is configured as JTAG_TCLK */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN1_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt7&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA1 (pin 51) is configured as JTAG_TDI */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN2_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt7&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA2 (pin 52) is configured as JTAG_TDO */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN3_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt7&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA3 (pin 53) is configured as JTAG_TMS */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PORT_SetPinMux(PORTA, PIN4_IDX, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kPORT_MuxAlt7&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* PORTA4 (pin 54) is configured as NMI_b */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//-----The initialization done by tool generation&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Select RMII clock &lt;SPAN style="text-decoration: underline;"&gt;src&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; SIM-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SOPT2&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = ((SIM-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SOPT2&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp; (~(SIM_SOPT2_RMIISRC_MASK))) | SIM_SOPT2_RMIISRC(SOPT2_RMIISRC_ENET)); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Bit19==1---RMII clock source select: External bypass clock (ENET_1588_CLKIN).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; SIM-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SOPT5&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = ((SIM-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SOPT5&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; (~(SIM_SOPT5_UART1TXSRC_MASK | SIM_SOPT5_LPUART0TXSRC_MASK))) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Mask bits to zero which are setting */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; | SIM_SOPT5_UART1TXSRC(SOPT5_UART1TXSRC_UART_TX) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* UART 1 transmit data source select: UART1_TX pin */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; | SIM_SOPT5_LPUART0TXSRC(SOPT5_LPUART0TXSRC_LPUART_TX) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* LPUART0 transmit data source select: LPUART0_TX pin */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; SIM-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;USBPHYCTL&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = ((SIM-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;USBPHYCTL&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; (~(SIM_USBPHYCTL_USBVREGSEL_MASK))) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Mask bits to zero which are setting */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; | SIM_USBPHYCTL_USBVREGSEL(USBPHYCTL_USBVREGSEL_VREG_IN0) &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Selects the default input voltage source to the USB Regulator in case both VREG_IN0 and VREG_IN1 are powered. If only one of the regulator inputs is powered, it will automatically be selected by the regulator's power &lt;SPAN style="text-decoration: underline;"&gt;mux&lt;/SPAN&gt; circuitry.: VREG_IN0 will be selected if both regulator inputs are powered */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) Here is initialization and write, read that I copied from TWR-K65F demo.&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;status_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;STRONG&gt;SDRAM_Init&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;SDRAM_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; *base, &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; busClock_Hz)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;sdramc_config_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; config;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;sdramc_refresh_config_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; refConfig;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;sdramc_blockctl_config_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; ctlConfig;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* SDRAM refresh timing configuration. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; refConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;refreshTime&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAMC_RefreshThreeClocks&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Refresh time 4096 rows/ 64ms. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; refConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;sdramRefreshRow&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 15625;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; refConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;busClock_Hz&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = busClock_Hz;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* SDRAM controller configuration. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// /*SDRAM Port size: 32 bit, command bit 20. */&lt;/P&gt;&lt;P&gt;// ctlConfig.portSize = kSDRAMC_PortSize32Bit;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/*SDRAM Port size: 16 bit, command bit 20.---Modified by SU */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; ctlConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;portSize&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAMC_PortSize16Bit&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; ctlConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;location&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAMC_Commandbit20&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; ctlConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;block&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAMC_Block0&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* SDRAM with &lt;SPAN style="text-decoration: underline;"&gt;trcd&lt;/SPAN&gt;-15ns(&lt;SPAN style="text-decoration: underline;"&gt;min&lt;/SPAN&gt;), &lt;SPAN style="text-decoration: underline;"&gt;trp&lt;/SPAN&gt;-15ns(&lt;SPAN style="text-decoration: underline;"&gt;min&lt;/SPAN&gt;), &lt;SPAN style="text-decoration: underline;"&gt;tras&lt;/SPAN&gt;-37ns (&lt;SPAN style="text-decoration: underline;"&gt;min&lt;/SPAN&gt;). */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; ctlConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;latency&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAMC_LatencyOne&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; ctlConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;address&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = SDRAM_START_ADDRESS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; ctlConfig.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;addressMask&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x7c0000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; config.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;refreshConfig&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = &amp;amp;refConfig;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; config.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;blockConfig&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = &amp;amp;ctlConfig;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; config.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;numBlockConfig&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Initializes the SDRAM controller. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SDRAMC_Init(base, &amp;amp;config);&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* The external SDRAM initialization sequence. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;return&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; SDRAM_InitSequence(base, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAMC_Block0&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAM_MrsBurstLenOne&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAM_MrsSequential&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAM_MrsLatencyTwo&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAM_MrsStandOperation&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kSDRAM_MrsWriteBurst&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BOARD_InitPins();&lt;/P&gt;&lt;P&gt;BOARD_BootClockRUN();&lt;/P&gt;&lt;P&gt;BOARD_InitDebugConsole();&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// BOARD_InitPins();&lt;/P&gt;&lt;P&gt;// BOARD_BootClockRUN();&lt;/P&gt;&lt;P&gt;// BOARD_InitDebugConsole();&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//-----*****Copied from &lt;SPAN style="text-decoration: underline;"&gt;Httpsrv&lt;/SPAN&gt; demo*****-----&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Disable MPU.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; base-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CESR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp;= ~MPU_CESR_VLD_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// // Set RMII clock &lt;SPAN style="text-decoration: underline;"&gt;src&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;// SIM-&amp;gt;SOPT2 |= SIM_SOPT2_RMIISRC_MASK; // Done in BOARD_InitPins(void)&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//-----Copied from &lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; driver demo on TWR-K65F180M-----&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Set clock out to &lt;SPAN style="text-decoration: underline;"&gt;flexbus&lt;/SPAN&gt; CLKOUT. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CLOCK_SetClkOutClock(0); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// Select clock on CLKOUT pin(0---&lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; CLOCK)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// //-----*****Set RMII clock &lt;SPAN style="text-decoration: underline;"&gt;src&lt;/SPAN&gt;.*****----- //-----Copied from &lt;SPAN style="text-decoration: underline;"&gt;http&lt;/SPAN&gt; server demo application-----&lt;/P&gt;&lt;P&gt;// // Select RMII clock source(Bit19==1---External bypass clock(ENET_1588_CLKIN), ==0---EXTAL clock)&lt;/P&gt;&lt;P&gt;// SIM-&amp;gt;SOPT2 |= SIM_SOPT2_RMIISRC_MASK; // Done in BOARD_InitPins(void)-----&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****Sets the &lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; security level*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; soptReg = SIM-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SOPT2&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp; ~SIM_SOPT2_FBSL_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; SIM-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SOPT2&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = soptReg | SIM_SOPT2_FBSL(3); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//Bit9:8==11---Off-chip instruction accesses and data accesses are allowed&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Enable the FB_BE_xx_yy signal in &lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// SIM_base==0x4004_7000+0x1040==0x4004_8040(SIM_SCGC7, Bit0---&lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; clock enable/disable)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// CLOCK_EnableClock(kCLOCK_Flexbus0); // Done in FLEXBUS_Init()--- kCLOCK_Flexbus0 == 0x1040_0000&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// /* Set clock out to &lt;SPAN style="text-decoration: underline;"&gt;flexbus&lt;/SPAN&gt; CLKOUT. */&lt;/P&gt;&lt;P&gt;// CLOCK_SetClkOutClock(0);&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;// /* Sets the &lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; security level*/&lt;/P&gt;&lt;P&gt;// soptReg = SIM-&amp;gt;SOPT2 &amp;amp; ~SIM_SOPT2_FBSL_MASK;&lt;/P&gt;&lt;P&gt;// SIM-&amp;gt;SOPT2 = soptReg | SIM_SOPT2_FBSL(3);&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;// /* Enable the FB_BE_xx_yy signal in &lt;SPAN style="text-decoration: underline;"&gt;Flexbus&lt;/SPAN&gt; */&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; CLOCK_EnableClock(&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kCLOCK_Flexbus0&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; fbReg = FB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CSPMCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp; ~FB_CSPMCR_GROUP2_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; FB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CSPMCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = fbReg | FB_CSPMCR_GROUP2(2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; fbReg = FB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CSPMCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp; ~FB_CSPMCR_GROUP3_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; FB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CSPMCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = fbReg | FB_CSPMCR_GROUP3(2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; fbReg = FB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CSPMCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp; ~FB_CSPMCR_GROUP4_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; FB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CSPMCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = fbReg | FB_CSPMCR_GROUP4(2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; fbReg = FB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CSPMCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &amp;amp; ~FB_CSPMCR_GROUP5_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; FB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;CSPMCR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = fbReg | FB_CSPMCR_GROUP5(2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* SDRAM initialize. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; clockSrc = CLOCK_GetFreq(&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kCLOCK_BusClk&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Example Start!\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; (SDRAM_Init(EXAMPLE_SDRAMC, clockSrc) != &lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;&lt;EM&gt;kStatus_Success&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM &lt;SPAN style="text-decoration: underline;"&gt;Init&lt;/SPAN&gt; Failed\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Memory Write Start, Start Address 0x%x, Data Length %d !\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, sdram, datalen);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****Prepare data and write to SDRAM.*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; (index = 0; index &amp;lt; datalen; index++)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;sdram_writeBuffer[index] = index;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; *(&lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; *)(sdram + index) = sdram_writeBuffer[index];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Write finished!\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Read Start, Start Address 0x%x, Data Length %d !\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, sdram, datalen);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****Read data from the SDRAM.*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; (index = 0; index &amp;lt; datalen; index++)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; sdram_readBuffer[index] = *(&lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; *)(sdram + index);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// sdram_readBuffer[index] &amp;gt;&amp;gt;= 16;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Read finished!\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Write Data and Read Data Compare Start!\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;//-----*****Compare the two buffers.*****-----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; (datalen--)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; (sdram_writeBuffer[datalen] != sdram_readBuffer[datalen])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;result = false;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Write Data and Read Data Check Error=0x%x_0x%x_0x%x!\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, datalen, sdram_writeBuffer[datalen], sdram_readBuffer[datalen]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// break;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;else&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; ((datalen % 1024) == 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Write Data and Read Data_%d=%d_%d!\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, datalen, sdram_writeBuffer[datalen], sdram_readBuffer[datalen]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Write Data and Read Data Check_00=0x%x_0x%x_0x%x!\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;, datalen, sdram_writeBuffer[datalen], sdram_readBuffer[datalen]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; (result)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Write Data and Read Data Succeed.\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;else&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Write Data and Read Data Failed.\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"\r\n SDRAM Example End.\r\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;5. Could you tell me where the possible problems are? The SDRAM configuration is right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. I did more testing today and found the following:&lt;/P&gt;&lt;P&gt;1) When I change the latency to 0(1 before), I can write and read, but there is 20% error.&lt;/P&gt;&lt;P&gt;2) If I write 16 bit, I found the error only on lob byte. High byte always right.&lt;/P&gt;&lt;P&gt;There is eh same result on block0 and block1.&lt;/P&gt;&lt;P&gt;Is it possible to be related on SDRAM timing setting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. I checked SDRAM chip spec. and should set the latency to 3(3-3-3). I tried 3,2,1 and always read 0.&lt;/P&gt;&lt;P&gt;If I set to 0, it reads back the right data, but not reliable.&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me to find out where the problem is and how to configure SDRAM timing?&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Christie&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 14:11:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680794#M41901</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-09T14:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680795#M41902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did more testing on this and found:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can make it work fine if I set the as follows:&lt;/P&gt;&lt;P&gt;1) MCU system clock==180MHz. Not working on 90MHz&lt;/P&gt;&lt;P&gt;2) Busclock=45MHz. not working on 60MHZ, 22.5MHz&lt;/P&gt;&lt;P&gt;3) Latency == 3 as normal. Working on 1 as well. Not working on zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody help me to fix this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 15:24:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680795#M41902</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-09T15:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680796#M41903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyone to suggest me to do some testing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 13:50:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680796#M41903</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-12T13:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680797#M41904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am using SDRAM on MCF5282 MCU, I need to add 47p on clock, and 22ohm on control signals(CAS/, _CS0, and etc ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can Anyone tell me if I need to this as well on K66F? What are the purpose on these capacitor and resistors?&lt;/P&gt;&lt;P&gt;What is the value I should use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 15:22:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680797#M41904</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-12T15:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680798#M41905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, sorry for the later reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you provide the K66F with SDRAM devices schematics? Thanks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 08:28:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680798#M41905</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2017-06-13T08:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680799#M41906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the attached document and let me know what I need to test?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is running OK with system clock=180MHz and bus clock==45MHz. but not other frequency, even I tried 30MHx bus clock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 11:46:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680799#M41906</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-13T11:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680800#M41907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I add 12pF on clock, my board is working fine for now.&lt;/P&gt;&lt;P&gt;Could you tell me what is the reason behind it?&lt;/P&gt;&lt;P&gt;1) What the capacitor value should I use because I am going to do next version of PCB?&lt;/P&gt;&lt;P&gt;2) Do I need to add 22ohm on /CAS, /RAS, /SDWE, /SCKE, /SD_CS0, /SD_CS1? How about DQM2/DQM3?&lt;/P&gt;&lt;P&gt;If so, what is the reason behind it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 13:40:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680800#M41907</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-13T13:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680801#M41908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the detailed info.&lt;/P&gt;&lt;P&gt;I will check your questions and reply later.&lt;/P&gt;&lt;P&gt;It will take sometime and thanks for the patience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Ma Hui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 00:43:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680801#M41908</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2017-06-14T00:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680802#M41909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CLKOUT signal is not clear enough, so add a 12pF capacitor will filter some noise to enhance the clock signal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt; I don't think customer need to add a capacitor to clock line. The PCB layout need to avoid the clock signal be interfered.&lt;/P&gt;&lt;P&gt;2&amp;gt; The SDRAM is different with DDR SDRAM, which doesn't need the 22ohm serial resistor to SDRAM control signal pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the most issue caused by the PCB layout.&lt;/P&gt;&lt;P&gt;Please refer &lt;A href="http://www.nxp.com/assets/documents/data/en/application-notes/AN2910.pdf"&gt;this application note&lt;/A&gt; about layout guideline for DDR2 SDRAM, some principle is also suitable to SDRAM layout.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 03:27:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680802#M41909</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2017-06-14T03:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680803#M41910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing the testing and already run for 36 hours, and still works fine.&lt;/P&gt;&lt;P&gt;At the same time, I searched on NXP website to try to find the reason and what is best value needed for clock.&lt;/P&gt;&lt;P&gt;1) It says it is most related to the start-up time of clock is faster than other signals, like address, control, data and etc...&lt;/P&gt;&lt;P&gt;2) The second reason: The clock is not 50%, so need to have extra delay to compensate it.&lt;/P&gt;&lt;P&gt;3) When I am using MCF5282 with SDRAM, it is very similar speed, but there is capacitor and serial resistor on reference design, see attached SCH. I follow the reference design and work fine, no any issue...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my PCB layout:&lt;/P&gt;&lt;P&gt;a) It is less that 2" between MCU and memory chip.&lt;/P&gt;&lt;P&gt;b) Using 8 layers and should be good enough&lt;/P&gt;&lt;P&gt;c) The trace length of SDRAM related signal is exact same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know if I need to apply these on K66F design and what is optimized value of these&amp;nbsp;because I am going to next PCB layout version?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 12:15:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680803#M41910</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-14T12:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680804#M41911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check the attached document as well. I do not know if it is possible reason for K66F as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 12:29:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680804#M41911</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-14T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680805#M41912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any comment regarding to add the serial termination on SDRAM control signal?&lt;/P&gt;&lt;P&gt;Do I need to add it on DQMH and DQML as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2017 17:28:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680805#M41912</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-15T17:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680806#M41913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I once had a problem with SDRAM configuration which was related to the initialization of the SDRAM to set the number of wait states. There was some code in the initialization routine that was being removed by the&amp;nbsp;compiler code optimization features. The solution was to exclude the initialization routine from the optimization process. This could be something to look into and eliminate as a potential cause. Sometimes issues are due to multiple and contributing causes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 01:33:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680806#M41913</guid>
      <dc:creator>aptron_chad</dc:creator>
      <dc:date>2017-06-16T01:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680807#M41914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, sorry for the later reply.&lt;/P&gt;&lt;P&gt;Could you try to set the PORTx_PCRn [DSE] bit to using high drive strength of SDRAM related pins?&lt;/P&gt;&lt;P&gt;If the SDRAM trace length more than 10cm, customer can add serial 22ohm resistor to SDRAM control lines as line-impedance matching. I think DQMH and DQML pins also could add serial 22ohm resistors as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the AN1722 document, which mentioned SDRAM clocking related cases also be suitable with K66 product. There need to avoid the clock offset.&lt;/P&gt;&lt;P&gt;The TWR-K65F180M board design resource [TWR-K65F180M Design Package(REV D)] could be downloaded from &lt;A href="http://www.nxp.com/products/software-and-tools/hardware-development-tools/tower-development-boards/mcu-and-processor-modules/kinetis-modules/kinetis-k65-mcu-tower-system-module-for-kinetis-k26-k65-and-k66-mcus:TWR-K65F180M?tab=Design_Tools_Tab"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 02:40:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680807#M41914</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2017-06-16T02:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680808#M41915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you saying CAS latency? I confirmed it is there. Based on SDRAM chip, I have to set to 3.&lt;/P&gt;&lt;P&gt;I tried the different CAS latency, the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 12:13:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680808#M41915</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-16T12:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680809#M41916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trace length of SDRAM is less than 5cm. The most likely reason is related to clock shifting because it happened on LPC MCU from NXP? I just search on NXP web site, I found this and tried 12pF, it worked for me as well.&lt;/P&gt;&lt;P&gt;I just want to make sure it may happen on K65/K66 as well. It happened on MCF5282 for sure because I experienced it and fixed it by adding 22pF. Based on MCF5282 reference design, it is recommended. But, it didn't apply to TWR_K65F reference design. I want to know why? Still needed on K65/K66 as well because I am going to do the new PCB layout?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am going to try to set pin to high strength as well to see if it work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 12:29:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680809#M41916</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-16T12:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680810#M41917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you confirm that SDRAM used in K66F is similar to the one used in MCF5285?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 12:42:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680810#M41917</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-16T12:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680811#M41918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;I&lt;SPAN style="FONT-FAMILY:  Times New Roman ,serif; mso-ascii-font-family: Calibri;"&gt;'&lt;/SPAN&gt;m saying &lt;SPAN class="GramE"&gt;take a look&lt;/SPAN&gt; at your &lt;SPAN&gt;SDRAM_Init&lt;/SPAN&gt; function and check to see how &lt;SPAN&gt;its&lt;/SPAN&gt; being initialised and check if any compiler optimisation may be altering the intended sequence.&lt;/P&gt;&lt;P&gt;Perhaps you can try to set the compiler optimisation to None &lt;SPAN class="GramE"&gt;or&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;-&lt;/SPAN&gt;O0 &lt;/P&gt;&lt;P&gt;If the case I was using as an example the SDRAM routine included several writes to the same base address such as&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GramE"&gt;an the&lt;/SPAN&gt; compiler optimised that to&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*base = 0;&lt;/P&gt;&lt;P&gt;which lead to the &lt;SPAN&gt;SDRAm&lt;/SPAN&gt; not being correctly initialised.&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 12:46:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680811#M41918</guid>
      <dc:creator>chadwilliams</dc:creator>
      <dc:date>2017-06-16T12:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680812#M41919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the base for SDRAM is right and I didn't use optimization for now. It is set for none(-O0) for now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 15:50:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680812#M41919</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-16T15:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: K66F+16Bit SDRAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680813#M41920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to enable DSE on pin used for SDRAM. But, I found that not all SDRAM related pins can use this option(See page 183 on K66F menu).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 19:39:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66F-16Bit-SDRAM/m-p/680813#M41920</guid>
      <dc:creator>a8Chcx</dc:creator>
      <dc:date>2017-06-16T19:39:13Z</dc:date>
    </item>
  </channel>
</rss>

