This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2434: Keywriter failing with Debug Response: 0x4e010000 on HS-FS device (SDK 10.00.08)

SDK Version: MCU+ SDK v10.00.00.20
TIFS Version: 10.0.8-v10.00.08_am64x_keywrite
Tool used: gen_keywr_cert.sh from the SDK

Problem Description:
I am attempting to program keys into a virgin HS-FS AM243-LP device for the first time. The Keywriter application starts, finds the certificate, but fails immediately with

Keywriter Debug Response: 0x4e010000.

Observations & Steps taken:
  1. Certificate Generation: I used the provided gen_keywr_cert.sh with the TI FEK public key (ti_fek_public.pem) from the SDK.
    • Command used: ./gen_keywr_cert.sh -t tifek/ti_fek_public.pem --msv 0xDC100 --msv-wp -s keys/smpk.pem -s-wp --smek keys/smek.key --smek-wp -a keys/aes256.key --sr-sbl 1 --sr-sysfw 1 --sr-bcfg 1 --keycnt 1 --keycnt-wp --keyrev 1 --keyrev-wp --jtag-disable-wp
  2. Certificate Header: Verified the generated binary. It starts with 30 82 0F 77 30 82 0D 5F (valid X509).
  3. Alignment: The certificate is loaded at address 0x70008b00.
  4. VPP Voltage: I have verified 1.8V on the VPP pin during the process. (J22, LED ON)
Console Log (using teraterm xmode):
Combined boot mode
Starting Keywriting Enabled VPP DMSC Firmware Version 10.0.8-v10.00.08_am64x_keywrite DMSC Firmware revision 0xa DMSC ABI revision 4.0 keys Certificate found: 0x70008b00 Keywriter Debug Response: 0x4e010000 Error occured..

Does the error code 0x4E010000 indicate an authentication failure (TIFS_AUTH_FAILURE) or a decryption failure?

Is there a specific memory alignment requirement (e.g., 128-byte or 256-byte) for the certificate buffer in TIFS v10.0.8?

Could this be related to a mismatch between the provided ti_fek_public.pem and the TIFS version 10.0.8 on my device?

What you suggest for next steps?

Thank you,
Matej Liska.

  • Hello,

    Does the error code 0x4E010000 indicate an authentication failure (TIFS_AUTH_FAILURE) or a decryption failure?

    No. Please refer to the following guides for decoding the error code or capturing the TIFS traces for more insights about the error

    https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/security/keywriter.html#otp-key-writer-error-codes

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1572273/faq-am6xx-how-to-get-the-tifs-keywriter-logs

    From the error code, it looks like you have already some of the fields programmed so the TIFS gives error when you try to program those fields again. Have you run the keywriter before on this device to program some fields?

    Thanks!

  • Hello Prashant, 
    thank you.

    In he following guides for decoding the error code or capturing the TIFS traces you shared are only codes for lower 32bytes but as you could see we are dealing with upper 32bytes error code.

    This is first time we are trying to run keywritter, previously we were trying only OTP extended memory writes - could this be issue?

    Thank you.

  • Keywriter Debug Response: 0x4e010000

    This is a 32 bit error code which has BIT30 set which means some fields are already programmed.

    ./gen_keywr_cert.sh -t tifek/ti_fek_public.pem --msv 0xDC100 --msv-wp -s keys/smpk.pem -s-wp --smek keys/smek.key --smek-wp -a keys/aes256.key --sr-sbl 1 --sr-sysfw 1 --sr-bcfg 1 --keycnt 1 --keycnt-wp --keyrev 1 --keyrev-wp --jtag-disable-wp

    If you are using this command then the error is expected as the SWREV fields comes programmed with a default value of 1 so you cannot program them again without using the "*-ovrd" flag.

    Please use the following command

    ./gen_keywr_cert.sh -t tifek/ti_fek_public.pem --msv 0xDC100 --msv-wp -s keys/smpk.pem -s-wp --smek keys/smek.key --smek-wp -a keys/aes256.key --keycnt 1 --keycnt-wp --keyrev 1 --keyrev-wp

    which programs MSV, SMPK, SMEK, KEYCNT, and KEYREV fields and also sets the write protect flag.

    Command used: ./gen_keywr_cert.sh -t tifek/ti_fek_public.pem --msv 0xDC100 --msv-wp -s keys/smpk.pem -s-wp --smek keys/smek.key --smek-wp -a keys/aes256.key --sr-sbl 1 --sr-sysfw 1 --sr-bcfg 1 --keycnt 1 --keycnt-wp --keyrev 1 --keyrev-wp --jtag-disable-wp

    May I know how did you come to this command?

  • Thank you,

    my misinterpretation, in documentation there was default  --sr-sbl 1 --sr-sysfw 1 --sr-bcfg 1  from factory is 0, we were following old AM263X OTP Keywriter User Guide SITARA MCU SW Exported on 03/07/2023, currently i see that in new guide is *DO NOT PROGRAM* - initial values set by TI - little confusion with that.

    commands are from that older version user guide.