@@ -300,6 +300,10 @@ void atca_config_check(void) {
300300 memcpy (serial_no + ATECC608_SN1_SIZE , atca_configuration .sn2 ,
301301 ATECC608_SN2_SIZE );
302302
303+ if (!flash_otp_is_locked (FLASH_OTP_BLOCK_608_SERIAL )) {
304+ atca_assert (ATCA_BAD_PARAM , "OTP data err" );
305+ }
306+
303307 if (check_all_ones (pair_info -> serial , sizeof (pair_info -> serial ))) {
304308 atca_assert (ATCA_BAD_PARAM , "OTP data err" );
305309 } else {
@@ -308,9 +312,29 @@ void atca_config_check(void) {
308312 }
309313 }
310314
315+ if (!flash_otp_is_locked (FLASH_OTP_BLOCK_608_PROTECT_KEY )) {
316+ atca_assert (ATCA_BAD_PARAM , "OTP data err" );
317+ }
318+
311319 if (check_all_ones (pair_info -> protect_key , sizeof (pair_info -> protect_key ))) {
312320 atca_assert (ATCA_BAD_PARAM , "OTP data err" );
313321 }
322+
323+ if (!flash_otp_is_locked (FLASH_OTP_BLOCK_608_INIT_PIN )) {
324+ atca_assert (ATCA_BAD_PARAM , "OTP data err" );
325+ }
326+
327+ if (check_all_ones (pair_info -> init_pin , sizeof (pair_info -> init_pin ))) {
328+ atca_assert (ATCA_BAD_PARAM , "OTP data err" );
329+ }
330+
331+ if (!flash_otp_is_locked (FLASH_OTP_BLOCK_608_MIX_PIN )) {
332+ atca_assert (ATCA_BAD_PARAM , "OTP data err" );
333+ }
334+
335+ if (check_all_ones (pair_info -> hash_mix , sizeof (pair_info -> hash_mix ))) {
336+ atca_assert (ATCA_BAD_PARAM , "OTP data err" );
337+ }
314338}
315339
316340ATCA_STATUS atca_nonce_tempkey (uint8_t * temp_key ) {
0 commit comments