Author Topic: Why is SAML22 I2C with DMA not transmitting more than 1 byte?  (Read 1657 times)

0 Members and 1 Guest are viewing this topic.

Offline m4l490nTopic starter

  • Contributor
  • Posts: 17
Why is SAML22 I2C with DMA not transmitting more than 1 byte?
« on: August 25, 2016, 05:00:27 pm »
Hello everybody

I'm starting with Atmel SAML microcontroller and I'm implementing the code example "Quick Start Guide for Using DMA with SERCOM I2C Master" http://asf.atmel.com/docs/3.21.0/samd21/html/asfdoc_sam0_sercom_i2c_master_dma_use_case.html and I'm having problems with it. I hooked up a logic analyzer to the bus and I'm observing that the peripheral just sends 1 byte, actually I can just see the address of the chip being sent and no bytes of the data I need to send.
 
Has anyone implemented I2C communications using DMA? I need advice here because I just implemented the example exactly as found in the quick start guide and is not working. It is supposed to be sending 10 bytes.
 
Thanks!!
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4104
  • Country: us
Re: Why is SAML22 I2C with DMA not transmitting more than 1 byte?
« Reply #1 on: August 25, 2016, 08:36:33 pm »
Logic analyzer shows
1. Start bit
2. Slave address ending with 0 (if 7 bit address, MSBs are the address, LSB is the R/W bit, which is zero for write)
And then..
3. ??

ACK or NACK? If NACK, that's as far as you will get. Double check the address is correct and the circuit is ok.

If you got an ACK, circuit is ok. Software/peripheral problem. Does this module trigger ISR? Did you set up your ISR?

Quote
exactly as found in the quick start guide
I hope you at least modified the slave address... What are you communicating with? It is up to the slave to ACK after the address has been sent. You can't "dry run" it without an actual working slave.
« Last Edit: August 25, 2016, 08:52:59 pm by KL27x »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf