ATMEGA4808 I2C glitch before data transferred

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all,

 

In short, I am in the process of connecting the AD5933 Eval Board "EVAL-AD5933EBZ" to the Microchip AVR-IoT WG Development Board. I am not having very much success in communicating with the impedance measuring device. I can successfully communicate with the eval board using the AD5933 Software Evaluation and Arduino Mega 1280 development boards.

After digging a little deeper into the issue I noticed the ATMEGA4808 on the Microchip AVR-IoT WG Development Board seems to be pulling both the I2C SCL and SDA lines low. I am assuming this is when the I2C block is being enabled. In the scope image below there's a 1/2us glitch before the SDA line is pulled low.

Has anyone come across such an issue before?

 

Thank you,

 

 

 

** EDIT **

After further investigation, it seems the TWI flush function is causing this. 

 

http://ww1.microchip.com/downloads/en/DeviceDoc/megaAVR-0-series-Family-Data-Sheet-40002015C.pdf, page 335

Writing a '1' to this bit generates a strobe for one clock cycle disabling and then enabling the master.

TWI0.MCTRLB |= TWI_FLUSH_bm;

 

I need to test with everything connected again to see my communication issues have been fixed.

 

This topic has a solution.
Last Edited: Tue. Sep 10, 2019 - 12:00 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Further testing has shown that the 1/2us glitch where the SCL and SDA signals are pulled low for 1/2us caused communication issues between ATmega4808 master and AD5933 slave.

After commenting "TWI0.MCTRLB |= TWI_FLUSH_bm;"  from the Microchip I2C driver all now seems to be functional.

 

Consider this thread closed.