<?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: MCF5234: UART via DMA problem in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5234-UART-via-DMA-problem/m-p/154612#M4348</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emmanuel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read that thread before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As usual there is a little mistake that has huge consequences.&lt;/P&gt;&lt;P&gt;In my initialization-routine I swapped the digits of the interruptvectornumber for my dma interruptvector. So it was not setup and could not work. Now everything is fine and I can TX and RX without any problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;vy 73&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dirk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Feb 2009 15:41:33 GMT</pubDate>
    <dc:creator>sirlenzelot</dc:creator>
    <dc:date>2009-02-23T15:41:33Z</dc:date>
    <item>
      <title>MCF5234: UART via DMA problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5234-UART-via-DMA-problem/m-p/154610#M4346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks!&lt;/P&gt;&lt;P&gt;I am trying to activate UART via DMA but I'm running into some problems:&lt;/P&gt;&lt;P&gt;I am unable to activate DMAInterrupt on Transfer complete. Maybe I missed something.&lt;BR /&gt;I can see the interrupt is pending in the interrupt controller and I have setup an ISR in the vector table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;init CPU:&lt;BR /&gt;CPU_SetVect(DMA_INTVECTOR::INTVECTOR1 ,UARTTXDMAISR); // Sets ISR in the Vectortable&lt;BR /&gt;CPU_SetVect(DMA_INTVECTOR::INTVECTOR3 ,UARTRXDMAISR);&lt;BR /&gt;CPU_EnableCpuInterrupt(DMA_INTVECTOR::INTVECTOR1, 0); // Mask InterruptVector&lt;BR /&gt;CPU_EnableCpuInterrupt(DMA_INTVECTOR::INTVECTOR3, 0);&lt;BR /&gt;[..]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;init UART:&lt;BR /&gt;UART_ResetTX();&lt;BR /&gt;UART_ResetRX();&lt;BR /&gt;UART_SetInternalClock();&lt;BR /&gt;UART_SetBaudRate(115200);&lt;BR /&gt;UART_Mode1(_bpc=8, _paritymode=UART::NONE, _paritytype=UART::NONE, _ERR=0, _RTS=0, _INTREQ=0);&lt;BR /&gt;UART_Mode2(_channelmode=UART::NORMAL, _TXRTS=0, _TXCTS=0, _stopbits=1);&lt;BR /&gt;UART_EnableTX();&lt;BR /&gt;UART_EnableRX();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;init DMA:&lt;BR /&gt;SCM_DMA_MasterPrivilege(2, true); // DMA 2 (DMA Controller) Master Privilege&lt;BR /&gt;SCM_DMA_Control(1, DMA_CHANNEL::C_UARTTX0); // DMA 1 UART0 TX&lt;BR /&gt;SCM_DMA_Control(3, DMA_CHANNEL::C_UARTRX0); // DMA 3 UART0 RX&lt;BR /&gt;SCM_DMA_ACCESS(DMA_CHANNEL::C_UART0, 4); // ACCESS User+Supervisor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;setup TX:&lt;BR /&gt;DMA_ClearInterrupt(_dmachannelTX); //DSR.DONE=1&lt;BR /&gt;DMA_SetSourceAddress(_dmachannelTX, dmaTXbuffer);&lt;BR /&gt;DMA_SetDestinationAddress(_dmachannelTX, UART_TX_REGISTER);&lt;BR /&gt;DMA_SetByteCountRegister(_dmachannelTX, dmaTXbuffersize);&lt;BR /&gt;DMA_EnableExternalRequest(_dmachannelTX, true);//DCR.EEXT=1&lt;BR /&gt;DMA_EnableInternalInterrupt(_dmachannelTX, true);//DCR.INT=1&lt;BR /&gt;DMA_EnableCycleSteal(_dmachannelTX, true);//DCR.CS=1&lt;BR /&gt;DMA_SetSourceSize(_dmachannelTX, 1); // Byte&lt;BR /&gt;DMA_SetDestinationSize(_dmachannelTX, 1); // Byte&lt;BR /&gt;DMA_EnableSourceIncrement(_dmachannelTX, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;setup RX:&lt;BR /&gt;DMA_ClearInterrupt(_dmachannelRX); //DSR.DONE=1&lt;BR /&gt;DMA_SetSourceAddress(_dmachannelRX, UART_RX_REGISTER);&lt;BR /&gt;DMA_SetDestinationAddress(_dmachannelRX, dmaRXbuffer);&lt;BR /&gt;DMA_SetByteCountRegister(_dmachannelRX, dmaTXbuffersize);&lt;BR /&gt;DMA_EnableExternalRequest(_dmachannelRX, true);//DCR.EEXT=1&lt;BR /&gt;DMA_EnableInternalInterrupt(_dmachannelRX, true);//DCR.INT=1&lt;BR /&gt;DMA_EnableCycleSteal(_dmachannelRX, true);//DCR.CS=1&lt;BR /&gt;DMA_SetSourceSize(_dmachannelRX, 1); // Byte&lt;BR /&gt;DMA_SetDestinationSize(_dmachannelRX, 1); // Byte&lt;BR /&gt;DMA_EnableDestinationIncrement(_dmachannelRX, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;BR /&gt;For each write I do:&lt;BR /&gt;DMA_ClearInterrupt(_dmachannelTX);&lt;BR /&gt;DMA_SetSourceAddress(_dmachannelTX, adr);&lt;BR /&gt;DMA_SetDestinationAddress(_dmachannelTX, UART_TX_REGISTER);&lt;BR /&gt;DMA_SetByteCountRegister(_dmachannelTX, len);&lt;BR /&gt;DMA_EnableExternalRequest(_dmachannelTX, true);&lt;BR /&gt;DMA_EnableInternalInterrupt(_dmachannelTX, true);&lt;BR /&gt;DMA_EnableCycleSteal(_dmachannelTX, true);&lt;BR /&gt;DMA_SetSourceSize(_dmachannelTX, 1); // Byte&lt;BR /&gt;DMA_SetDestinationSize(_dmachannelTX, 1); // Byte&lt;BR /&gt;DMA_EnableSourceIncrement(_dmachannelTX, true);&lt;BR /&gt;DMA_StartTransfer(_dmachannelTX);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should do the DMA_ClearInterrupt(_dmachannelTX); in the ISR, but as I never reached the ISR, I put it here for testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Now, every second time if I hit the ClearInterrupt thing and write to the register, I get a Configuration Error and the transfer is not committed.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My questions:&lt;BR /&gt;1) What did I forget to get the interrupt work?&lt;BR /&gt;2) How can I avoid the Configuration Error after setting DSR.DONE=1?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;vy73&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dirk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 15:01:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5234-UART-via-DMA-problem/m-p/154610#M4346</guid>
      <dc:creator>sirlenzelot</dc:creator>
      <dc:date>2009-02-19T15:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5234: UART via DMA problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5234-UART-via-DMA-problem/m-p/154611#M4347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dirk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should have a look to &lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=3078&amp;amp;query.id=10971#M3078" target="_blank"&gt;this thread&lt;/A&gt;, I tried and it works fine for a coldFire V2. It could inspired you for V4 core.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Emmanuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 15:44:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5234-UART-via-DMA-problem/m-p/154611#M4347</guid>
      <dc:creator>Nouchi</dc:creator>
      <dc:date>2009-02-19T15:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5234: UART via DMA problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5234-UART-via-DMA-problem/m-p/154612#M4348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emmanuel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read that thread before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As usual there is a little mistake that has huge consequences.&lt;/P&gt;&lt;P&gt;In my initialization-routine I swapped the digits of the interruptvectornumber for my dma interruptvector. So it was not setup and could not work. Now everything is fine and I can TX and RX without any problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;vy 73&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dirk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 15:41:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5234-UART-via-DMA-problem/m-p/154612#M4348</guid>
      <dc:creator>sirlenzelot</dc:creator>
      <dc:date>2009-02-23T15:41:33Z</dc:date>
    </item>
  </channel>
</rss>

