4.2 Timing Migration Considerations

The previous sections describe all the differences in features and commands for the ATECC608B compared to the ATECC508A. One additional factor that needs to be considered is if the timing differences between the ATECC508A and the ATECC608B matter for a specific design. The timing differences between the two devices are quite significant for many commands. For a detailed comparison of the differences, it is recommended that a comparison of the two data sheets be undertaken.

The difficulty in migrating from the ATECC508A to the ATECC608B depends on how the software was implemented. There are two cases that require consideration:

Fixed Timing Implementation

If the code is written assuming hardwired timing parameters, careful analysis must be undertaken to evaluate the impact of changing from the ATECC508A to the ATECC608B. Under this method, after a command has been issued, the microcontroller waits a fixed period of time before reading the response data back. If the delay required for the ATECC608B is significantly longer than that of the ATECC508A, this command may fail. Using an older version of CryptoAuthLib meant for the ATECC508A or a customer-generated library with the ATECC608B could cause some timing errors. Implementing the latest version of CryptoAuthLib updates the timing information correctly and, through just recompiling the code and reflashing the micro, correcting the timing issues.

If timing is an issue, the following solutions can be considered:
  1. Migrate the code to use the latest version of the CryptoAuthLib library.
  2. Migrate the code to use polled timing. For more information, see Section Polled Timing Implementation.
  3. If a custom library with fixed timing is used, update the library timing parameters needed for the ATECC608B.
  4. Implement redundancy by trying to read back data a second time upon receiving a failure code that indicates the response is not yet ready.

Polled Timing Implementation

If the code was written using polling, there will be no issues with migrating to the ATECC608B. Under this scenario, the microcontroller polls the ATECC608B to determine when data are available to be read back. Most timing differences are absorbed by the polling command.