Skip to content

Commit df20d3d

Browse files
committed
securechip: use polling instead of delay
There are two modes of waiting for a result: - delay: wait for the estimated execution time of a command before reading the result - polling: poll the chip until the result is ready I am not sure why we specified NO_POLL. Possibly because that was easier in early prototypes before we used cryptoauthlib, that takes care of implementing polling. Polling is more robust as execution times might change between chip versions. Cryptoauthlib contains tables with execution times per chip, which is why it wasn't a problem for us, but since polling is the recommended way, we switch to that. Also, cryptoauthlib has started warning about it: ``` external/cryptoauthlib/lib/calib/calib_execution.c:46:2: warning: #warning "ATECC608B supports only polling mode, if you are using an ATECC608A specify ATCA_ATECC608A_SUPPORT manually" ```. PEROFRMANCE: Polling seems significantly faster. One round of KDF (end-to-end, i.e. including slot authorization calls and communication overhead) with polling takes around 100-110ms, while before it took around 300ms. The unlock process does three rounds of KDF, so the unlock process time will be reduced from ~1s to ~300ms.
1 parent f40a0d7 commit df20d3d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

external/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ set_property(TARGET asf4-drivers PROPERTY INTERFACE_LINK_LIBRARIES "")
223223
)
224224
target_link_libraries(cryptoauthlib samd51a-ds asf4-drivers-min)
225225
set_property(TARGET cryptoauthlib PROPERTY INTERFACE_LINK_LIBRARIES "")
226-
target_compile_definitions(cryptoauthlib PUBLIC ATCA_NO_POLL)
227226
target_include_directories(cryptoauthlib SYSTEM PUBLIC
228227
cryptoauthlib/lib
229228
${CMAKE_CURRENT_SOURCE_DIR} # for the BitBox02-custom "atca_config.h"

0 commit comments

Comments
 (0)