Closed nikhil-robinson closed 11 months ago
Hi @nikhil-robinson!
Before to burn a efuse block this functions checks whether the given efuse block is unused or not. Keep in mind that it will retun OK only the very first time. Could you check the efuse BLOCK_KEY4 first, is it empty? Run the espefuse.py summary
command (provide the summary log).
I suggest to use efuse API - esp_err_t esp_efuse_write_key(esp_efuse_block_t block, esp_efuse_purpose_t purpose, const void *key, size_t key_size_bytes)
, see the doc
Hi @KonstantinKondrashov
import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/421.
import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/421.
/home/nikhi/idf5/esp/esp-idf/components/esptool_py/esptool/espefuse.py: 11: Syntax error: word unexpected (expecting ")")
this is the output of espefuse.py summary
When i use the function esp_efuse_write_key
i am getting this error.
I (364) main_task: Calling app_main()
I (364) efuse: Batch mode of writing fields is enabled
I (374) efuse: Batch mode of writing fields is cancelled
E (384) EN: Error in efuses state, unused block not found
I (384) main_task: Returned from app_main()
Error in efuses state, unused block not found
- This log means that your chip already uses the given efuse block (it can mean that 1-it is already written by you or 2-it was used before). You need to take a look at the efuse summary (run espefuse.py summary
), the log that you gave has an error. I do not know why. Please fix it to be able to see the whole picture of the efuses.
Probably you can use the next efuse block BLOCK_KEY5 but I would recommend first taking a look at the efuse summary.
I close this issue now. Feel free to reopen it if any remaining questions.
Error in efuses state, unused block not found
- This log means that your chip already uses the given efuse block (it can mean that 1-it is already written by you or 2-it was used before). You need to take a look at the efuse summary (runespefuse.py summary
), the log that you gave has an error. I do not know why. Please fix it to be able to see the whole picture of the efuses.Probably you can use the next efuse block BLOCK_KEY5 but I would recommend first taking a look at the efuse summary.
if you are not able solve please let someone else look into the issue.
Hi @nikhil-robinson!
Your original issue is that you are trying to write to an efuse block that is already written. Please find an unused one, it should resolve your issue, or if you want help from our side provide the espefuse.py summary
(it shows the state of all efuse blocks).
Once BLOCK_KEY5 block is written the following attempts to burn into the same block lead to an error.
import-im6.q16: attempt to perform an operation not allowed by the security policy
PS' @ error/constitute.c/IsCoderAuthorized/421. import-im6.q16: attempt to perform an operation not allowed by the security policy
PS' @ error/constitute.c/IsCoderAuthorized/421. /home/nikhi/idf5/esp/esp-idf/components/esptool_py/esptool/espefuse.py: 11: Syntax error: word unexpected (expecting ")")
Regarding this error please open a separate issue, seems something is not installed well, please take a look the Installation chapter Thanks.
Answers checklist.
General issue report
I am trying to run the HMAC message encryption but not able to save the key to the efuse. not getting ESP_OK in return.
LOG
SETUP
Target esp32s3 Idf version: ESP-IDF v5.1.1-dirty
sdkconfig
sdkconfig.txt