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.

CC2745R10-Q1: Error-2131-Unable to access device register when configured Authentication method

Part Number: CC2745R10-Q1
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hello,
        I have inquiries concerning the CC2745R10-Q1 TrustZone-M and its Authentication methods.
         Note:I have created a sb_key_ring_init.h file and saved it in the default location: C:\Users\admin\workspace_ccstheia\empty_LP_EM_CC2745R10_Q1_nortos_ticlang\Debug\syscfg
         In the CCS, when Authentication method set to "Signature" and build Project (with no errors), an attempt to Flash Project into target, displays Error -2131 @ 0x2010C Unable to access device register, as shown below
         
         As per above settings, the generated SCFG configurations contains at offset 0x78: 0x0, at offset 0x7c:0x7000, at offset 0x88:0x80000, at offset 0x8c:0x7000 as shown below
         

        Based on the CCS configuration above, the Update Mode is set to Overwrite, which, according to the reference manual, is regarded as the TrustZone-M disabled mode
          
Here are my inquiries:
         1. How can I resolve the error in the CCS to Flash the Project into the target?
         2. According to the reference manual, TrustZone-M is in a disabled mode, correct?
         3. Where does the application data will be loaded at secondary start(0x80000) or primary start(0x0)? If I wish to load the application binary file from UNIFLASH, at what address should it be loaded?
         4. How can I enable or disable TrustZone-M? Is there a specific register or bit for this? By default, is TrustZone-M enabled? How can I utilize the TrustZone feature?
         5. what are the effects on Flash operations via SWD if TrustZone-M is enabled, or disabled?
         6. Is there any relationship between TrustZone-M with the Debug Authorization, please explain
        

Please reply for all the questions in details, Thanks.

  • Hello,

    Thank you for reaching out and your thorough post. I've answered most of your questions below.  The sb_key_ring_init.h file is for Secure Boot, and is not related to trustzone or debug authentication.

    First, please check that the HSM is loaded onto the device, and if it's not loaded please do so via Uniflash. Additionally, since you're using Secure Boot, there is a chance that you have entered ROM panic. If this is the case, you must do a mass chip erase on the board. You can find instructions for doing so here:

    (+) CC2745R10-Q1: Option to chip erase or erase the previous program - Bluetooth forum - Bluetooth®︎ - TI E2E support forums

    2. According to the reference manual, TrustZone-M is in a disabled mode, correct?

    Yes, trust zone is disabled, and will have to be enabled manually. There is a process for this, so in your project TF-M should not be enabled.

     3. Where does the application data will be loaded at secondary start(0x80000) or primary start(0x0)? If I wish to load the application binary file from UNIFLASH, at what address should it be loaded?

    In overwrite mode, the application should be stored in the primary slot. If an image is loaded into a secondary slot with a higher firmware version, the primary slot will be erased and the secondary slot data will be copied to the primary. In short, you should be loading your application at 0x0.

             4. How can I enable or disable TrustZone-M? Is there a specific register or bit for this? By default, is TrustZone-M enabled? How can I utilize the TrustZone feature?

    We are still working on the documentation regarding TrustZone-M and once released will be in our BLE documentation. It should be in the next release. By default TrustZone is disabled.

             5. what are the effects on Flash operations via SWD if TrustZone-M is enabled, or disabled?

    I will have to look into this.

     6. Is there any relationship between TrustZone-M with the Debug Authorization, please explain

    No, there should not be.

    Best,

    Nima Behmanesh

  • Hi Nema,
      
    Actually, I'm working on CC2745R10-Q via SWD with my HOST device.
    Successfully I can be able to flash application(unsigned), CCFG (with no debug authentication), SCFG (with no authentication method and with HSM public key hash) and signed HSM.


    HSM is signed with RSA 3K private key (signed_cc27xxx10_hsm_fw_v3.0.0.bin) and included the hash of RSA 3K public key in SCFG, loaded SCFG, CCFG and finally loaded the HSM into the target successfully with my host device by using SACI_CMD_HSM_FW_PROVISION command and verified the version by using SACI_CMD_HSM_GET_SYS_INFO  word 8 is 0x00030000 (v3.0.0).


    now looking forward to work on signed application:
    Successfully generated the signed application and generated the configured SCFG with authentication method as Signature as shown below but with CCS itself could not be able to Flash Project.


    There is Version 1.0 in the security configuration, i don't find its reflected anywhere in the CCFG/SCFG/application generated bin files, where does this version reflect? what is the use? is there any relation with HSM version (v3.0.0) and security configuration version (v1.0)

    When i add TrustZone in the TI UTILS, it shows 4 slots (Primary Secure, Primary Non-secure, Secondary Secure, Secondary Non-secure) which reflects in the SCFG configuraton from offset 0x78~0x97 as shown below.

    Can you explain regarding this?


    Here are my new questions:
    1. where to add firmware version of higher for application to load in the secondary slot? what is the purpose of version v1.0 in the security configuration? where its reflected?
    2. what is the process of enable TrustZone-M? how do i ensure TF-M not enabled? if TF-M is a register/bit to configure, let me know about it to configure.
    3. Please explain regarding above mentioned TrustZone under TI UTILS.

    4.  How can I resolve the error in the CCS to Flash the Project into the target? error-2131.

    Thanks, please reply all queries in detail.



  • 1. where to add firmware version of higher for application to load in the secondary slot? what is the purpose of version v1.0 in the security configuration? where its reflected?

    The firmware version is for Secure Boot to know which image to boot into. If two valid images exist on the device, then the one with the highest firmware version is booted. It's reflected in the Secure Boot header that's done when using sbtool.

    2. what is the process of enable TrustZone-M? how do i ensure TF-M not enabled? if TF-M is a register/bit to configure, let me know about it to configure.

    We are working on this documentation and will release it in the next SDK.

    4.  How can I resolve the error in the CCS to Flash the Project into the target? error-2131.

    Have you added the post-build steps for signing the image? Is the device blank when you are flashing the new image?

    Best,

    Nima Behmanesh