2 Replies Latest reply on Nov 24, 2012 3:31 AM by kishore.kumar

    I2C and DMA

    napolean.bonaparte

       Hi,

         

      I am doing a project where data comes from I2C bus.I want to store this data using DMA in PSoC3 (Master). Do you have any project or article regarding this. 

         

      There are interrupt terminals for SPI and UART, but not for I2C..:(

         

       

         

      regards

         

      Nepolean

        • 1. Re: I2C and DMA
          user_14586677

          You might want to post a tech case -

             

           

             

          www.cypress.com

             

          “Support”

             

          “Technical Support”

             

          “Create a Case”

             

           

             

          You could consider an approach where you poll I2C status, and trigger

             

          a DMA transfer of the read buffer when its staus flag is ready. But that

             

          seems to be a defeat of general DMA capability to be fully automatic.

             

           

             

          Regards, Dana.

          • 2. Re: I2C and DMA
            kishore.kumar

             Using I2C & DMA is not very easy as the I2C component is highly interrupt driven. If you get a chance to look at I2C.c file, you can understand how the data movement is being handled by the component - The hardware component only provides certain internal signals for start/stop/read,write/byte received conditions but only CPU takes care of futher processing and data movements.

               

            So what you can do with DMA is this - Instead of using CPU to move the data from user register to I2C buffer or vice-versa, you can give a trigger to DMA and let DMA to transfer the data. If you want to remove the processing overhead of CPU in handling those internal signals, then probably you need to write some more verilog code to do provide triggers to DMA for completely avoiding the CPU intervention.