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.

LP-AM243:UART Uniflash Procedure on LP-AM243

Part Number: LP-AM243
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hello.
I created tiboot3.bin following the instructions in "AM64X_AM243X OTP Keywriter User Guide".
I have two questions.
Q1: When I run the UART Uniflash command, is the device converted to HS-SE?

python3 ... /... /... /... /... /tools/boot/uart_uniflash.py -p /dev/ttyUSB0 --cfg=<soc>/keywr_sbl_<soc>.cfg

Q2: Which document is "Section 4.2" written here? Which document should I refer to?



Section 4.2" does not exist in "AM64X_AM243X OTP Keywriter User Guide".

  • Hello,

    When I run the UART Uniflash command, is the device converted to HS-SE?

    No, it will only flash the tiboot3.bin to OSPI. You would need to switch the bootmode to OSPI to allow ROM to boot tiboot3.bin.

    Section 4.2" does not exist in "AM64X_AM243X OTP Keywriter User Guide".

    It is meant to refer Section 6.2

    Regards,

    Prashant

  • Hello, Prashant

    I get an error when I do a UART boot using tiboot3.bin created following the instructions in the AM64X_AM243X OTP Keywriter User Guide.

    USB DFU is not available on my PC.
    Therefore, I am trying to flash tiboot3.bin with UART.
    Is it necessary to send tiboot3 to flash the UART?

    Please let me know the procedure to convert HS-FS to HS-SE using UART.

    Best regards
    Yukinobu

  • Hello,

    The booting of tiboot3.bin over UART using Teraterm is looking good so this is not the issue.

    May I know the openssl version you are using? Please make sure you are using the Openssl v1.1.x

    ❯ openssl version
    OpenSSL 1.1.1v  1 Aug 2023

    Regards,

    Prashant

  • Hello.

    Please let me confirm about the openssl version.
    AM64X_AM243X OTP Keywriter User Guide says the openssl version is 3.1.2 or 3.2.1 and I have installed 3.2.1.



    But is openssl v1.1.x the correct version?

    Is there any other software that differs from the version described in the AM64X_AM243X OTP Keywriter User Guide as well as openssl?



    Addendum:
    I updated openssl to version 1.1.x, but the situation remains the same.



    An error occurs when transferring tiboot3.bin via UART.
    How can I transfer without error on UART? 



  • Hello,

    Sorry, I thought you are using the previous releases. If you are using the very latest Keywriter v09_01_00 then you should use the OpenSSL v3.x.x only as mentioned in the User Guide.

    An error occurs when transferring tiboot3.bin via UART.
    How can I transfer without error on UART? 

    Could you please share the command you are using to generate the keywriter certificate?

    Regards,

    Prashant

  • Hello.

    The OTP key writer I'm using is otp_keywriter_am243x_09_01_00-windows-installer.exe.

    The key writer certificate was created using the following command:

    ./gen_keywr_cert.sh --msv 0xC0FFE -t tifek/ti_fek_public.pem

    This command is the same as the one in AM64X_AM243X_OTP_Keywriter_User_Guide_09_01_00.pdf.



    Regards,

    Yukinobu

  • Hello,

    Are you working with a custom board or the TI AM243x-LP board?

    Could you please share the Sysfw logs as well?

    Regards,

    Prashant

  • Hello.
    Thank you for all the support.

    Yes, I am using TI AM243x LaunchPad.

    Sorry, I don't know where the SYSFW logs are located.
    Where is the SYSFW log?

    Also, do I need to run any commands to get the SYSFW logs?

    Regards,

    Yukinobu

  • Hi Yukinobu,

    The SYSFW logs are dumped on the UART1 port. You may refer the sections "6.5 Keywriter Logs and Debugging" & "8.2 OTP Keywriter Logs" of the Keywriter User Guide for more information.

    Regards,

    Prashant

  • Hi Prashant,
    I am sorry, but please tell me.
    My LP-AM243x has only UART0, where is UART1?
    Do I need any options?


    Regards,
    Yukinobu

  • Hi Prashant,

    I found the location of UART1. However, I cannot connect to J13 because I do not have an FTDI cable.
    Therefore, I cannot share the SYSFW logs.
    Is there any other way to investigate this?

    Transfer of tiboot3.bin via UART fails,
    I cannot convert it to HS-SE.
    I am having trouble checking secure boot.
    I am sorry, but please help me solve the problem.

    Regards,
    Yukinobu

  • Hi Yukinobu,

    Thank you for your patience till now!!

    I got my hands today on AM243x-LP PROC109A board and see the OTP Keywriter is failing. May I know the revision of the board you have?

    Regards,

    Prashant

  • Hi Prashant,

    Where can I find the revision number of the board?
    I do not know where the revision number is written.

    I was able to borrow the FTFI cable.
    I have obtained the YSFW logs and will share them with you.

    ・x409031
    0x800023
    #
    # Decrypting extensions..
    #
    MPK Options:  0x0
    MEK Options:  0x0
    MPK Opt P1:  0x0
    MPK Opt P2:  0x0
    MEK Opt   :  0x0
    SMPKH extension programming disabled
    SMEK extension programming disabled
    EXT OTP extension programming disabled
    * BCH code & MSV: fe0fac8b
    
    KEY CNT extension programming disabled
    
    KEY REV extension programming disabled
    
    SWREV extension programming disabled
    
    FW CFG REV extension programming disabled
    
    * KEYWR VERSION:  0x20000
    
    #
    # Programming Keys..
    #
    
    * MSV:
    [u32] bch + msv:  0x0
    Error in programming MSV
    debug_response:  0x2000000
    [u32] bch + msv:  0x0
    
    * SWREV:
    [u32] SWREV-SBL:  0x1
    [u32] SWREV-SYSFW  :  0x1
    SWREV extension programming disabled
    [u32] SWREV-SBL:  0x1
    [u32] SWREV-SYSFW  :  0x1
    
    * FW CFG REV:
    [u32] SWREV-FW-CFG-REV:  0x1
    SWREV SEC BCFG extension programming disabled
    [u32] SWREV-FW-CFG-REV:  0x1
    
    * EXT OTP:
    EXT OTP extension programming disabled
    
    * BMPKH, BMEK:
    BMPKH extension programming disabled
    BMEK extension programming disabled
    
    * SMPKH, SMEK:
    SMPKH extension programming disabled
    SMEK extension programming disabled
    
    * KEYCNT:
    [u32] keycnt:  0x0
    KEY CNT extension programming disabled
    [u32] keycnt:  0x0
    
    * KEYREV:
    [u32] keyrev:  0x0
    KEY REV extension programming disabled
    [u32] keyrev:  0x0
    
    

    The tiboot3.bin used for the transfer was created using the procedure described in the user's guide.
    1 . /gen_keywr_cert.sh --msv 0xC0FFE -t tifek/ti_fek_public.pem
    2 python ... /... /... /... /... /tools/bin2c/bin2c.py final_certificate.bin keycert.h KEYCERT
    3 gmake -sj clean PROFILE=debug
    gmake -sj PROFILE=debug

    Regards,
    Yukinobu

  • Hi Yukinobu,

    Thank you for sharing the logs!! But I think the issue is related to the Board Revision only.

    You may find the Revision printed on the Board like so

    Regards,

    Prashant

  • Hi Prashant,

    My board number is PROC109A.

    Regards,
    Yukinobu

  • Hi Yukinobu,

    This explains the failure!!

    The OTP Keywriter is not compatible out of the box with the PROC109A board revision. The reason is that the OTP Keywriter by default configures GPIO0_53 for enabling VPP which is the case with previous revisions. However, the GPIO0_53 has been disconnected from VPP in this PROC109A revision and so the Keywriter doesn't work because VPP is never enabled.

    The PROC109A schematics suggests inserting an external jumper across the header J22 to enable the VPP as shown

    So, to make the OTP Keywriter work with the PROC109A, you have to do the following:

    • Comment the "keywriter_setVpp()" call in the Keywriter source code.
      diff --git a/sbl_keywriter/am243x-evm/r5fss0-0_nortos/main.c b/sbl_keywriter/am243x-evm/r5fss0-0_nortos/main.c
      index 08c3c75..d7b52ac 100644
      --- a/sbl_keywriter/am243x-evm/r5fss0-0_nortos/main.c
      +++ b/sbl_keywriter/am243x-evm/r5fss0-0_nortos/main.c
      @@ -58,8 +58,8 @@ int main()
           DebugP_log("\r\n");
           DebugP_log("Starting Keywriting\r\n");
       
      -    keywriter_setVpp();
      -    DebugP_log("Enabled VPP\r\n");
      +    // keywriter_setVpp();
      +    // DebugP_log("Enabled VPP\r\n");
       
           keywriter_processKeyConfig();
       
      
    • Build the keywriter as usual.
    • Insert the external jumper as suggested.
    • Run the keywriter.
    • Once successful, remove the jumper to disable the VPP.

    Regards,

    Prashant

  • Hi Prashant,

    OTP keywriter binary transfer succeeded.


    You can now proceed.
    I thank you a lot for your support.

    If you encounter any more problems, please support me again.

    Regards,
    Yukinobu

  • Hi Yukinobu,

    Really glad to know the Keywriter is finally working!!

    I believe now the device is successfully converted to HSSE. If in doubt, you may check the device type with the following FAQ

    (+) [FAQ] [AM6XX]: How to check if device type is HS-SE, HS-FS or GP? - Processors forum - Processors - TI E2E support forums

    Please let me know if you have any further queries otherwise I will close this thread.

    Regards,

    Prashant

  • Hi Prashant,

    I checked the device type and it was HS-FS, not converted to HS-SE.


    c:\ti\mcu_plus_sdk_am243x_09_02_01_05\tools\boot\socid_parser>python uart_boot_socid.py -d am64x --string="02000000011a0000616d3634780000000000000048534653000002000000020002a6000000000000b018658ad99dc903c8c9bfb27b12751099920a042ad1dfea7b7ba57369f15546de285edde6a7b39a8bdc40a27b237f8fb1e57f245e80b929c1e28b024aa2ecc6ad0bc40b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"00000000000000000000001a722215db138f69c8bd56f1f551a04cf4bbb797dc5839feacd92f79727fcfc0"
    -----------------------
    SoC ID Header Info:
    -----------------------
    NumBlocks            : 2
    -----------------------
    SoC ID Public ROM Info:
    -----------------------
    SubBlockId           : 1
    SubBlockSize         : 26
    DeviceName           : am64x
    DeviceType           : HSFS
    DMSC ROM Version     : [0, 2, 0, 0]
    R5 ROM Version       : [0, 2, 0, 0]
    -----------------------
    SoC ID Secure ROM Info:
    -----------------------
    Sec SubBlockId       : 2
    Sec SubBlockSize     : 166
    Sec Prime            : 0
    Sec Key Revision     : 0
    Sec Key Count        : 0
    Sec TI MPK Hash      : b018658ad99dc903c8c9bfb27b12751099920a042ad1dfea7b7ba57369f15546de285edde6a7b39a8bdc40a27b237f8fb1e57f245e80b929c1e28b024aa2ecc6
    Sec Cust MPK Hash    : ad0bc40b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    Sec Unique ID        : 1a722215db138f69c8bd56f1f551a04cf4bbb797dc5839feacd92f79727fcfc0
    


    Therefore, I transferred the OTP Keywriter binary again, but it gave me an error.

    I thought I had made progress, but I am disappointed.
    I am sorry, but please support us again.

  • Hi Yukinobu,

    . /gen_keywr_cert.sh --msv 0xC0FFE -t tifek/ti_fek_public.pem

    It looks like you have used this command to generate the certificate. If yes, this only programs the MSV field and will not convert the device. You will need to program the keys along with the correct keycnt, keyrev to convert the device to HSSE.

    You may use the command given in the section "5.2.2 Program Everything in One Shot" in the Keywriter User Guide. Since you have already programmed MSV, please skip the option "--msv" and program everything else. Please note this will program the TI dummy keys.

    Regards,

    Prashant

  • Hi Prashant,

    I was finally able to convert my device to HS-SE.
    Many thanks for your support.

    -----------------------
    SoC ID Header Info:
    -----------------------
    NumBlocks            : 2
    -----------------------
    SoC ID Public ROM Info:
    -----------------------
    SubBlockId           : 1
    SubBlockSize         : 26
    DeviceName           : am64x
    DeviceType           : HSSE
    DMSC ROM Version     : [0, 2, 0, 0]
    R5 ROM Version       : [0, 2, 0, 0]
    -----------------------
    SoC ID Secure ROM Info:
    -----------------------
    Sec SubBlockId       : 2
    Sec SubBlockSize     : 166
    Sec Prime            : 0
    Sec Key Revision     : 1
    Sec Key Count        : 2
    Sec TI MPK Hash      : b018658ad99dc903c8c9bfb27b12751099920a042ad1dfea7b7ba57369f15546de285edde6a7b39a8bdc40a27b237f8fb1e57f245e80b929c1e28b024aa2ecc6
    Sec Cust MPK Hash    : 1f6002b07cd9b0b7c47d9ca8d1aae57b8e8784a12f636b2b760d7d98a18f189760dfd0f23e2b0cb10ec7edc7c6edac3d9bdfefe0eddc3fff7fe9ad875195527d
    Sec Unique ID        : 1a722215db138f69c8bd56f1f551a04cf4bbb797dc5839feacd92f79727fcfc0
    
    

    Regards,
    Yukinobu