<?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: atk source  device program in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/atk-source-device-program/m-p/492789#M79181</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi wang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reason may be clock gating in Clock Gating Control Register 2 (CGCR2).&lt;/P&gt;&lt;P&gt;Also one can attach jtag and check register contents, output uart data with jtag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jan 2016 10:20:19 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2016-01-15T10:20:19Z</dc:date>
    <item>
      <title>atk source  device program</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/atk-source-device-program/m-p/492788#M79180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am using imx257 &lt;/P&gt;&lt;P&gt;I want to add support for programming the spi flash m25p64 for imx257 .&lt;/P&gt;&lt;P&gt;I use the device program of atk source . I use the cygwin to compile it .&lt;/P&gt;&lt;P&gt;but ,I have no way to debug it ,then I add the following code in channel.c ,&lt;/P&gt;&lt;P&gt;I want to print something using uart5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void serial_setbrg(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; //u32 clk = 33250000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; u32 clk = 49875000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UFCR) = 4 &amp;lt;&amp;lt; 7; /* divide input clock by 2 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UBIR) = 0xf;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UBMR) = clk / (2 * 115200);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void serial_putc(const char c)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UTXD) = c;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* wait for transmitter to be ready */&lt;/P&gt;&lt;P&gt;&amp;nbsp; while (!(__REG(UART5_PHYS + UTS) &amp;amp; UTS_TXEMPTY))&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* If \n, also do \r */&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (c == '\n')&lt;/P&gt;&lt;P&gt;&amp;nbsp; serial_putc('\r');&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void serial_puts(const char *s)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; while (*s)&lt;/P&gt;&lt;P&gt;&amp;nbsp; serial_putc(*s++);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static int serial_init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; __writel(0x3, IOMUXC_BASE_ADDR + 0x060);//uart5_txd mux&lt;/P&gt;&lt;P&gt;&amp;nbsp; __writel(0x3, IOMUXC_BASE_ADDR + 0x064);//uart5_rxd mux&lt;/P&gt;&lt;P&gt;&amp;nbsp; __writel(0x80, IOMUXC_BASE_ADDR + 0x274);//uart5 RXD pad ctl&lt;/P&gt;&lt;P&gt;&amp;nbsp; __writel(0x80, IOMUXC_BASE_ADDR + 0x270);//uart5 TXD pad ctl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UCR1) = 0x0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UCR2) = 0x0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while (!(__REG(UART5_PHYS + UCR2) &amp;amp; UCR2_SRST))&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UCR3) = 0x0704;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UCR4) = 0x8000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UESC) = 0x002b;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UTIM) = 0x0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UTS) = 0x0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; serial_setbrg();&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UCR2) = UCR2_WS | UCR2_IRTS | UCR2_RXEN |&lt;/P&gt;&lt;P&gt;&amp;nbsp; UCR2_TXEN | UCR2_SRST;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __REG(UART5_PHYS + UCR1) = UCR1_UARTEN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I add the serail init in &lt;/P&gt;&lt;P&gt;atk_channel_init() function in channel.c&amp;nbsp; like this:&lt;/P&gt;&lt;P&gt;case CHAN_UART:&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* service watchdog */&lt;/P&gt;&lt;P&gt;&amp;nbsp; watchdog_service();&lt;/P&gt;&lt;P&gt;&amp;nbsp; serial_init();&lt;/P&gt;&lt;P&gt;&amp;nbsp; serial_puts("uart5 inited\n");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; When I use the atk tool with my mx25_spi.bin using uart1.&lt;/P&gt;&lt;P&gt;The atk tool show ram kernel downloading fine,but it can not print the ("uart5 inited\n");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I add this code to the uboot,it work fine ,uart1 and uart5 can work at same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is wrong?When the boot rom jump to mx25_spi.bin ,why uart5 can not work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 02:47:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/atk-source-device-program/m-p/492788#M79180</guid>
      <dc:creator>wangliang</dc:creator>
      <dc:date>2016-01-15T02:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: atk source  device program</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/atk-source-device-program/m-p/492789#M79181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi wang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reason may be clock gating in Clock Gating Control Register 2 (CGCR2).&lt;/P&gt;&lt;P&gt;Also one can attach jtag and check register contents, output uart data with jtag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 10:20:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/atk-source-device-program/m-p/492789#M79181</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-01-15T10:20:19Z</dc:date>
    </item>
  </channel>
</rss>

