Kinetis K20 I2C SDA bus low level @ 1 volt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetis K20 I2C SDA bus low level @ 1 volt

1,183 Views
rthornblad
Contributor II

To All,

Am running simple i2c test with 2 ea K20 talking back and forth to each other.

I am running into a couple of issues I haven't been able to explain.

I've been playing around with the pin control settings.

PORTB_PCR0   SCL

PORTB_PCR1   SDA

1.   code works when PCR's set to (ALT2 + ODE + PE).  However, the Low signal levels look bad on SDA (around 1V).

2.   Code does not work when PCR's set to (ALT2 + ODE).  But, low signal levels now look correct.

Is there any reason why i2c module requires a PULL DOWN Resister enabled?

I have external pullups on both SCL & SDA (I think they are 4.75K but I need to verify this)

Tried changing Pulldown to Pullup and no activity on bus at all with that config.

It acts like the Master cannot pull the bus completely low when the internal pullups are enabled.  And cannot see RX Data from the slave unless the pulldown is enabled.

Any Ideas?   I'm beginning to wonder if I've missed another config parameter somewhere.

Thanks,

-Roger

More Info

I forgot to mention that when the slave needs to pull SDA low that level is correct

Tags (1)
0 Kudos
5 Replies

957 Views
rthornblad
Contributor II

Hi Kerry,

I figured out the problem.  I screwed up the configuration in both Master and Slave parts..  Not sure why the level issues are not present when the slave module connected to the FPGA.

In any case I'm good to go.  it seems the moderators are pretty busy so I'm not sure when this will really post.

Thanks for your help.

Regards,

-Roger

957 Views
rthornblad
Contributor II

Another weird twist.

I've installed the slave device into the chassis where it is now communicating with a FPGA that is the I2C master and the levels on the i2C bus are now correct.  It appears the only time I get the strange levels is when I have 2 K20 devices connected together.  Very strange.

I believe I can get by with the current design however I would like to get to the bottom of this as we have plans to use K20's on both sides of future designs.

Best Regards,

-Roger

0 Kudos

957 Views
rthornblad
Contributor II

Hi Kerry,

High voltage is 2.5V with the external pullups.

Removed the external pullups as a quick test and tried (ALT2 + ODE + PE+PS(1)).

i.      SCL is constant @ 1 Volt

ii.      SDA is constant @ 0.3 Volts

iii.      No obvious transitions on either line now

Attached are 2 scope captures

Master222_Slave222.png

i.      2 are communicating but the SDA line has the 1V low

Config Reg is (ALT2 + ODE + PE+PS(0))

Master222_slave223.png

i.      2 are not commnicating.

ii.      Levels being issued by the Master seem OK. 

iii.      Slave fails to pull ACK bit low

Config Reg is (ALT2 + ODE + PE+PS(1))

If I disconnect the slave device from the bus the levels return to normal  Almost looks like in slave mode a DC level is being output on the 2 lines...  hard to believe that but ???

Thanks,

-Roger


Master222_Slave223

Master222_Slave222.PNG

Master222_Slave223

Master222_Slave223.PNG

0 Kudos

957 Views
rthornblad
Contributor II

Hi Kerry, thanks for getting back to me.

Part # is    k20dx128vlf5

I tried the ALT2 + ODE + PE+PS(1) with no luck.  Note I am modifying both sides so they match (have not tried individual setups on either side yet as I don't think they will help).

Will try the pullup value mods now and see where I get to.  If that still fails I will take some waveform captures and post them

Best Regards,

-Roger

0 Kudos

957 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Roger Thornblad,

    1. Please tell me what the K20 detail part number you are using.

    2. What the high level voltage on your I2C bus? 3.3V or others?
    3. Try to modify your external pull up to 10K.

    4. ALT2 + ODE + PE+PS(1), the test the I2C bus wave, if still have problem, please also share me your I2C oscilloscope bus wave.

Waiting for your updated information.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos