2025-04-23 17:54:31 +08:00
|
|
|
|
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" data-whc_version="26.1">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="description" content="本节以 D13x 系列芯片为例,演示固件加密的具体流程。关于 eFuse 烧录区域,可参考对应用户手册。 完成本节所有操作后,编译镜像直接使用 AiBurn 工具进行烧录即可。 配置 BROM 中的 SPI_ENC_EN 比特位 使能 BROM 中 SPI_ENC 功能,在开发板平台命令行执行下列命令,烧录下列 eFuse 信息中的 SPI_ENC_EN 比特位: efuse writehex ..."/><meta name="DC.rights.owner" content="(C) 版权 2025"/><meta name="copyright" content="(C) 版权 2025"/><meta name="generator" content="DITA-OT"/><meta name="DC.type" content="topic"/><meta name="DC.relation" content="../../../topics/sdk/secure/chapter-secure.html"/><meta name="DC.relation" content="../../../topics/sdk/secure/chapter-secure.html"/><meta name="DC.relation" content="../../../topics/sdk/secure/hw_authorization.html"/><meta name="DC.contributor" content="yan.wang"/><meta name="DC.contributor" content="yan.wang"/><meta name="DC.date.modified" content="2025-05-16"/><meta name="DC.format" content="HTML5"/><meta name="DC.identifier" content="id"/><meta name="DC.language" content="zh-CN"/><title>固件加密-SPIENC</title><!-- Generated with build number 2025051600. --><meta name="wh-path2root" content="../../../"/><meta name="wh-toc-id" content="id-d3752e1456"/><meta name="wh-source-relpath" content="topics/sdk/secure/firmware_encryption_with_spienc.dita"/><meta name="wh-out-relpath" content="topics/sdk/secure/firmware_encryption_with_spienc.html"/>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/commons.css?buildId=2024041900"/>
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/topic.css?buildId=2024041900"/>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<script src="../../../webhelp/app/options/properties.js?buildId=20250519091401"></script>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<script src="../../../webhelp/app/localization/strings.js?buildId=2024041900"></script>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<script src="../../../webhelp/app/search/index/keywords.js?buildId=20250519091401"></script>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<script defer="defer" src="../../../webhelp/app/commons.js?buildId=2024041900"></script>
|
|
|
|
|
|
<script defer="defer" src="../../../webhelp/app/topic.js?buildId=2024041900"></script>
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/aic-styles-web-internal.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/notes.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/aic-common.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/aic-images.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/footnote.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/aic-highlight-changes.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/search-in-header.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/topic-body-list.css?buildId=2024041900"/></head>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
<body id="id" class="wh_topic_page frmBody">
|
|
|
|
|
|
<a href="#wh_topic_body" class="sr-only sr-only-focusable">
|
|
|
|
|
|
跳转到主要内容
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<header class="navbar navbar-default wh_header">
|
|
|
|
|
|
<div class="container-fluid">
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<div xmlns:whc="http://www.oxygenxml.com/webhelp/components" class="wh_header_flex_container navbar-nav navbar-expand-md navbar-dark">
|
2025-01-23 16:37:00 +08:00
|
|
|
|
<div class="wh_logo_and_publication_title_container">
|
|
|
|
|
|
<div class="wh_logo_and_publication_title">
|
|
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<a href="https://www.artinchip.com" class=" wh_logo d-none d-sm-block "><img src="../../../company-logo.png" alt=" RTOS SDK 使用指南 SDK 指南文件 "/></a>
|
|
|
|
|
|
<div class=" wh_publication_title "><a href="../../../index.html"><span class="booktitle"> <span class="ph mainbooktitle">RTOS SDK 使用指南</span> <span class="ph booktitlealt">SDK 指南文件</span> </span></a></div>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="wh_top_menu_and_indexterms_link collapse navbar-collapse" id="wh_top_menu_and_indexterms_link">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class=" wh_search_input navbar-form wh_topic_page_search search " role="form">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<form id="searchForm" method="get" role="search" action="../../../search.html"><div><input type="search" placeholder="搜索 " class="wh_search_textfield" id="textToSearch" name="searchQuery" aria-label="搜索查询" required="required"/><button type="submit" class="wh_search_button" aria-label="搜索"><span class="search_input_text">搜索</span></button></div></form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</div></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
<div class="container-fluid" id="wh_topic_container">
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
|
|
<nav class="wh_tools d-print-none navbar-expand-md" aria-label="Tools">
|
|
|
|
|
|
|
|
|
|
|
|
<div data-tooltip-position="bottom" class=" wh_breadcrumb "><ol class="d-print-none"><li><span class="home"><a href="../../../index.html"><span>主页</span></a></span></li><li><div class="topicref" data-id="concept_rcx_czh_pzb"><div class="title"><a href="../../../topics/sdk/chapter-app.html">应用场景</a><div class="wh-tooltip"><p class="shortdesc">描述了 SDK 在不同应用场景中的配置和使用,包括系统更新、OTA、安全方案等。</p></div></div></div></li><li><div class="topicref" data-id="id"><div class="title"><a href="../../../topics/sdk/secure/chapter-secure.html">安全方案</a></div></div></li><li class="active"><div class="topicref" data-id="id"><div class="title"><a href="../../../topics/sdk/secure/firmware_encryption_with_spienc.html">固件加密-SPIENC</a></div></div></li></ol></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="wh_right_tools">
|
|
|
|
|
|
<button class="wh_hide_highlight" aria-label="切换搜索突出显示" title="切换搜索突出显示"></button>
|
|
|
|
|
|
<button class="webhelp_expand_collapse_sections" data-next-state="collapsed" aria-label="折叠截面" title="折叠截面"></button>
|
|
|
|
|
|
<div class=" wh_navigation_links "><span id="topic_navigation_links" class="navheader">
|
|
|
|
|
|
|
|
|
|
|
|
<span class="navprev"><a class="- topic/link link" href="../../../topics/sdk/secure/chapter-secure.html" title="安全方案" aria-label="上一主题: 安全方案" rel="prev"></a></span>
|
|
|
|
|
|
<span class="navnext"><a class="- topic/link link" href="../../../topics/sdk/secure/hw_authorization.html" title="硬件授权认证" aria-label="下一主题: 硬件授权认证" rel="next"></a></span> </span></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class=" wh_print_link print d-none d-md-inline-block "><button onClick="window.print()" title="打印此页" aria-label="打印此页"></button></div>
|
|
|
|
|
|
|
|
|
|
|
|
<button type="button" id="wh_toc_button" class="custom-toggler navbar-toggler collapsed wh_toggle_button navbar-light" aria-expanded="false" aria-label="Toggle publishing table of content" aria-controls="wh_publication_toc">
|
|
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="wh_content_area">
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
|
|
<nav id="wh_publication_toc" class="col-lg-3 col-md-3 col-sm-12 d-md-block d-none d-print-none" aria-label="Table of Contents Container">
|
|
|
|
|
|
<div id="wh_publication_toc_content">
|
|
|
|
|
|
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<div class=" wh_publication_toc " data-tooltip-position="right"><span class="expand-button-action-labels"><span id="button-expand-action" role="button" aria-label="Expand"></span><span id="button-collapse-action" role="button" aria-label="Collapse"></span><span id="button-pending-action" role="button" aria-label="Pending"></span></span><ul role="tree" aria-label="Table of Contents"><li role="treeitem"><div data-tocid="revinfo_linux-d3752e463" class="topicref" data-id="revinfo_linux" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/revinfo/revinfo_rtos.html" id="revinfo_linux-d3752e463-link">修订记录</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e480" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e480-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/env/sdk-compile.html" id="id-d3752e480-link">SDK 编译</a><div class="wh-tooltip"><p class="shortdesc">介绍不同编译环境下 SDK 的详细编译流程。</p></div></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e604" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e604-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/sdk-usage.html" id="id-d3752e604-link">使用指南</a><div class="wh-tooltip"><p class="shortdesc">命令详解,编译选项,镜像和分区配置,添加应用和驱动等的详细使用说明。</p></div></div></div></li><li role="treeitem" aria-expanded="true"><div data-tocid="concept_rcx_czh_pzb-d3752e1004" class="topicref" data-id="concept_rcx_czh_pzb" data-state="expanded"><span role="button" tabindex="0" aria-labelledby="button-collapse-action concept_rcx_czh_pzb-d3752e1004-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/chapter-app.html" id="concept_rcx_czh_pzb-d3752e1004-link">应用场景</a><div class="wh-tooltip"><p class="shortdesc">描述了 SDK 在不同应用场景中的配置和使用,包括系统更新、OTA、安全方案等。</p></div></div></div><ul role="group" class="navbar-nav nav-list"><li role="treeitem"><div data-tocid="id-d3752e1021" class="topicref" data-id="id" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/usb/udisk.html" id="id-d3752e1021-link">挂载 U 盘 </a></div></div></li><li role="treeitem"><div data-tocid="id-d3752e1035" class="topicref" data-id="id" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/sdmc/sdcard.html" id="id-d3752e1035-link">挂载 SD 卡</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e1049" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e1049-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/burnsys/burnsys_user_guide.html" id="id-d3752e1049-link">系统更新</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e1163" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e1163-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/ota/ota_guide.html" id="id-d3752e1163-link">OTA 方案</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e1283" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e1283-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/xip/xip_user_guide.html" id="id-d3752e1283-link">XIP 方案 </a></div></div></li><li role="treeitem" aria-expanded="false"><div dat
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-lg-7 col-md-9 col-sm-12" id="wh_topic_body">
|
|
|
|
|
|
<button id="wh_close_publication_toc_button" class="close-toc-button d-none" aria-label="Toggle publishing table of content" aria-controls="wh_publication_toc" aria-expanded="true">
|
|
|
|
|
|
<span class="close-toc-icon-container">
|
|
|
|
|
|
<span class="close-toc-icon"></span>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button id="wh_close_topic_toc_button" class="close-toc-button d-none" aria-label="Toggle topic table of content" aria-controls="wh_topic_toc" aria-expanded="true">
|
|
|
|
|
|
<span class="close-toc-icon-container">
|
|
|
|
|
|
<span class="close-toc-icon"></span>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<div class=" wh_topic_content body "><main role="main"><article class="- topic/topic topic" role="article" aria-labelledby="ariaid-title1">
|
|
|
|
|
|
<span class="edit-link" style="font-size:12px; opacity:0.6; text-align:right; vertical-align:middle"><a target="_blank" href="http://aicdocco/taskstopics/sdk/secure/firmware_encryption_with_spienc.dita">Edit online</a></span><h1 class="- topic/title title topictitle1" id="ariaid-title1">固件加密-SPIENC</h1>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<div class="date inPage">16 May 2025</div><div style="color: gray;">
|
2025-04-23 17:54:31 +08:00
|
|
|
|
Read time: 4 minute(s)
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="- topic/body body">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e28__20250519091515">本节以 D13x 系列芯片为例,演示固件加密的具体流程。关于 eFuse 烧录区域,可参考对应用户手册。</p>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e31__20250519091515">完成本节所有操作后,编译镜像直接使用 AiBurn 工具进行烧录即可。</p>
|
|
|
|
|
|
<section class="- topic/section section" data-ofbid="d100093e34__20250519091515"><h2 class="- topic/title title sectiontitle">配置 BROM 中的 SPI_ENC_EN 比特位</h2><p class="- topic/p p" data-ofbid="d100093e37__20250519091515">使能 BROM 中 SPI_ENC
|
2025-01-23 16:37:00 +08:00
|
|
|
|
功能,在开发板平台命令行执行下列命令,烧录下列 eFuse 信息中的 SPI_ENC_EN
|
|
|
|
|
|
比特位:</p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_b55_14t_vcc" data-ofbid="id__pre_b55_14t_vcc">efuse writehex <span class="hl-number">0x38</span> <span class="hl-number">00000800</span></pre>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
上述命令会在地址 0x38 处设置 SPI_ENC_EN 比特位为 1。<div class="table-container"><table class="- topic/table table frame-all" data-ofbid="d100093e42__20250519091515" data-cols="8"><caption></caption><colgroup><col style="width:13.885647607934654%"/><col style="width:11.785297549591599%"/><col style="width:11.90198366394399%"/><col style="width:12.135355892648775%"/><col style="width:11.668611435239207%"/><col style="width:11.668611435239207%"/><col style="width:11.90198366394399%"/><col style="width:15.052508751458577%"/></colgroup><thead class="- topic/thead thead">
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__entry__1"><p class="- topic/p p" data-ofbid="d100093e68__20250519091515">用途</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__entry__2"><p class="- topic/p p" data-ofbid="d100093e72__20250519091515">位数</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__entry__3"><p class="- topic/p p" data-ofbid="d100093e76__20250519091515">地址</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__entry__4"><p class="- topic/p p" data-ofbid="d100093e80__20250519091515">禁止位</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__entry__5"><p class="- topic/p p" data-ofbid="d100093e84__20250519091515">禁写</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__entry__6"><p class="- topic/p p" data-ofbid="d100093e89__20250519091515">禁读</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__entry__7"><p class="- topic/p p" data-ofbid="d100093e93__20250519091515">归属</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-0 rowsep-1" id="id__entry__8"><p class="- topic/p p" data-ofbid="d100093e97__20250519091515">备注</p></th>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</thead><tbody class="- topic/tbody tbody">
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__entry__1"><p class="- topic/p p" data-ofbid="d100093e107__20250519091515">SECURE</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__entry__2"><p class="- topic/p p" data-ofbid="d100093e111__20250519091515">64</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__entry__3"><p class="- topic/p p" data-ofbid="d100093e115__20250519091515">38~3F</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__entry__4"><p class="- topic/p p" data-ofbid="d100093e119__20250519091515">14~15</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__entry__5"><p class="- topic/p p" data-ofbid="d100093e123__20250519091515">V</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__entry__6"><p class="- topic/p p" data-ofbid="d100093e128__20250519091515">-</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__entry__7"><p class="- topic/p p" data-ofbid="d100093e132__20250519091515">CSTM</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-0" headers="id__entry__8"><p class="- topic/p p" data-ofbid="d100093e136__20250519091515">安全和调试功能开关</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody></table></div></section>
|
|
|
|
|
|
<section class="- topic/section section" id="id__secure" data-ofbid="id__secure"><h2 class="- topic/title title sectiontitle">SECURE 区域定义</h2>
|
|
|
|
|
|
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<div class="table-container"><table class="- topic/table table frame-all" data-ofbid="d100093e148__20250519091515" data-cols="3"><caption></caption><colgroup><col style="width:16.33986928104575%"/><col style="width:34.64052287581699%"/><col style="width:49.01960784313725%"/></colgroup><thead class="- topic/thead thead">
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e163__20250519091515">比特位</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e167__20250519091515">名称</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-0 rowsep-1" id="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e171__20250519091515">描述</p></th>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</thead><tbody class="- topic/tbody tbody">
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e181__20250519091515">31:25</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e185__20250519091515"><em class="+ topic/ph hi-d/i ph i">-</em>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</p></td>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e191__20250519091515"><em class="+ topic/ph hi-d/i ph i">-</em>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</p></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e200__20250519091515">24</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e204__20250519091515">PBP_ENC_EN</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e208__20250519091515">BROM 读取使用,使能 PBP 程序加密功能</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e215__20250519091515">23:20</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e219__20250519091515"><em class="+ topic/ph hi-d/i ph i">-</em>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</p></td>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e225__20250519091515"><em class="+ topic/ph hi-d/i ph i">-</em>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</p></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e234__20250519091515">19</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e238__20250519091515">SPI_ENC_EN</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e242__20250519091515">BROM 读取使用,使能 SPI 总线数据加密功能</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e249__20250519091515">18</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e253__20250519091515"><em class="+ topic/ph hi-d/i ph i">-</em>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</p></td>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e259__20250519091515"><em class="+ topic/ph hi-d/i ph i">-</em>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</p></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e269__20250519091515">17</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e273__20250519091515">ENCRYPT_BOOT_EN</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e277__20250519091515">BROM 读取使用,使能固件加密启动功能</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e284__20250519091515">16</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e288__20250519091515">SECURE_BOOT_EN</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e292__20250519091515">BROM 读取使用,使能安全启动功能</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e299__20250519091515">15:1</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e303__20250519091515"><em class="+ topic/ph hi-d/i ph i">-</em>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</p></td>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e309__20250519091515"><em class="+ topic/ph hi-d/i ph i">-</em>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</p></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__secure__entry__1"><p class="- topic/p p" data-ofbid="d100093e318__20250519091515">0</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__secure__entry__2"><p class="- topic/p p" data-ofbid="d100093e322__20250519091515">JTAG_LOCK</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-0" headers="id__secure__entry__3"><p class="- topic/p p" data-ofbid="d100093e326__20250519091515">逻辑组合后连接到 CPU 屏蔽 TDO,关闭 JTAG 调试功能,在安全方案中烧录为 1</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody></table></div>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e333__20250519091515">具体 eFuse 区域的地址,请参考芯片的数据手册。</p>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
<section class="- topic/section section" id="id__bootloader" data-ofbid="id__bootloader"><h2 class="- topic/title title sectiontitle">在
|
2025-01-23 16:37:00 +08:00
|
|
|
|
BootLoader
|
|
|
|
|
|
中启用 SPIENC
|
|
|
|
|
|
驱动</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<ol class="- topic/ol ol" id="id__ol_kgv_44t_vcc" data-ofbid="id__ol_kgv_44t_vcc">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e344__20250519091515">在 <span class="- topic/ph ph">Luban-Lite</span> 根目录下执行 <code class="+ topic/ph pr-d/codeph ph codeph">bm</code>,进入 BootLoader 的 menuconfig
|
2025-04-23 17:54:31 +08:00
|
|
|
|
功能配置界面。<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_sbs_r4t_vcc" data-ofbid="id__codeblock_sbs_r4t_vcc">bm</pre></li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e355__20250519091515">进入 menuconfig 功能配置界面,按如下选择启用 QSPI0 的加密功能,配置只打开了 QSPI0 的加密使能作为示例:
|
2025-01-23 16:37:00 +08:00
|
|
|
|
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_mqg_54t_vcc" data-ofbid="id__pre_mqg_54t_vcc">Board options --->
|
|
|
|
|
|
[*] Using Spienc
|
2025-04-23 17:54:31 +08:00
|
|
|
|
[*] Enc qspi0</pre>
|
|
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e361__20250519091515">如果需要,进入 menuconfig 功能配置界面设置 Tweak 值,否则可略过。<p class="- topic/p p" data-ofbid="d100093e363__20250519091515">SPIENC 中的 Tweak 可以影响 COUNTER
|
2025-04-23 17:54:31 +08:00
|
|
|
|
的生成,进而改变加密的结果。 如果需要让在不同的产品对相同的数据有不同的加密结果,则可以进入 menuconfig 的功能配置界面调整该值。
|
2025-01-23 16:37:00 +08:00
|
|
|
|
</p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_xlw_v4t_vcc" data-ofbid="id__pre_xlw_v4t_vcc">Board options --->
|
|
|
|
|
|
[*] Using spienc --->
|
2025-07-22 11:15:46 +08:00
|
|
|
|
(<span class="hl-number">0</span>) set qspi0 tweak</pre><p class="- topic/p p" data-ofbid="d100093e367__20250519091515">完成以上配置之后, BootLoader SPI_ENC
|
2025-04-23 17:54:31 +08:00
|
|
|
|
驱动将被使能, SPI NOR / SPI NAND 驱动在数据访问时将自动进行数据加解密。</p></li>
|
|
|
|
|
|
</ol>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<section class="- topic/section section" id="id__section_ydv_fk4_fdc" data-ofbid="id__section_ydv_fk4_fdc"><h2 class="- topic/title title sectiontitle">在 RTOS 中启用
|
2025-01-23 16:37:00 +08:00
|
|
|
|
SPIENC
|
|
|
|
|
|
驱动
|
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<div class="- topic/p p" data-ofbid="d100093e378__20250519091515">
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<ol class="- topic/ol ol" id="id__ol_sg2_hk4_fdc" data-ofbid="id__ol_sg2_hk4_fdc">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e382__20250519091515">在 <span class="- topic/ph ph">Luban-Lite</span> 根目录下执行以下命令,进入 RTOS 的 menuconfig
|
2025-04-23 17:54:31 +08:00
|
|
|
|
功能配置界面:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_wg2_hk4_fdc" data-ofbid="id__codeblock_wg2_hk4_fdc">scons --menuconfig</pre></li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e390__20250519091515">在功能配置界面,按如下选择启用 QSPI0 的加密功能,配置只打开了 QSPI0 的加密使能作为示例:
|
2025-01-23 16:37:00 +08:00
|
|
|
|
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_xg2_hk4_fdc" data-ofbid="id__codeblock_xg2_hk4_fdc">Board options --->
|
|
|
|
|
|
[*] Using Spienc
|
|
|
|
|
|
[*] Enc qspi0
|
|
|
|
|
|
</pre>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e396__20250519091515">如果需要,进入 menuconfig 功能配置界面设置 Tweak 值,否则可略过。<p class="- topic/p p" data-ofbid="d100093e398__20250519091515">SPIENC 中的 Tweak 可以影响 COUNTER
|
2025-01-23 16:37:00 +08:00
|
|
|
|
的生成,进而改变加密的结果。 如果需要让在不同的产品对相同的数据有不同的加密结果,则可以进入 menuconfig
|
|
|
|
|
|
的功能配置界面调整该值。</p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_yg2_hk4_fdc" data-ofbid="id__codeblock_yg2_hk4_fdc">Board options --->
|
|
|
|
|
|
[*] Using spienc --->
|
|
|
|
|
|
(<span class="hl-number">0</span>) set qspi0 tweak
|
2025-07-22 11:15:46 +08:00
|
|
|
|
</pre><p class="- topic/p p" data-ofbid="d100093e402__20250519091515">完成以上配置之后, RTOS SPI_ENC 驱动将被使能, SPI NOR/ SPI NAND
|
2025-04-23 17:54:31 +08:00
|
|
|
|
驱动在数据访问时将自动进行数据加解密。</p></li>
|
|
|
|
|
|
</ol>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
</div>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
<section class="- topic/section section" id="id__section_f14_vj4_fdc" data-ofbid="id__section_f14_vj4_fdc"><h2 class="- topic/title title sectiontitle">配置密钥及所需的
|
2025-01-23 16:37:00 +08:00
|
|
|
|
KEY 和 COUNTER 值</h2>
|
|
|
|
|
|
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<div class="- topic/p p" data-ofbid="d100093e413__20250519091515">SPI_ENC 模块使用 AES-128-CTR 算法对 SPI 总线数据进行加解密,该算法在计算时的密钥有两部分:<ul class="- topic/ul ul simple" id="id__ul_w5w_vj4_fdc" data-ofbid="id__ul_w5w_vj4_fdc">
|
|
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e417__20250519091515">
|
|
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e419__20250519091515">128 bit AES 密钥(KEY)</p>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e423__20250519091515">
|
|
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e425__20250519091515">128 bit 数据块的 COUNTER 值</p>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</li>
|
|
|
|
|
|
</ul></div>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<div class="- topic/p p" data-ofbid="d100093e430__20250519091515">其中 KEY 直接使用 eFuse 中的 <code class="+ topic/ph pr-d/codeph ph codeph">SPI_ENC_KEY</code> ,COUNTER 值则由几部分共同产生:<ul class="- topic/ul ul simple" id="id__ul_kdh_wj4_fdc" data-ofbid="id__ul_kdh_wj4_fdc">
|
|
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e437__20250519091515">
|
|
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e439__20250519091515">eFuse 中的 <code class="+ topic/ph pr-d/codeph ph codeph">SPI_ENC_NONCE</code></p>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e445__20250519091515">
|
|
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e447__20250519091515">memuconfig 中配置的 <code class="+ topic/ph pr-d/codeph ph codeph">tweak</code></p>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e453__20250519091515">
|
|
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e455__20250519091515">访问数据所在的地址 <code class="+ topic/ph pr-d/codeph ph codeph">address</code></p>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</li>
|
|
|
|
|
|
</ul></div>
|
|
|
|
|
|
<figure class="- topic/fig fig fignone" id="id__id2" data-ofbid="id__id2">
|
|
|
|
|
|
|
|
|
|
|
|
<br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_inr_wj4_fdc" src="../../../images/secure/spienc_counter_value1.png" alt="spienc_counter_value1"/></div><br/>
|
|
|
|
|
|
<figcaption data-caption-side="bottom" class="- topic/title title figcapcenter"><span class="figtitleprefix fig--title-label">图<span class="fig--title-label-number"> 1</span><span class="fig--title-label-punctuation">. </span></span><span class="fig--title">COUNTER 值的生成</span></figcaption></figure>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<div class="- topic/p p" data-ofbid="d100093e474__20250519091515">因此在使用 SPI_ENC 时,需要设置以下的 eFuse 信息:<div class="table-container"><table class="- topic/table table frame-all" id="id__table_unx_wj4_fdc" data-ofbid="id__table_unx_wj4_fdc" data-cols="8"><caption class="- topic/title title tablecap" data-caption-side="top" data-is-repeated="true"><span class="table--title-label">表<span class="table--title-label-number"> 1</span><span class="table--title-label-punctuation">. </span></span><span class="table--title"></span></caption><colgroup><col style="width:13.924050632911392%"/><col style="width:10.654008438818565%"/><col style="width:11.181434599156118%"/><col style="width:11.181434599156118%"/><col style="width:10.548523206751053%"/><col style="width:10.548523206751053%"/><col style="width:10.864978902953586%"/><col style="width:21.097046413502106%"/></colgroup><thead class="- topic/thead thead">
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_unx_wj4_fdc__entry__1"><p class="- topic/p p" data-ofbid="d100093e504__20250519091515">用途</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_unx_wj4_fdc__entry__2"><p class="- topic/p p" data-ofbid="d100093e508__20250519091515">位数</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_unx_wj4_fdc__entry__3"><p class="- topic/p p" data-ofbid="d100093e512__20250519091515">地址</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_unx_wj4_fdc__entry__4"><p class="- topic/p p" data-ofbid="d100093e516__20250519091515">禁止位</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_unx_wj4_fdc__entry__5"><p class="- topic/p p" data-ofbid="d100093e520__20250519091515">禁写</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_unx_wj4_fdc__entry__6"><p class="- topic/p p" data-ofbid="d100093e525__20250519091515">禁读</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_unx_wj4_fdc__entry__7"><p class="- topic/p p" data-ofbid="d100093e529__20250519091515">归属</p></th>
|
|
|
|
|
|
<th class="- topic/entry entry colsep-0 rowsep-1" id="id__table_unx_wj4_fdc__entry__8"><p class="- topic/p p" data-ofbid="d100093e533__20250519091515">备注</p></th>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</thead><tbody class="- topic/tbody tbody">
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__1"><p class="- topic/p p" data-ofbid="d100093e543__20250519091515">DIS RD</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__2"><p class="- topic/p p" data-ofbid="d100093e547__20250519091515">64</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__3"><p class="- topic/p p" data-ofbid="d100093e551__20250519091515">0~7</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__4"><p class="- topic/p p" data-ofbid="d100093e555__20250519091515">0~1</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__5"><p class="- topic/p p" data-ofbid="d100093e559__20250519091515">V</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__6"><p class="- topic/p p" data-ofbid="d100093e564__20250519091515">-</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__7"><p class="- topic/p p" data-ofbid="d100093e568__20250519091515">CSTM</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_unx_wj4_fdc__entry__8"><p class="- topic/p p" data-ofbid="d100093e572__20250519091515">eFuse 读禁止配置区域</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__1"><p class="- topic/p p" data-ofbid="d100093e579__20250519091515">DIS WR</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__2"><p class="- topic/p p" data-ofbid="d100093e583__20250519091515">64</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__3"><p class="- topic/p p" data-ofbid="d100093e587__20250519091515">8~F</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__4"><p class="- topic/p p" data-ofbid="d100093e591__20250519091515">2~3</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__5"><p class="- topic/p p" data-ofbid="d100093e595__20250519091515">-</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__6"><p class="- topic/p p" data-ofbid="d100093e600__20250519091515">-</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__7"><p class="- topic/p p" data-ofbid="d100093e604__20250519091515">-</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_unx_wj4_fdc__entry__8"><p class="- topic/p p" data-ofbid="d100093e608__20250519091515">eFuse 写禁止配置区域</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__1"><p class="- topic/p p" data-ofbid="d100093e615__20250519091515">SPI ENC KEY</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__2"><p class="- topic/p p" data-ofbid="d100093e619__20250519091515">128</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__3"><p class="- topic/p p" data-ofbid="d100093e623__20250519091515">A0~AF</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__4"><p class="- topic/p p" data-ofbid="d100093e627__20250519091515">40~43</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__5"><p class="- topic/p p" data-ofbid="d100093e631__20250519091515">V</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__6"><p class="- topic/p p" data-ofbid="d100093e636__20250519091515">V</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_unx_wj4_fdc__entry__7"><p class="- topic/p p" data-ofbid="d100093e640__20250519091515">CSTM</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_unx_wj4_fdc__entry__8"><p class="- topic/p p" data-ofbid="d100093e644__20250519091515">安全,连接到 SPI ENC,对称密钥</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="- topic/row">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_unx_wj4_fdc__entry__1"><p class="- topic/p p" data-ofbid="d100093e651__20250519091515">SPI ENC NONCE</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_unx_wj4_fdc__entry__2"><p class="- topic/p p" data-ofbid="d100093e655__20250519091515">64</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_unx_wj4_fdc__entry__3"><p class="- topic/p p" data-ofbid="d100093e659__20250519091515">B0~B7</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_unx_wj4_fdc__entry__4"><p class="- topic/p p" data-ofbid="d100093e663__20250519091515">44~45</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_unx_wj4_fdc__entry__5"><p class="- topic/p p" data-ofbid="d100093e667__20250519091515">V</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_unx_wj4_fdc__entry__6"><p class="- topic/p p" data-ofbid="d100093e672__20250519091515">V</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_unx_wj4_fdc__entry__7"><p class="- topic/p p" data-ofbid="d100093e676__20250519091515">CSTM</p></td>
|
|
|
|
|
|
<td class="- topic/entry entry colsep-0 rowsep-0" headers="id__table_unx_wj4_fdc__entry__8"><p class="- topic/p p" data-ofbid="d100093e680__20250519091515">安全,连接到 SPI ENC,随机数</p></td>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody></table></div></div>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e688__20250519091515">具体 eFuse 区域的地址,请参考芯片的数据手册。</p>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
<section class="- topic/section section" id="id__spi-enc-key" data-ofbid="id__spi-enc-key"><h2 class="- topic/title title sectiontitle">烧写 SPI_ENC KEY</h2>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
<strong class="+ topic/ph hi-d/b ph b">到 eFuse
|
2025-04-23 17:54:31 +08:00
|
|
|
|
中</strong><ol class="- topic/ol ol" id="id__ol_rxg_fqt_vcc" data-ofbid="id__ol_rxg_fqt_vcc">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e700__20250519091515">主机端执行 <code class="+ topic/ph pr-d/codeph ph codeph">opensslrand-hex16</code> 生成 SPI_ENC KEY。
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_g2b_gqt_vcc" data-ofbid="id__pre_g2b_gqt_vcc"><span class="hl-number">52e0</span>ef932d755b69f7a93dd7485748d8</pre>
|
|
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e709__20250519091515">
|
|
|
|
|
|
<div class="- topic/p p" data-ofbid="d100093e711__20250519091515">在开发板平台命令行执行下列命令,烧录 SPI_ENC KEY 到 eFuse 中。
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_cnl_gqt_vcc" data-ofbid="id__pre_cnl_gqt_vcc">efuse writehex <span class="hl-number">0xA0</span> <span class="hl-number">52e0</span>ef932d755b69f7a93dd7485748d8</pre>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
</div>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e718__20250519091515">
|
|
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e720__20250519091515">禁止 SPI_ENC KEY 读写</p>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_vvr_gqt_vcc" data-ofbid="id__pre_vvr_gqt_vcc">efuse writehex <span class="hl-number">0x04</span> <span class="hl-number">000f</span>0000
|
2025-04-23 17:54:31 +08:00
|
|
|
|
efuse writehex <span class="hl-number">0x0c</span> <span class="hl-number">000f</span>0000</pre>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ol>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
<section class="- topic/section section" id="id__spi-enc-nonce" data-ofbid="id__spi-enc-nonce"><h2 class="- topic/title title sectiontitle">烧写 SPI_ENC
|
2025-01-23 16:37:00 +08:00
|
|
|
|
NONCE 到 eFuse
|
|
|
|
|
|
中</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<ol class="- topic/ol ol" id="id__ol_of4_3qt_vcc" data-ofbid="id__ol_of4_3qt_vcc">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e736__20250519091515">主机端执行 <code class="+ topic/ph pr-d/codeph ph codeph">opensslrand-hex8</code> 生成 SPI_ENC NONCE。
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_z1w_3qt_vcc" data-ofbid="id__pre_z1w_3qt_vcc">bb99eb4ababc43dc</pre>
|
|
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e745__20250519091515">
|
|
|
|
|
|
<div class="- topic/p p" data-ofbid="d100093e747__20250519091515">在开发板平台命令行执行下列命令,烧录 SPI_ENC NONCE 到 eFuse 中。
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_ij2_jqt_vcc" data-ofbid="id__pre_ij2_jqt_vcc">efuse writehex <span class="hl-number">0xB0</span> bb99eb4ababc43dc</pre>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
</div>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</li>
|
2025-07-22 11:15:46 +08:00
|
|
|
|
<li class="- topic/li li" data-ofbid="d100093e754__20250519091515">
|
|
|
|
|
|
<p class="- topic/p p" data-ofbid="d100093e756__20250519091515">禁止 SPI_ENC NONCE 读写</p>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__pre_hdz_jqt_vcc" data-ofbid="id__pre_hdz_jqt_vcc">efuse writehex <span class="hl-number">0x04</span> <span class="hl-number">00300000</span>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
efuse writehex <span class="hl-number">0x0c</span> <span class="hl-number">00300000</span></pre>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ol>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</article></main></div>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<nav role="navigation" id="wh_topic_toc" aria-label="On this page" class="col-lg-2 d-none d-lg-block navbar d-print-none">
|
|
|
|
|
|
<div id="wh_topic_toc_content">
|
|
|
|
|
|
|
|
|
|
|
|
<div class=" wh_topic_toc "><div class="wh_topic_label">在本页上</div><ul><li class="section-item"><div class="section-title"><a href="#id__secure" data-tocid="id__secure">SECURE 区域定义</a></div></li><li class="section-item"><div class="section-title"><a href="#id__bootloader" data-tocid="id__bootloader">在
|
|
|
|
|
|
BootLoader
|
|
|
|
|
|
中启用 SPIENC
|
|
|
|
|
|
驱动</a></div></li><li class="section-item"><div class="section-title"><a href="#id__section_ydv_fk4_fdc" data-tocid="id__section_ydv_fk4_fdc">在 RTOS 中启用
|
|
|
|
|
|
SPIENC
|
|
|
|
|
|
驱动
|
|
|
|
|
|
</a></div></li><li class="section-item"><div class="section-title"><a href="#id__section_f14_vj4_fdc" data-tocid="id__section_f14_vj4_fdc">配置密钥及所需的
|
|
|
|
|
|
KEY 和 COUNTER 值</a></div></li><li class="section-item"><div class="section-title"><a href="#id__spi-enc-key" data-tocid="id__spi-enc-key">烧写 SPI_ENC KEY</a></div></li><li class="section-item"><div class="section-title"><a href="#id__spi-enc-nonce" data-tocid="id__spi-enc-nonce">烧写 SPI_ENC
|
|
|
|
|
|
NONCE 到 eFuse
|
|
|
|
|
|
中</a></div></li></ul></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<footer class="navbar navbar-default wh_footer">
|
|
|
|
|
|
<div class=" footer-container mx-auto ">
|
|
|
|
|
|
<title>footer def</title>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<style>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
.p1 {
|
|
|
|
|
|
font-family: FangZhengShuSong, Times, serif;
|
|
|
|
|
|
}
|
|
|
|
|
|
.p2 {
|
|
|
|
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
|
|
|
|
}
|
|
|
|
|
|
.p3 {
|
|
|
|
|
|
font-family: "Lucida Console", "Courier New", monospace;
|
|
|
|
|
|
}
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</style>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
<div class="webhelp.fragment.footer">
|
2025-04-23 17:54:31 +08:00
|
|
|
|
<p class="p1">Copyright © 2019-2025 广东匠芯创科技有限公司. All rights reserved.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
2025-01-23 16:37:00 +08:00
|
|
|
|
<div class="generation_time">
|
2025-07-22 11:15:46 +08:00
|
|
|
|
Update Time: 2025-05-19
|
2025-01-23 16:37:00 +08:00
|
|
|
|
</div>
|
2025-04-23 17:54:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-01-23 16:37:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="go2top" class="d-print-none">
|
|
|
|
|
|
<span class="oxy-icon oxy-icon-up"></span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="modal_img_large" class="modal">
|
|
|
|
|
|
<span class="close oxy-icon oxy-icon-remove"></span>
|
|
|
|
|
|
<div id="modal_img_container"></div>
|
|
|
|
|
|
<div id="caption"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="${pd}/publishing/publishing-styles-AIC-template/js/custom.js" defer="defer"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|