<?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>S32KのトピックRe: S32k I2C DMA</title>
    <link>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736584#M1900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Koorosh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MasterSendData it’s a non-blocking function, even if you use DMA or interrupts you have to ensure that master ended the transfer. The difference between DMA and interrupts mode is the CPU usage. If your application has other things to do besides sending/receiving data, using the DMA mode could be an advantage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also use blocking functions (MasterSendDataBlocking/MasterReceiveDataBlocking) if you only wait to send/receive data in your application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DMA don’t have to be reinitialized, the LPI2C driver does internally all the configurations for DMA channel, you just have to call again receive/send function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Feb 2018 09:50:14 GMT</pubDate>
    <dc:creator>AlinaB</dc:creator>
    <dc:date>2018-02-14T09:50:14Z</dc:date>
    <item>
      <title>S32k I2C DMA</title>
      <link>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736581#M1897</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'm trying to transmit 32 bytes on I2C bus using DMA and I'm using PE to configure this.&lt;/P&gt;&lt;P&gt;This is not working for me.&lt;/P&gt;&lt;P&gt;It works only if I place a break point on the CALL&amp;nbsp; to &lt;STRONG&gt;LPI2C_DRV_MasterSendData(0,tx_buff1,34,1);&lt;/STRONG&gt;&amp;nbsp; in main and do a step over. That way I can see the CLK and DATA on the scope . I can't get it to work any other way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should mention that I could send and read back to the same slave device using PE in none blocking interrupt configuration with no issues at all .&lt;/P&gt;&lt;P&gt;I decided to go with DMA JUST TO REDUCE the CPU LOAD.&lt;/P&gt;&lt;P&gt;I started to this in 2 phases : DMA_TX and then DMA_RX however I'm stuck on1st phase.&lt;/P&gt;&lt;P&gt;I stepped through the code and looked at relevant registers, everything seems ok.&lt;/P&gt;&lt;P&gt;So at this point I need more eyes on this.&lt;/P&gt;&lt;P&gt;By the way I noticed that PE does not or incorrectly initializes DMAMUX. I DON'T KNOW IF THIS IS ABUG OR&amp;nbsp;I MISSED SOMETHING, anyways I do initialize DMAMUX&amp;nbsp;in project.&lt;/P&gt;&lt;P&gt;The project is attached, sorry for all the comment outs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 22:33:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736581#M1897</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2018-02-09T22:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: S32k I2C DMA</title>
      <link>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736582#M1898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Koorosh,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What version of SDK are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For lpi2c driver one DMA channel can be used to receive and transmit data (you don't need one for transmitting data and another one to receive), the request for DMA channel is changed at runtime. You should remove&amp;nbsp;LPI2C_DRV_MasterSetDmaChannel from the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you observe if you don't put a break point at&amp;nbsp;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;LPI2C_DRV_MasterSendData,&amp;nbsp;&lt;/STRONG&gt;no data is sent at all, not even the address?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&amp;nbsp;&lt;BR /&gt;Alina&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 13:14:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736582#M1898</guid>
      <dc:creator>AlinaB</dc:creator>
      <dc:date>2018-02-13T13:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: S32k I2C DMA</title>
      <link>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736583#M1899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Banica,&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I followed your comment regarding needing only one DMA channel&amp;nbsp;for both I2C_TX/I2C_RX&amp;nbsp; , Thank you for that.&lt;/P&gt;&lt;P&gt;AND REGARDING THE ISSUE WITH BREAKPOINT :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I&amp;nbsp;do:&lt;/P&gt;&lt;P&gt;LPI2C_DRV_MasterSendData(0,tx_buff1,34,1);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;without the breakpoint nothing goes out(DMA is used)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However when I do this:&lt;/P&gt;&lt;P&gt;LPI2C_DRV_MasterSendData(0,tx_buff1,34,1);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;while&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; ( LPI2C_DRV_MasterGetTransferStatus(INST_LPI2C1, NULL) == &lt;/SPAN&gt;&lt;EM style=": ; color: #0000c0; font-size: small;"&gt;STATUS_BUSY&lt;/EM&gt;&lt;SPAN style="font-size: small;"&gt;) {}; (DMA is used)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;It appears it is working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;I have 2 questions about this:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: small;"&gt;what is the point of using DMA , if I still have to wait in a while loop?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: small;"&gt;what if I need to send&amp;nbsp; back to back SENDS/RECEIVES using DMA? is DMA need to be reinitialized in the Major loop complete interrupt?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:57:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736583#M1899</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2018-02-13T16:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: S32k I2C DMA</title>
      <link>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736584#M1900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Koorosh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MasterSendData it’s a non-blocking function, even if you use DMA or interrupts you have to ensure that master ended the transfer. The difference between DMA and interrupts mode is the CPU usage. If your application has other things to do besides sending/receiving data, using the DMA mode could be an advantage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also use blocking functions (MasterSendDataBlocking/MasterReceiveDataBlocking) if you only wait to send/receive data in your application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DMA don’t have to be reinitialized, the LPI2C driver does internally all the configurations for DMA channel, you just have to call again receive/send function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 09:50:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32k-I2C-DMA/m-p/736584#M1900</guid>
      <dc:creator>AlinaB</dc:creator>
      <dc:date>2018-02-14T09:50:14Z</dc:date>
    </item>
  </channel>
</rss>

