This FAQ showcase how to use the following TISCI APIs in AM64x/AM243x MCU+SDK
- TISCI_MSG_READ_KEYCNT_KEYREV
- TISCI_MSG_WRITE_KEYREV
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.
This FAQ showcase how to use the following TISCI APIs in AM64x/AM243x MCU+SDK
- TISCI_MSG_READ_KEYCNT_KEYREV
- TISCI_MSG_WRITE_KEYREV
Summary:
- AM64x MCU+SDK 8.5.0.24 (www.ti.com/.../08.05.00.24)
- OTP programming example for the two TISCI APIs: TISCI_MSG_READ_KEYCNT_KEYREV & TISCI_MSG_WRITE_KEYREV
- AM64x EVM
How to build the example:
1/. apply the patch <0001-add-support-on-TISCI-APIs-READ_KEYCNT_KEYREV-WRITE_K.patch> to MCU+SDK
- build the updated libs via "make -s libs PROFILE=debug DEVICE_TYPE=HS"
2/. apply the patch <0002-enable-TIFS-trace.patch> to MCU+SDK
- build the updated boardcfg via "make -s -C tools/sysfw/boardcfg PROFILE=release"
3/. untar <runtime_keyrev.tar.gz> under "examples/otp/" in MCU+SDK
- generate dual-signed-certificate
cd examples/otp/runtime_keyrev
./gen_dual_cert_keyrev.sh
cp -p dual_cert_keyrev.h ../am64x-evm/r5fss0-0_nortos/
- build the example for the two TISCI APIs
"make -C examples/otp/runtime_keyrev/am64x-evm/r5fss0-0_nortos/ti-arm-clang PROFILE=debug DEVICE_TYPE=HS"
Log files:
- am64_smpk_soc_id.txt: the SOC_ID dump from HS-SE befor updating KEYREV(active key set: SMPK/SMEK)
- am64_keyrev_r5_dryrun.log : r5 dry-run log (VPP is OFF for dry-run)
- am64_keyrev_m3_dryrun.log : m3 dry-run log (VPP is OFF for dry-run)
- am64_keyrev_r5.log: r5 log for updating KEYREV
- am64_keyrev_m3.log: m3 log for updating KEYREV
- am64_bmpk_soc_id.txt: the SOC_ID dump from HS-SE after updating KEYREV (active key set: BMPK/BMEK)
Best,
-Hong
Update on AM64x SR1 support
1. Attaching SDK8.5 SYSFW binary for AM64x SR1 HS-SE SoC
2. The working log files:
- am64_SR1_keyrev_r5_dryrun.log : r5 dry-run log (VPP is OFF for dry-run)
- am64_SR1_keyrev_m3_dryrun.log : m3 dry-run log (VPP is OFF for dry-run)
This is a refresh of the KEYREV example attached in the previous posts for MCU+ SDK v9.1. The refreshed KEYREV example is attached for both AM64x and AM243x.
5277.runtime_keyrev_am243x.zip
1) Contents in ZIP
The ZIP attached contains:
2) Integrating the ZIP in the SDK
All the files in the ZIP are organized according to the directory structure of the SDK. So, the ZIP can be integrated in the SDK by simply unzipping it into the SDK installation directory. For example,
~/Downloads ❯ unzip runtime_keyrev_am243x.zip -d ~/ti/mcu_plus_sdk/am243x/09_01_00_41 Archive: runtime_keyrev_am243x.zip inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/tools/boot/signing/gen_dual_cert_keyrev.sh creating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/ creating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/ inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/runtime_keyrev.md inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/runtime_keyrev.h inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/runtime_keyrev.c inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/example.syscfg inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/default_runtime_keyrev_hs.cfg creating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/ti-arm-clang/ inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/ti-arm-clang/syscfg_c.rov.xs inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/ti-arm-clang/makefile_projectspec inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/ti-arm-clang/makefile_ccs_bootimage_gen inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/ti-arm-clang/example.projectspec inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/ti-arm-clang/makefile inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/examples/otp/runtime_keyrev/am243x-evm/r5fss0-0_nortos/main.c inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/docs/api_guide_am243x/EXAMPLES_RUNTIME_KEYREV.html replace /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/source/drivers/sciclient/sciclient.c? [y]es, [n]o, [A]ll, [N]one, [r]ename: y inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/source/drivers/sciclient/sciclient.c replace /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/devconfig/devconfig.mak? [y]es, [n]o, [A]ll, [N]one, [r]ename: y inflating: /home/p-shivhare/ti/mcu_plus_sdk/am243x/09_01_00_41/devconfig/devconfig.mak ~/Downloads ❯ cd ~/ti/mcu_plus_sdk/am243x/09_01_00_41 ~/ti/mcu_plus_sdk/am243x/09_01_00_41 main* ❯ git status On branch main Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: devconfig/devconfig.mak modified: source/drivers/sciclient/sciclient.c Untracked files: (use "git add <file>..." to include in what will be committed) docs/api_guide_am243x/EXAMPLES_RUNTIME_KEYREV.html examples/otp/ tools/boot/signing/gen_dual_cert_keyrev.sh no changes added to commit (use "git add" and/or "git commit -a")
3) Documentation
After unzipping, the HTML documentation page (`EXAMPLES_RUNTIME_KEYREV.html`), for let's say AM243x, gets saved in `docs/api_guide_am243x`. Simply double click on this HTML file to open it in browser for convenient GUI documentation.
The same documentation is available as Markdown also by the name `runtime_keyrev.md` in the directory `examples/otp/runtime_keyrev/{board}/r5fss0-0_nortos`.
4) Reference Logs
2364.example-runtime-keyrev-logs.zip
Regards,
Prashant