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.

TDA4VM-Q1:   TDA4VM-Q1:TDA4VM88T5BALFQ1 Keywriter Programming Issues

Part Number: TDA4VM-Q1

Tool/software:

Hi

We are currently working on secure boot-related development using the TDA4VM88T5BALFQ1 chip. However, we have encountered an issue. We downloaded the OTP_KEYWRITER_ADD_ON_j721e_sr1_1_v2021.05b-linux-installer.run file according to the documentation and completed the installation and compilation. But when we tried to burn the keywriter, it didn't get burned in. The log printed was: OTP Keywriter Version: 02.00.00.00 (Jul 2 2025 - 13:37:44). After that, there was no response, but the current was still there.
Br
zhangbo
  • HI zhangbo

    Have you copied the TIFS binary as per the location mentioned in the README present in  OTP_KEYWRITER_ADD_ON_j721e_sr1_1 package.

    Also did you make sure you are using SR1.1 sample only.

    Regards
    Diwakar

  • Hi

    Yes, I am certain that I followed the redme instructions and also confirmed that I used the SR1.1 sample

    Br

    zhangbo

  • Can you help me with the detailed steps which you followed to build keywriter . Seems keywriter TIFS is not getting loaded.

  • hi

    Here are the steps I followed to operate

    1.Download OTP_KEYWRITER_ADD_ON_j721e_sr1_1_v2021.05b

    2.Then execute OTP_KEYWRITER_ADD_ON_j721e_sr1_1_v2021.05b-linux-installer.run to perform the installation.

    3.Downloaded SDK_10.X version

    4.

        Copy OTP_KEYWRITER_ADD_ON_j721e_sr1_1_v2021.05b/addon/ti_fek_public.pem to pdk_jacinto_10_00_00_27/ packages/ti/boot/keywriter/scripts.

        Copy OTP_KEYWRITER_ADD_ON_j721e_sr1_1_v2021.05b/addon/ti-fs-keywriter.bin to pdk_jacinto_10_00_00_27/packages/ti/boot/keywriter/tifs_bin/j721e.

    5.

        Navigate to the pdk_jacinto_10_00_00_27/packages/ti/boot/keywriter/scripts directory and execute the command ./gen_keywr_cert.sh -g to generate the key.

    6.

        Execute the command cp -rf pdk_jacinto_10_00_00_27/packages/ti/build/makerules/k3_dev_mpk.pem pdk_jacinto_10_00_00_27/packages/ti/boot/keywriter/scripts/keys/smpk.pem

        xxd -r -p pdk_jacinto_10_00_00_27/packages/ti/build/makerules/k3_dev_mek.txt > pdk_jacinto_10_00_00_27/packages/ti/boot/keywriter/scripts/keys/smek.key

    7.

    Execute ./gen_keywr_cert.sh -s keys/smpk.pem --smek keys/smek.key -t ti_fek_public.pem -a keys/aes256.key --keycnt 1 --keyrev 1 to generate the certificate.

    8.Modify packages/ti/boot/keywriter/main.c

    Add two UART interfaces:
    +static void J721E_UART_InitPwrClk_test(void)
    +{
    +    HW_WR_REG32(SBL_UART_PLL_BASE + SBL_UART_PLL_KICK0_OFFSET, SBL_UART_PLL_KICK0_UNLOCK_VAL);
    +    HW_WR_REG32(SBL_UART_PLL_BASE + SBL_UART_PLL_KICK1_OFFSET, SBL_UART_PLL_KICK1_UNLOCK_VAL);
    +    HW_WR_REG32(SBL_UART_PLL_BASE + SBL_UART_PLL_DIV_OFFSET, SBL_UART_PLL_DIV_VAL);
    +    HW_WR_REG32(SBL_UART_PLL_BASE + SBL_UART_PLL_KICK0_OFFSET, SBL_UART_PLL_KICK_LOCK_VAL);
    +    HW_WR_REG32(SBL_UART_PLL_BASE + SBL_UART_PLL_KICK1_OFFSET, SBL_UART_PLL_KICK_LOCK_VAL);
    +}
    +static void J721E_SetupLvCmosDriveStrengthtest(void)
    +{
    +    volatile uint32_t *reg1 = (uint32_t *)0x43005008;
    +    volatile uint32_t *reg2 = (uint32_t *)0x4300500C;
    +    volatile uint32_t *lvcmos_drv_h_base = (uint32_t *)0x430060c0;
    +    volatile uint32_t *lvcmos_drv_v_base = (uint32_t *)0x430060d0;
    +    volatile uint32_t i;
    +    *reg1 = 0x68EF3490;
    +    *reg2 = 0xD172BC5A;
    +/* Workaround for fixing lvcmos drive strength*/
    +    for (i= 0; i < 4; i++)
    +    {
    +           *(lvcmos_drv_h_base + i) = 0xD;
    +           *(lvcmos_drv_v_base + i) = 0xD;
    +    }
    +}
    int main()
    {
        int32_t status = CSL_EFAIL;
    @@ -190,6 +213,8 @@ int main()
        uint32_t *keywriter_cert = &keywr_end + 1U;
        UART_HwAttrs uart_cfg;

    +    J721E_SetupLvCmosDriveStrengthtest();
    +    J721E_UART_InitPwrClk_test();
        /* padconfig unlock */
        mmr_unlock(WKUP_CTRL_BASE, 7);
    9.
        Navigate to the pdk_jacinto_10_00_00_27/packages/ti/build directory
        Execute make keywriter_img_clean SOC=j721e BOARD=j721e_evm
        Execute make keywriter_img SOC=j721e BOARD=j721e_evm
    10.
        Copy keywriter_img_j721e_release.tiimage to the boot partition of the SD card and rename it to tiboot3.bin.
        Copy ti-fs-keywriter.bin to the boot partition of the SD card and rename it to tifs.bin.
        Proceed with the burning process.
    Br
    zhangbo

  • Hi zhangbo,

    Is README in the package state that the keywriter is validated with 10.00 SDK ?

    Regards
    Diwakar

  • Hi

    This is all the content written by readme in the package. I see that it requires a minimum version of SDK 8.0

    Welcome to the TI OTP Keywriter Software add on package!!
    This package installs over the General Purpose PDK package available on ti.com

    To get started please follow the below steps:

    1. Install the Processor SDK RTOS from ti.com from the link here:
    www.ti.com/.../

    NOTE: This package has been validated with Processor SDK RTOS 08_00_00 version 
    and is the minimum SDK version required to run the OTP keywriter software. 
    For any later SDK version, update the version in the path accordingly.

    2. Once you have this installed, take the installer of the keywriter package and install this in the folder:

    <Your SDK Installation Directory>/pdk_jacinto_08_00_00

    3. Copy the OTP keywriter firmware `ti-fs-keywriter.bin` file to 

    <Your SDK path>/pdk_jacinto_08_00_00/packages/ti/boot/keywriter/tifs_bin/j721e/ti-fs-keywriter.bin

    4. Copy the TIFEK Public key `ti_fek_public.pem` file to 

    <Your SDK path>/pdk_jacinto_08_00_00/packages/ti/boot/keywriter/scripts/ti_fek_public.pem

    3. For any queries, please post your queries on e2e.ti.com

    br

    zhangbo

  • Hi zhangbo,

    Can you use the RTOS 08_00_00 for your testing as well , as it is not validated against 10.0 SDK.

    Regards 

    Diwakar 

  • Hi

    This is probably not feasible because we have made many changes on SDK 10.0. If we use SDK 8.0, we need to port all the changes to SDK 8.0, which involves a large amount of changes. Without porting, the board will not be able to start。 I have a question to ask, is my burning process correct?

    Br

    zhangbo

  • Hi zhangbo

    Can you make below changes in keywriter.mk and do the clean build of keywriter. See if it works.

    diff --git a/ti/boot/keywriter/build/keywriter.mk b/ti/boot/keywriter/build/keywriter.mk
    index 3ca26d0..ab000b5 100755
    --- a/ti/boot/keywriter/build/keywriter.mk
    +++ b/ti/boot/keywriter/build/keywriter.mk
    @@ -102,7 +102,7 @@ endif
     include $(MAKERULEDIR)/platform.mk
     include $(MAKERULEDIR)/common.mk
     # Uncomment the below to auto-generate new "tifs_keywriter.h" 
    -#include $(PDK_KEYWR_COMP_PATH)/build/bin2c.mk
    +include $(PDK_KEYWR_COMP_PATH)/build/bin2c.mk
     
     # OBJs and libraries are built by using rule defined in rules_<target>.mk
     #     and need not be explicitly specified here
    

    Regards
    Diwakar

  • Hi

    Currently, I don't have the board in hand and need to wait for a few days. I have a question I'd like to ask. According to the documentation, if the board is not flashed with Keywriter, it can boot normally using the GP image (which is unsigned). Is that correct?

    Br

    zhangbo

  • Hi zhangbo 

    Currently, I don't have the board in hand and need to wait for a few days.

    Sure will wait for your results.

    According to the documentation, if the board is not flashed with Keywriter, it can boot normally using the GP image (which is unsigned). Is that correct?

    Yes as the actual keys are not fused on the effuses , there is no keys to validate the image.

    Regards
    Diwakar

  • Hi

    I made the changes following this link ([FAQ] TDA4VM-Q1: SR2.0 update Keywriter process) and added my own logs, but strangely only the middle part of the logs is printed out. The logs I added at the beginning and the end are not printed, and it seems that the state of the keywriter is also not correct.Below are the images with added logs and debugging results。

  • Hi

    What I mean is: after the modifications on the promissory note, the logs I added were not printed out. I don't know what the problem is. Is there an error in my code for adding UART serial port? The printed logs do not match the logs I added

  • Hi Zhang,

    What is the return value of Sciclient_loadFirmware ? is it passing ?

    Also have you made earlier suggested change : https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1522456/tda4vm-q1-tda4vm-q1-tda4vm88t5balfq1-keywriter-programming-issues/5858575#5858575

    Regards
    Diwakar

  • Hi

    1. At present, there are no return values being printed during the testing, so we don't know what kind of error is occurring; it's just stuck in the Sciclient_loadFirmware function.
    2. I have made the modifications according to your advice.
    3. Currently, we are using SPL to boot, and I'm not sure if the SPL boot process will have any impact on the keywriter programming.
      Br zhangbo
  • Hi Zhang,

    What do you mean by SPL boot flow , Do you mean you use SPL boot flow to boot the images.

    Allow me some time to test this at my end, i will try to arrange sr1.1 sample and test it out.

    Will update you on this by EOW.

    Regards
    Diwakar

  • Hi

    Apologies, we are currently using the TDA4VM88T5BALFQ1 chip model, but I believe the principle is the same; it just requires changing sr1.1 to sr2.0. I have also conducted some tests, and I found that the baseline of SDK 8.6 can be programmed, but our current baseline is SDK 10.0. At present, I suspect two potential issues:
    1. Are there any modifications in the keywriter for these two baselines?
    2. It's possible that I made some mistakes during the keywriter compilation process.
    3. Can you provide documentation on keywriter compilation and related operational procedures?
      Br zhangbo
  • Hi Zhang,

    Apologies, we are currently using the TDA4VM88T5BALFQ1 chip model,

    This is SR1.1 device 

    now my understanding is you want to change this to SR2.0 sample and want to run keywriter on that, correct me if my understanding is wrong.

    I have also conducted some tests, and I found that the baseline of SDK 8.6 can be programmed,

    With which silicon revision of device, you are testing with?

    Can you provide documentation on keywriter compilation and related operational procedures?

    You can follow the steps mentioned in this document , steps remain the same for newer sdk as well.

    Regards
    Diwakar

  • Hi Bo,

    I think you want to using B version (SR1.1) and C version in one project and same baseline SW (SDK10.0), right? in my understanding, you should using SDK8.6 as the keywriter baseline no matter your project SW sdk version, because the keywriter add on is validated using SDK8.6. So pls using SDK8.6 as the keywriter baseline to build the keywriter bin.

    BR,

    Biao 

  • Hi Zhang,

     in my understanding, you should using SDK8.6 as the keywriter baseline no matter your project SW sdk version, because the keywriter add on is validated using SDK8.6. So pls using SDK8.6 as the keywriter baseline to build the keywriter bin.

    The KeyWriter binary doesn't change between SDK 8.6 and SDK 10.0, it will be difference between the SR1.1 (B version) and SR2.0 (C version). The only differences would be the KeyWriter application the build for which would be in line with the SDK driver updates.

    There should be no issues in getting the KeyWriter to work with SDK10.0. 

    regards

    Suman

  • Hi, Zhang

    One question, one suggestion, curious to know

    If you mark "Sciclient_loadFirmware" function, can it print  "SCICLIENT load firmware END"?

    Because we need to know, does this issues real caused by loading DMSC firmware.

    Gibbs

  • Hi
    Currently, we have successfully burned the keywriter onto the board using SDK 8.6

    Br

    zhangbo

  • Hi Zhang,

    Currently, we have successfully burned the keywriter onto the board using SDK 8.6

    Thanks for the confirmation. Closing this ticket.

    regards

    Suman