Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATECC608A always returns wakeup frame and fails in calib_read_zone function (ret = 0x0000F3) #246

Open
victorK8 opened this issue Jul 14, 2021 · 1 comment
Milestone

Comments

@victorK8
Copy link

Host MCU: Microchip wlr089 (sam0 microchip)
Chip: ATECC608A in 88CKSCKT Xplained Pro
Interface : I2C Bus
Issue:

When I tried to init the cryptoauth library, it returned calib_read_zone error (Failed with ret = 0x0000F3).

Also, I tried to get a random number. However, it showed the same error.

By debugging, I checked that hal_i2c_received function got always the same frame (0x4 0x11 0x33 0x43). This frame equals with wake-up frame thath atecc608 returns. Moreover, ret = 0x0000F3 seems to be ATCA_WAKE_SUCCESS in cryptoauthlib status codes.

Any idea @bryan-hunt ?

Thanks!

@bryan-hunt
Copy link
Contributor

So we ended up locating the root cause for this issue so I'm updating the ticket with the findings so those that may encounter will see this comment. The basic issue is that the error code is misleading - the failure is that the hal is unable to access/use the underlying driver functions for the configured peripheral.

This failure is occurring during the wake step which only returns wake failure (misnomer for the error code) and it masks the hal api failure. This means that the investigation for resolution is always into the HAL regardless of which one is being used. For example on linux it almost always means the hal is unable to open the device file.

I'm looking at options to propagate different error codes depending on the condition when it's an obvious hal failure rather than simply a non responsive part. For that reason I'm not closing this issue since I expect us to release something in the next version that makes diagnosing these issues more straightforward.

@bryan-hunt bryan-hunt added this to the v3.3.4 milestone Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants