ArduinoECCX08 icon indicating copy to clipboard operation
ArduinoECCX08 copied to clipboard

ensure device goes into idle even on error

Open bobo opened this issue 1 year ago • 2 comments

When working with keys, the device is not put properly to sleep if there is an error (for example the key does not exist when reading it). This makes subsequent commands also fail.

For example if i have a key in slot 2 but not 1.

  printPublicKeyForSlot(1);
  printPublicKeyForSlot(2);

will not print any key. while

printPublicKeyForSlot(2);
printPublicKeyForSlot(1);

will print the key for slot 2

bobo avatar Dec 04 '24 13:12 bobo

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 04 '24 13:12 CLAassistant

Memory usage change @ 026f415a63ae82f504f8c6566a9e6f4be1fa319f

Board flash % RAM for global variables %
arduino:mbed:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:megaavr:uno2018 :small_red_triangle: 0 - +34 0.0 - +0.07 0 - 0 0.0 - 0.0
arduino:samd:mkr1000 :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrvidor4000 :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1310 :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot :small_red_triangle: 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/ECCX08Counter
flash
% examples/ECCX08Counter
RAM for global variables
% examples/ECCX08HMAC
flash
% examples/ECCX08HMAC
RAM for global variables
% examples/ECCX08RandomNumber
flash
% examples/ECCX08RandomNumber
RAM for global variables
% examples/ECCX08Signing
flash
% examples/ECCX08Signing
RAM for global variables
% examples/Tools/ECCX08CSR
flash
% examples/Tools/ECCX08CSR
RAM for global variables
% examples/Tools/ECCX08JWSPublicKey
flash
% examples/Tools/ECCX08JWSPublicKey
RAM for global variables
% examples/Tools/ECCX08SelfSignedCert
flash
% examples/Tools/ECCX08SelfSignedCert
RAM for global variables
%
arduino:mbed:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_giga:giga 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_nano:nanorp2040connect 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 2 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:mbed_opta:opta 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:megaavr:uno2018 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 6 0.01 0 0.0 6 0.01 0 0.0 34 0.07 0 0.0
arduino:samd:mkr1000 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:mkrwan1300 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:mkrgsm1400 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:mkrnb1500 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:mkrvidor4000 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:mkrwan1310 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:mkrwifi1010 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:nano_33_iot 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
Click for full report CSV
Board,examples/ECCX08Counter<br>flash,%,examples/ECCX08Counter<br>RAM for global variables,%,examples/ECCX08HMAC<br>flash,%,examples/ECCX08HMAC<br>RAM for global variables,%,examples/ECCX08RandomNumber<br>flash,%,examples/ECCX08RandomNumber<br>RAM for global variables,%,examples/ECCX08Signing<br>flash,%,examples/ECCX08Signing<br>RAM for global variables,%,examples/Tools/ECCX08CSR<br>flash,%,examples/Tools/ECCX08CSR<br>RAM for global variables,%,examples/Tools/ECCX08JWSPublicKey<br>flash,%,examples/Tools/ECCX08JWSPublicKey<br>RAM for global variables,%,examples/Tools/ECCX08SelfSignedCert<br>flash,%,examples/Tools/ECCX08SelfSignedCert<br>RAM for global variables,%
arduino:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0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,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0
arduino:samd:mkrwifi1010,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0
arduino:samd:nano_33_iot,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0

github-actions[bot] avatar Dec 04 '24 13:12 github-actions[bot]

superseded by #72

pennam avatar Jul 21 '25 10:07 pennam

Thanks for your contribution @bobo . I've merged #72 that fixes the same issue covering more usecases.

pennam avatar Jul 21 '25 10:07 pennam