Closed gojimmypi closed 2 months ago
It is an overridable macro. For slower microcontrollers a value like 1,000 or 10,000 may be more appropriate. To avoid a busy spin you can also implement XTPM_WAIT() to enable some sleep() / context switching.
ok, I'll leave it.
See wolftpm/tpm2_types.h#L388 for
#define TPM_TIMEOUT_TRIES 1000000
.Perhaps a few orders of magnitude smaller is more reasonable? Even if after, say 10 attempts, should the I2C operation keep trying?
This might be a good place for an optional user-specified timeout, too.