[riot-notifications] [RIOT-OS/RIOT] Wrong I2C address for ATECC (cryptoauthlib) (#14001)

Philipp-Alexander Blum notifications at github.com
Fri May 1 16:27:46 CEST 2020

#### Description
I connected an ATECC806A to a nRF52832 and created a new board for it. I used the cryptoauthlib integration in RIOT.
Unfortunately, it doesn't work. After some debugging with a logicanalyzer, I think I found the cause. 
The default value of `ATCA_I2C_ADDR` is `0xC0`. When you look in the physical result on the I2C bus, it results in `0xC1` and the crypto IC is not sending an ACK. 
But, when you change the value to something else, for example `0xC9`, the physical result is also `0xC9`. The wakeup on address 0x00 seems to work fine, since the sends some ACKs on other dataframes. The cryptoauthlib [does a lot of bit shifting etc.](https://github.com/MicrochipTech/cryptoauthlib/blob/master/lib/hal/hal_i2c_start.c#L301) So, I guess there is an issue at some point. 

Example: Cannot build gnrc_networking application for samr21-xpro board.

#### Steps to reproduce the issue
I try to push my code. Not sure, if this is reproducible on the samr30-xpro with the ATECC608A.

#### Expected results
No error on initialization

#### Actual results
```2020-05-01 16:05:00,459 # [auto_init_atca] error initializing cryptoauth device #0```

#### Versions

Operating System Environment
         Operating System: "Ubuntu" "19.10 (Eoan Ermine)"
                   Kernel: Linux 5.3.0-22-generic x86_64 x86_64
             System shell: /usr/bin/dash (probably dash)
             make's shell: /usr/bin/dash (probably dash)

Installed compiler toolchains
               native gcc: gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
        arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
                  avr-gcc: missing
         mips-mti-elf-gcc: missing
               msp430-gcc: missing
     riscv-none-embed-gcc: missing
     xtensa-esp32-elf-gcc: xtensa-esp32-elf-gcc (crosstool-NG esp-2019r2) 8.2.0
   xtensa-esp8266-elf-gcc: missing
                    clang: missing

Installed compiler libs
     arm-none-eabi-newlib: "3.1.0"
      mips-mti-elf-newlib: missing
  riscv-none-embed-newlib: missing
  xtensa-esp32-elf-newlib: "3.0.0"
xtensa-esp8266-elf-newlib: missing
                 avr-libc: missing (missing)

Installed development tools
                   ccache: ccache version 3.7.3
                    cmake: cmake version 3.13.4
                 cppcheck: missing
                  doxygen: missing
                      git: git version 2.25.1
                     make: GNU Make 4.2.1
                  openocd: Open On-Chip Debugger 0.10.0+dev-01000-gdb23c13d (2020-01-10-01:06)
                   python: Python 2.7.17rc1
                  python2: Python 2.7.17rc1
                  python3: Python 3.7.5rc1
                   flake8: error: /usr/bin/python3: No module named flake8
               coccinelle: missing

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200501/e0a01dc0/attachment.htm>

More information about the notifications mailing list