ATECC508A i2cdetect

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

Hello.

 

I am starting to integrate an ATECC508A to an Embedded Linux environment (Toradex Apalis iMX6 + Ixora) via i2c.

 

From the personalization guide (http://www.atmel.com/Images/Atme...), 

I found that the default i2c address is 0xC0.

 

I connected the ATECC508A to the Linux board (3v3, GND, SDA and SCL).

I tried running i2cdetect to see if the device would be recognized, with no success.

 

Have I forgot to do something?

Last Edited: Tue. Feb 21, 2017 - 09:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

what library are you using for communication with the chip over i2c..?

or are you just using ioctl function..?

 

Jatin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Jatin, thanks for your response.

 

I haven't started working with any code yet.

 

I'm using i2c-tools:

 

"I2C TOOLS FOR LINUX

===================

This package contains an heterogeneous set of I2C tools for the Linux kernel
as well as an I2C library. The tools were originally part of the lm-sensors
project but were finally split into their own package for convenience. The
library is used by some of the tools, but can also be used by third-party
applications. The tools and library compile, run and have been tested on
GNU/Linux."

 

Amongst other utilities, i2c-tools has i2cdetect, which is what I'm using to try to detect the chip:

https://linux.die.net/man/8/i2cd...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am using same chip on my board but was unable to detect. then i lowered the frequency of I2C then i was able to detect the device.

At what frequency are you running your i2c...?

Can you help me regarding the configuration zone of this chip.

 

Jatin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is a very good tip. Thanks for sharing Jatin!

 

What frequency are you using?

Are you also using linux?

I don't know how to change the i2c scl frequency under the linux kernel, so I'll have to do some research.

 

I haven't tried anything regarding configuration zones yet. But I'll let you know when I do.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am also using it on linux.

i am using on frequency 100khz.

i manually modified the dtb file which is under /boot/ directory.

 

please let me know about configuration zone as soon as you know

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After you modified this frequency, were you able to use i2cdetect?

 

Sure, I'll post here anything I find out about configuration zones.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes i was able to use i2cdetect.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I checked the i2c clock configuration in my linux board, it is 100kHz by default.

 

I tought maybe the board couldn't supply enough current to the ATECC508A, so now I'm using a separate power supply.

 

Now I'm getting different results, which are still weird.

Everytime I run i2c detect, I get different addresses.

Jatin, have you had similar results?

 

root@apalis-imx6:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- 22 -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- 45 -- -- -- -- -- -- -- 4d -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- --
70: -- -- -- -- 74 -- -- --
root@apalis-imx6:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- 17 -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- 43 -- -- -- -- -- -- -- -- -- 4d -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- 67 -- 69 -- -- 6c -- -- --
70: -- -- -- -- -- -- -- --
root@apalis-imx6:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- 0c -- -- --
10: -- 11 -- -- -- -- -- -- -- 19 -- -- -- -- 1e --
20: -- -- -- -- 24 25 -- -- -- -- -- -- -- -- 2e --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- 

 

Last Edited: Wed. Feb 22, 2017 - 09:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

Address of this chip is 0x60 and there is nothing on this address. seems it is not detected.

how did you came to know that your frequency is 100khz...?

 

Jatin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I asked Toradex, which is the manufacturer of my Linux board.

They told me the default i2c frequency is 100kHz.

 

Did you do any kind of configuration or personalization to the chip before using i2cdetect?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi,

 

Are you on element14 comunity .. ?

 

Jatin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

no.

why?

 

Please tell me, did you do any kind of configuration or personalization to the chip before using i2cdetect?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Type command
dmesg | grep i2c
This will show u your i2c frequency

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please tell me, did you do any kind of configuration or personalization to the ATECC508A before using i2cdetect?

Last Edited: Thu. Feb 23, 2017 - 08:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

no i did not do any personalization to the chip.

it has to be done after the chip detected.

command i gave you shows frequency on my board.

please verify your frequency.

you can also check it in .dtb file

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which board are you using?

 

I tried using my BeagleBone Black.

Also, no results.

root@beaglebone:~# dmesg | grep i2c
[    0.230316] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.230369] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[    1.051171] i2c /dev entries driver
[    1.429194] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.464358] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

it seems that there are two i2c buses on your board

bus 0 and bus 2.

you are using i2c detect on bus 1...?

 

i am using a customized board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, I used i2cdetect on bus 2.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
root@apalis-imx6:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- 22 -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- 45 -- -- -- -- -- -- -- 4d -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- --
70: -- -- -- -- 74 -- -- --
root@apalis-imx6:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- 17 -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- 43 -- -- -- -- -- -- -- -- -- 4d -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- 67 -- 69 -- -- 6c -- -- --
70: -- -- -- -- -- -- -- --
root@apalis-imx6:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- 0c -- -- --
10: -- 11 -- -- -- -- -- -- -- 19 -- -- -- -- 1e --
20: -- -- -- -- 24 25 -- -- -- -- -- -- -- -- 2e --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- 

 

by this it seems that you used on bus 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

 

this is the response i get and chip is detected on address 60

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please note this detail:

root@apalis-imx6

 

The commands you copied are from Apalis iMX6.

 

On the Apalis iMX6 I used bus 1.

On the BeagleBone Black I used bus 2.

Last Edited: Fri. Feb 24, 2017 - 11:23 AM