I2C and DMA

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 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

0 Likes
2 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
Anonymous
Not applicable

 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.

0 Likes