Waking up the ATECC508A chip

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

Hello,

 

Can anyone tell me how to wake up the ATECC508A chip?

 

I tried populating the address byte in CR2 register with 0X00 in write mode and started an I2C communication.

 

Thereafter I populated the slave address 0XC0 in CR2 register in read mode and tried to read 4 bytes. But got a NACK.

 

Where am i wrong?

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

From section 6.1.1 of the datasheet, specific to the I2C interface:

 

Wake: if SDA is held low for a period of greater than tWLO, the device will exit low power mode and
after a delay of tWHI, it will be ready to receive I2C commands. The device ignores any levels or
transitions on the SCL pin when the device is idle or asleep and during tWLO. At some point during
tWHI the SCL pin is enabled and the conditions listed in Section "Device is Awake" are honored.

 

 

Last Edited: Fri. Jun 15, 2018 - 04:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for replying!!

 

Sending Slave address, followed by 0x00 0X00 0X00 0X00 on the data bus at a low frequency say 100khz helped me to wakep up the device successfully.

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

Now I am stuck at Verify command. I am getting a parse error(0x0f) at the response of the same.

 

Following were the steps done before sending the verify command:

1)Configured the configuration zone to make the 4rth slot to store private key.

2)Generated random private key in slot number 4( it can be any slot number)

3)Generated public key using this private key and stored it in an array called "Pubkey"

4)generated hash(digest) externally using different program and stored the digest in TempKey using Nonce Command(Pass through mode)

5)Generated R and S using sign command with the private key and digest stored as input arguments.

 

I supplied the generated public key, r and s of sign response and digest to the verify command. Yet it was giving parse error. Can anyone tell me where am i wrong?

 

 

 

 

 

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

 

A Parse Error is 0x03, 0x0F is an Execution Error.

 

The Verify command can return an execution error for various reasons. They are all listed in section 9.20 of the datasheet.

It looks like you have a configuration error. Check the requirements in section 9.20 are all being met.

 

 

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

Thanks for the quick response. I had posted the wrong error code. It was 0x03 only which means it is parse error itself.

 

But I solved it just now. What i found out was we need to run the nonce command once again before the verify command to load the digest into tempkey and then run the verify command. It worked!!!!!

 

 

 

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

 

Well done.

Can I just ask - did you need to lock the chip to get your code to work?

 

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

If u are talking about locking of the configuration zone, Yes we have to do that for the generate, sign command and verify to work. I did not lock Data zone for the code to work.

 

I would also like to mention one of my findings:

 

  • For any command which uses digest stored in temp key as input , for eg: Sign command and verify command to work we need to load it using nonce every time before executing the command which uses it.  Mean to say load the digest using nonce command, execute sign command, again load the digest uisng nonce command and then execute verify command.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

That's what I thought - thanks.

 

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

Hi SwethaPai,
I have the same issue, but have not managed to wakeup my device - tried to do with:

 

i2cset -y 0 0x60 0x00 0x00 0x00 0x00 i

 

..only giving me a "Error: Write failed".

Which command or tool did you use to wakeup your chip?

best,
Oliver