<?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>Kinetis MicrocontrollersのトピックRe: Issue with k20 EDMA DREQ bit</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871244#M51881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you jing for your valuable reply.&lt;/P&gt;&lt;P&gt;I have fixed this issue by disabling EDMA channel from DMUX after done interrupt and &amp;nbsp;enabling again before setting ERQ bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Dinakaran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Apr 2019 13:39:54 GMT</pubDate>
    <dc:creator>murugesan_dinak</dc:creator>
    <dc:date>2019-04-10T13:39:54Z</dc:date>
    <item>
      <title>Issue with k20 EDMA DREQ bit</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871240#M51877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using two UART channel. Each channel is configured with EDMA for transmission.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both UART channels are transmitting data simultaneously.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is getting data bytes of previously sent bytes.&lt;/P&gt;&lt;P&gt;It seems like EDMA is retransmitting data bytes which was already transmitted in the previous call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is observed when we run multiple ports at same time at high baud rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;config:&lt;/P&gt;&lt;P&gt;SADDR = data_buff[];&lt;BR /&gt;DADDR = UART data register&lt;BR /&gt;NBYTES_MLOFFNO = 1&lt;BR /&gt;minor loop linking disabled and&amp;nbsp;SCG mode disabled&lt;BR /&gt;CITER_ELINKNO = bytes_to_be_transmit&lt;BR /&gt;BITER_ELINKNO = bytes_to_be_transmit&lt;BR /&gt;SOFF = 1&lt;BR /&gt;DOFF = 0&lt;BR /&gt;ATTR_SSIZE = 8bit&lt;BR /&gt;ATTR_DSIZE = 8bit&lt;BR /&gt;SLAST =0&lt;BR /&gt;DLAST_SGA = 0&lt;BR /&gt;CSR_DREQ =1&lt;BR /&gt;CSR_INTMAJOR =1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Using fixed priority arbitration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the transfer starts after setting ERQ bit of particular channel.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2019 07:27:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871240#M51877</guid>
      <dc:creator>murugesan_dinak</dc:creator>
      <dc:date>2019-03-06T07:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with k20 EDMA DREQ bit</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871241#M51878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you give example code for the problem? Or, k20 has SDK package. There is EDMA example and UART-DMA examples. You can refer to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2019 10:33:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871241#M51878</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-03-07T10:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with k20 EDMA DREQ bit</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871242#M51879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;void hal_serial_k20_uart_edma_config_tx(hal_serial_channel_t port_id)&lt;BR /&gt;{&lt;BR /&gt; hal_serial_k20_uart_port_t *port;&lt;BR /&gt; port = (hal_serial_k20_uart_port_t *)hal_serial_port_list[port_id];&lt;/P&gt;&lt;P&gt;/*Configuring DMA channel for data transfer*/&lt;BR /&gt; port-&amp;gt;k20_uart_edma_channel = port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn;&lt;/P&gt;&lt;P&gt;/*Configure the destination address as the K20_UART data register as the data needs to be moved from the local buffer to K20_UART DATA buffer*/&lt;BR /&gt; R_EDMA_DMA_DADDR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) = port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_data_reg_addr;&lt;BR /&gt; /*Configure the source address as the data array*/&lt;BR /&gt; R_EDMA_DMA_SADDR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) =(hal_u32_t)(&amp;amp;port-&amp;gt;k20_uart_edma_tx_buf[0]);&lt;/P&gt;&lt;P&gt;/*Update the no of bytes to be transmitted in one single interrupt*/&lt;BR /&gt; R_EDMA_DMA_NBYTES_MLOFFNO(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) = 1;&lt;/P&gt;&lt;P&gt;/*Disable the minor loop source and destination offset*/&lt;BR /&gt; R_EDMA_DMA_NBYTES_MLOFFNO(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_NBYTES_MLOFFNO_SMLOE &amp;lt;&amp;lt; R_SO_EDMA_DMA_NBYTES_MLOFFNO_SMLOE);&lt;BR /&gt; R_EDMA_DMA_NBYTES_MLOFFNO(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_NBYTES_MLOFFNO_DMLOE &amp;lt;&amp;lt; R_SO_EDMA_DMA_NBYTES_MLOFFNO_DMLOE);&lt;/P&gt;&lt;P&gt;/*Disable the channel-channel linking on completion of minor loop*/&lt;BR /&gt; R_EDMA_DMA_CITER_ELINKNO(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_CITER_ELINKNO_ELINK &amp;lt;&amp;lt; R_SO_EDMA_DMA_CITER_ELINKNO_ELINK);&lt;BR /&gt; R_EDMA_DMA_BITER_ELINKNO(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_BITER_ELINKNO_ELINK &amp;lt;&amp;lt; R_SO_EDMA_DMA_BITER_ELINKNO_ELINK);&lt;/P&gt;&lt;P&gt;/*Set the CITER count as the no of bytes to be transmitted*/&lt;BR /&gt; R_EDMA_DMA_CITER_ELINKNO(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) = port-&amp;gt;bytes_to_be_transmit;&lt;BR /&gt; R_EDMA_DMA_BITER_ELINKNO(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) = port-&amp;gt;bytes_to_be_transmit;&lt;/P&gt;&lt;P&gt;/*Set the source offset as 1 as the array index needs to be incremented while reading from the local buffer*/&lt;BR /&gt; R_EDMA_DMA_SOFF(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) = 1;&lt;BR /&gt; R_EDMA_DMA_DOFF(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) = 0;&lt;/P&gt;&lt;P&gt;/*Set the source address and destination address data size*/&lt;BR /&gt; R_EDMA_DMA_ATTR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_ATTR_SSIZE &amp;lt;&amp;lt; R_SO_EDMA_DMA_ATTR_SSIZE);&lt;BR /&gt; R_EDMA_DMA_ATTR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_ATTR_DSIZE &amp;lt;&amp;lt; R_SO_EDMA_DMA_ATTR_DSIZE);&lt;/P&gt;&lt;P&gt;/*Disable the address modulo feature*/&lt;BR /&gt; R_EDMA_DMA_ATTR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_ATTR_DMOD &amp;lt;&amp;lt; R_SO_EDMA_DMA_ATTR_DMOD);&lt;BR /&gt; R_EDMA_DMA_ATTR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_ATTR_SMOD &amp;lt;&amp;lt; R_SO_EDMA_DMA_ATTR_SMOD);&lt;/P&gt;&lt;P&gt;/*Disable the bandwidth control*/&lt;BR /&gt; R_EDMA_DMA_CSR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_CSR_BWC &amp;lt;&amp;lt; R_SO_EDMA_DMA_CSR_BWC);&lt;/P&gt;&lt;P&gt;/*Disable the channel to channel linking on major loop complete */&lt;BR /&gt; R_EDMA_DMA_CSR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_CSR_MAJORLINKCH &amp;lt;&amp;lt; R_SO_EDMA_DMA_CSR_MAJORLINKCH);&lt;/P&gt;&lt;P&gt;/*Disbale the major loop half counter interrupt*/&lt;BR /&gt; R_EDMA_DMA_CSR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_CSR_INTHALF &amp;lt;&amp;lt; R_SO_EDMA_DMA_CSR_INTHALF);&lt;/P&gt;&lt;P&gt;/*Initiate interrupt when major loop count completes*/&lt;BR /&gt; R_EDMA_DMA_CSR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) |= (R_M_EDMA_DMA_CSR_INTMAJOR &amp;lt;&amp;lt; R_SO_EDMA_DMA_CSR_INTMAJOR);&lt;/P&gt;&lt;P&gt;/*Disable scatter gather mode*/&lt;BR /&gt; R_EDMA_DMA_CSR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_CSR_ESG &amp;lt;&amp;lt; R_SO_EDMA_DMA_CSR_ESG);&lt;/P&gt;&lt;P&gt;/* After message is transferred adjust the src address to the beginning */&lt;BR /&gt; R_EDMA_DMA_SLAST(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) = -port-&amp;gt;bytes_to_be_transmit;&lt;/P&gt;&lt;P&gt;/* DLAST_SGA remains the same as data reg address never changes */&lt;BR /&gt; R_EDMA_DMA_DLAST_SGA(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) = 0;&lt;/P&gt;&lt;P&gt;/*Enable the DREQ bit so that the ERQ is automatically cleared when the major loop count expires*/&lt;BR /&gt; R_EDMA_DMA_CSR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) |= (R_M_EDMA_DMA_CSR_DREQ &amp;lt;&amp;lt; R_SO_EDMA_DMA_CSR_DREQ);&lt;BR /&gt; /*Enable the request signal for EDMA channel for data transfer*/&lt;BR /&gt; R_EDMA_DMA_ERQ(R_O_EDMA) |= 1&amp;lt;&amp;lt;(port-&amp;gt;k20_uart_edma_channel) ;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function is continuously called, whenever there is data to transmit.&lt;/P&gt;&lt;P&gt;Each time transmitting sequence of 101 bytes and receiving those bytes in the other end.&lt;/P&gt;&lt;P&gt;Each sequence is packed with sequence number(first 4 bytes) and file separator(last byte 28)&lt;/P&gt;&lt;P&gt;The captured data is as follows&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0, 0, 73, 148,&lt;/STRONG&gt; 167, 177, 139, 33, 57, 3, 204, 213, 4, 174, 178, 8, 171, 244, 64, 35, 125, 116, 223, 134, 59, 103, 83, 114, 111, 12, &lt;BR /&gt;182, 205, 223, 70, 171, 135, 119, 182, 41, 176, 58, 117, 134, 62, 36, 185, 197, 207, 174, 6, 115, 171, 249, 210, 178, 53, 59, 6, 167, 42, &lt;BR /&gt; 18, 221, 119, 241, 36, 163, 249, 155, 90, 162, 204, 148, 24, 210, 82, 60, 140, 24, 139, 187, 157, 126, 230, 151, 82, 153, 205, 13, 160, 244, 182, 50, 211, 47, 164, 119, 197, 212, 167, 165, 28, &lt;BR /&gt; &lt;EM&gt;&lt;STRONG&gt;0, 0, 73, 148,&lt;/STRONG&gt; 167, 177, 139, 33, 57, 3, 204, 213, 4, 174, 178, 8, --------This is the corrupted message byte.&amp;nbsp;&lt;/EM&gt;&lt;BR /&gt; &lt;STRONG&gt;0, 0, 73, 149,&lt;/STRONG&gt; 65, 223, 66, 89, 178, 148, 21, 191, 45, 32, 250, 202, 31, 225, 99, 113, 251, 176, 253, 27, 30, 37, 180, 78, 248, 227, &lt;BR /&gt;242, 240, 54, 17, 132, 227, 209, 227, 38, 170, 22, 58, 63, 85, 230, 96, 80, 178, 254, 178, 149, 112, 46, 197, 237, 74, 234, 162, 24, 100, &lt;BR /&gt; 7, 12, 85, 61, 156, 89, 33, 111, 188, 198, 26, 210, 2, 90, 41, 104, 58, 248, 154, 57, 43, 48, 41, 89, 117, 23, 35, 97, 57, 60, &lt;BR /&gt; 69, 191, 199, 26, 253, 100, 242, 152, 191, 155, 44, 28,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This corrupted message byte looks like previous sequence bytes. Got this message in between two valid sequences&lt;/P&gt;&lt;P&gt;How to avoid this behavior.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2019 07:50:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871242#M51879</guid>
      <dc:creator>murugesan_dinak</dc:creator>
      <dc:date>2019-03-21T07:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with k20 EDMA DREQ bit</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871243#M51880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've compared your TCD setting with the demo in SDK. It seems there is no problem.&lt;/P&gt;&lt;P&gt;I have 2 concern. First is some definition.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;R_EDMA_DMA_ATTR(R_O_EDMA,port-&amp;gt;port_cfg-&amp;gt;td_port_config.k20_uart_edma_tx_chn) &amp;amp;= ~(R_M_EDMA_DMA_ATTR_DMOD &amp;lt;&amp;lt; R_SO_EDMA_DMA_ATTR_DMOD);&lt;/P&gt;&lt;P&gt;DMOD is a 5bit field. R_M_EDMA_DMA_ATTR_DMOD should be 0x1f. There are many other field like this you should take care.&lt;/P&gt;&lt;P&gt;Second is in some K20 chip, like MK20FX512xxx12 or MK20FN1M0xxx12, UART0 and UART1 peripheral requests trigger DMA twice if core clock and internal bus clock frequencies are equal.&lt;/P&gt;&lt;P&gt;If the problem is still there, you can send me your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 06:42:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871243#M51880</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-04-10T06:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with k20 EDMA DREQ bit</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871244#M51881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you jing for your valuable reply.&lt;/P&gt;&lt;P&gt;I have fixed this issue by disabling EDMA channel from DMUX after done interrupt and &amp;nbsp;enabling again before setting ERQ bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Dinakaran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 13:39:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-with-k20-EDMA-DREQ-bit/m-p/871244#M51881</guid>
      <dc:creator>murugesan_dinak</dc:creator>
      <dc:date>2019-04-10T13:39:54Z</dc:date>
    </item>
  </channel>
</rss>

