Files
luban-lite/doc/topics/sdk/psram/psram-design-guide.html

1352 lines
136 KiB
HTML
Raw Normal View History

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="源码说明 表 1 . 相关模块 源码路径 PSRAM Driver bsp/artinchip/drv_bare/psram HAL bsp/artinchip/hal/xspi 模块架构 图 1 . Luban-Lite XSPI PSRAM 框图 ArtInChip 提供了 XSPI HAL 层,并且实现了对接 DRV_BARE 的驱动层。 由于 XSPI 传输需要使用 SYSCFG 和 ..."/><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/psram/psram-user-guide.html"/><meta name="DC.relation" content="../../../topics/sdk/psram/psram-test-guide.html"/><meta name="DC.relation" content="../../../topics/sdk/psram/psram-faq.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>设计说明</title><!-- Generated with build number 2025051600. --><meta name="wh-path2root" content="../../../"/><meta name="wh-toc-id" content="id-d3752e3857"/><meta name="wh-source-relpath" content="topics/sdk/psram/psram-design-guide.dita"/><meta name="wh-out-relpath" content="topics/sdk/psram/psram-design-guide.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">
2025-04-23 17:54:31 +08:00
<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="id"><div class="title"><a href="../../../topics/sdk/chapter-advanced-app.html">高级应用</a><div class="wh-tooltip"><p class="shortdesc">系统、存储、多媒体、接口、安全等模块的详细配置和设计说明。</p></div></div></div></li><li><div class="topicref" data-id="chapter-memory"><div class="title"><a href="../../../topics/chapter-title/chapter-memory-sdk.html">存储</a><div class="wh-tooltip"><p class="shortdesc">SDMC、<span class="ph">PSRAM、</span>SPI NAND、SPI NOR 等存储模块的介绍和使用说明。</p></div></div></div></li><li><div class="topicref" data-id="id"><div class="title"><a href="../../../topics/sdk/psram/psram-user-guide.html">PSRAM 使用指南</a></div></div></li><li class="active"><div class="topicref" data-id="id"><div class="title"><a href="../../../topics/sdk/psram/psram-design-guide.html">设计说明</a></div></div></li></ol></div>
2025-01-23 16:37:00 +08:00
<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/psram/psram-test-guide.html" title="测试指南" aria-label="上一主题: 测试指南" rel="prev"></a></span>
<span class="navnext"><a class="- topic/link link" href="../../../topics/sdk/psram/psram-faq.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="false"><div data-tocid="concept_rcx_czh_pzb-d3752e1004" class="topicref" data-id="concept_rcx_czh_pzb" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-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></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e1848" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e1848-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/peripheral/peripheral-intro.html" id="id-d3752e1848-link">外设移植</a><div class="wh-tooltip"><p class="shortdesc"><span class="ph">CTP、U 盘、SD 卡、有线和无线网络</span>等外设的介绍和使用说明。</p></div></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e2022" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e2022-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/chapter-bringup.html" id="id-d3752e2022-link">BringUp</a><div class="wh-tooltip"><p class="shortdesc">主要描述板卡的各项配置,使 SDK 的环境和板卡匹配,并确保 SDK 编译后的固件能够在板子上正常运行。</p></div></div></div></li><li role="treeitem" aria-expanded="true"><div data-tocid="id-d3752e2418" class="topicref" data-id="id" data-state="expanded"><span role="button" tabindex="0" aria-labelledby="button-collapse-action id-d3752e2418-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/chapter-advanced-app.html" id="id-d3752e2418-link">高级应用</a><div class="wh-tooltip"><p class="shortdesc">系统、存储、多媒体、接口、安全等模块的详细配置和设计说明。</p></div></div></div><ul role="group" class="navbar-nav nav-list"><li role="treeitem" aria-expanded="false"><div data-tocid="_0-d3752e2435" class
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/psram/psram-design-guide.dita">Edit online</a></span><h1 class="- topic/title title topictitle1" id="ariaid-title1">设计说明</h1>
2025-07-22 11:15:46 +08:00
<div class="date inPage">16 May 2025</div><div style="color: gray;">
2025-01-23 16:37:00 +08:00
Read time: 12 minute(s)
2025-04-23 17:54:31 +08:00
</div>
<div class="- topic/body body">
<section class="- topic/section section" id="id__id2" data-ofbid="id__id2"><h2 class="- topic/title title sectiontitle">源码说明</h2>
2025-01-23 16:37:00 +08:00
2025-04-23 17:54:31 +08:00
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_c3c_qyh_bdc" data-ofbid="id__table_c3c_qyh_bdc" data-cols="2"><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:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><thead class="- topic/thead thead">
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_c3c_qyh_bdc__entry__1"><p class="- topic/p p" data-ofbid="d89420e50__20250519091514">相关模块</p></th>
<th class="- topic/entry entry colsep-0 rowsep-1" id="id__table_c3c_qyh_bdc__entry__2"><p class="- topic/p p" data-ofbid="d89420e54__20250519091514">源码路径</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_c3c_qyh_bdc__entry__1"><p class="- topic/p p" data-ofbid="d89420e64__20250519091514">PSRAM Driver</p></td>
<td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_c3c_qyh_bdc__entry__2"><p class="- topic/p p" data-ofbid="d89420e68__20250519091514"><span class="+ topic/ph sw-d/filepath ph filepath">bsp/artinchip/drv_bare/psram</span></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_c3c_qyh_bdc__entry__1"><p class="- topic/p p" data-ofbid="d89420e76__20250519091514">HAL</p></td>
<td class="- topic/entry entry colsep-0 rowsep-0" headers="id__table_c3c_qyh_bdc__entry__2"><p class="- topic/p p" data-ofbid="d89420e80__20250519091514"><span class="+ topic/ph sw-d/filepath ph filepath">bsp/artinchip/hal/xspi</span></p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
</section>
<section class="- topic/section section" id="id__id3" data-ofbid="id__id3"><h2 class="- topic/title title sectiontitle">模块架构</h2>
2025-01-23 16:37:00 +08:00
2025-04-23 17:54:31 +08:00
<figure class="- topic/fig fig fignone" id="id__id9" data-ofbid="id__id9">
<br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_d3c_qyh_bdc" src="../../../images/psram/luban-lite-XSPI-PSRAM-arch.drawio.png" alt="luban-lite-XSPI-PSRAM-arch"/></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"><span class="- topic/ph ph">Luban-Lite</span> XSPI PSRAM 框图</span></figcaption></figure>
2025-07-22 11:15:46 +08:00
<p class="- topic/p p" data-ofbid="d89420e109__20250519091514">ArtInChip 提供了 XSPI HAL 层,并且实现了对接 DRV_BARE 的驱动层。 由于 XSPI 传输需要使用 SYSCFG 和 CMU因此 SYSCFG
2025-01-23 16:37:00 +08:00
HAL 和 CMU HAL 是相关模块。</p>
2025-04-23 17:54:31 +08:00
</section>
<section class="- topic/section section" id="id__hal-drv" data-ofbid="id__hal-drv"><h2 class="- topic/title title sectiontitle">HAL 与 DRV</h2>
2025-01-23 16:37:00 +08:00
2025-07-22 11:15:46 +08:00
<p class="- topic/p p" data-ofbid="d89420e118__20250519091514">ArtInChip 的 PSRAM 驱动按照 HAL 层 + Driver 层的结构进行设计,其中 HAL 层为硬件抽象层, 提供系统无关的硬件驱动实现;在 HAL
2025-01-23 16:37:00 +08:00
层之上,可根据不同 RTOS 的驱动框架,实现对应的 PSRAM DRV 层进行对接。</p>
2025-04-23 17:54:31 +08:00
<figure class="- topic/fig fig fignone" id="id__id10" data-ofbid="id__id10">
<br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_e3c_qyh_bdc" src="../../../images/psram/luban-lite-hal-drv.drawio.png" alt="luban-lite-hal-drv"/></div><br/>
<figcaption data-caption-side="bottom" class="- topic/title title figcapcenter"><span class="figtitleprefix fig--title-label"><span class="fig--title-label-number"> 2</span><span class="fig--title-label-punctuation">. </span></span><span class="fig--title">HAL and DRV</span></figcaption></figure>
2025-07-22 11:15:46 +08:00
<p class="- topic/p p" data-ofbid="d89420e133__20250519091514">XSPI HAL 的特点:</p>
2025-04-23 17:54:31 +08:00
<ol class="- topic/ol ol arabic simple" id="id__ol_g3c_qyh_bdc" data-ofbid="id__ol_g3c_qyh_bdc">
2025-07-22 11:15:46 +08:00
<li class="- topic/li li" data-ofbid="d89420e138__20250519091514">
<p class="- topic/p p" data-ofbid="d89420e140__20250519091514">无状态</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="d89420e144__20250519091514">
<p class="- topic/p p" data-ofbid="d89420e146__20250519091514">支持 XIPAHB 模式</p>
2025-04-23 17:54:31 +08:00
</li>
</ol>
2025-07-22 11:15:46 +08:00
<p class="- topic/p p" data-ofbid="d89420e152__20250519091514">XSPI HAL 相关的设备操作都需要通过 Handle 的方式进行。 由于 HAL 其内部无状态,不会进行空间分配,因此 Handle 的空间需要外部申请并且传入, 由
2025-01-23 16:37:00 +08:00
HAL 层进行使用。</p>
2025-04-23 17:54:31 +08:00
</section>
<section class="- topic/section section" id="id__id4" data-ofbid="id__id4"><h2 class="- topic/title title sectiontitle">关键流程设计</h2>
2025-01-23 16:37:00 +08:00
2025-07-22 11:15:46 +08:00
<div class="- topic/p p" data-ofbid="d89420e161__20250519091514">在 bootloader 板级初始化过程中,会调用 <span class="+ topic/keyword pr-d/apiname keyword apiname">aic_xspi_psram_init()</span> 函数,对 XSPI
2025-01-23 16:37:00 +08:00
控制器、PSRAM 设备初始化, 并开启 XIP 模式,系统可以通过 PSRAM 映射地址进行内存访问
<code class="+ topic/ph pr-d/codeph ph codeph">0x40000000-0x5FFFFFFF</code>
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_hsn_z33_ddc" data-ofbid="id__codeblock_hsn_z33_ddc">aic_xspi_psram_init(); <em class="hl-comment">// application\baremetal\bootloader\main.c</em>
|-&gt; hal_xspi_init(); <em class="hl-comment">// bsp\artinchip\drv_bare\psram\xspi_psram.c</em>
|-&gt; aic_xspi_psram_dev_init(); <em class="hl-comment">// bsp\artinchip\drv_bare\psram\xspi_psram.c</em>
|-&gt; hal_xspi_set_boudary(); <em class="hl-comment">// bsp\artinchip\drv_bare\psram\xspi_psram.c</em>
|-&gt; aic_xspi_psram_xip(); <em class="hl-comment">// bsp\artinchip\drv_bare\psram\xspi_psram.c</em>
|-&gt; hal_xspi_dll_training() <em class="hl-comment">// bsp\artinchip\drv_bare\psram\xspi_psram.c</em>
|-&gt; hal_xspi_set_parallel_mode(); <em class="hl-comment">// bsp\artinchip\drv_bare\psram\xspi_psram.c</em></pre></div>
2025-04-23 17:54:31 +08:00
</section>
<section class="- topic/section section" id="id__id5" data-ofbid="id__id5"><h2 class="- topic/title title sectiontitle">数据结构设计</h2>
2025-01-23 16:37:00 +08:00
<div class="- topic/div div section" id="id__driver">
<strong class="+ topic/ph hi-d/b ph b"> Driver 层主要数据接口</strong>
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_dqy_1j3_ddc" data-ofbid="id__codeblock_dqy_1j3_ddc"><strong class="hl-keyword">struct</strong> aic_xspi
{
<strong class="hl-keyword">char</strong> *name;
u32 idx;
u32 clk_id;
u32 clk_in_hz;
u32 dma_port_id;
u32 irq_num;
hal_xspi_handle handle;
bool inited;
};</pre><div class="- topic/note note tip note_tip" id="id__note_nrq_qn3_ddc" data-ofbid="id__note_nrq_qn3_ddc"><span class="note__title">提示:</span>
2025-07-22 11:15:46 +08:00
<p class="- topic/p p" data-ofbid="d89420e188__20250519091514"><code class="+ topic/ph pr-d/codeph ph codeph">name,idx,clk_id,clk_in_hz</code> 属性需要有相应的值, 其中
2025-01-23 16:37:00 +08:00
<code class="+ topic/ph pr-d/codeph ph codeph">clk_id</code> 使用 <code class="+ topic/ph pr-d/codeph ph codeph">aic_clk_id.h</code> 文件的宏定义,
<code class="+ topic/ph pr-d/codeph ph codeph">clk_in_hz</code> 从配置文件中获取</p>
</div>
</div>
<div class="- topic/div div section" id="id__hal">
<strong class="+ topic/ph hi-d/b ph b">HAL
层主要数据结构</strong><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_mn3_3k3_ddc" data-ofbid="id__codeblock_mn3_3k3_ddc"><strong class="hl-keyword">struct</strong> hal_xspi_config {
u32 idx;
u32 clk_in_hz;
u32 clk_id;
u32 cs0_port;
u32 cs1_port;
bool bit_mode;
bool wire3_en;
bool lsb_en;
bool cs_auto;
u8 cs_polarity;
u8 cpol;
u8 cpha;
};</pre><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_edm_3k3_ddc" data-ofbid="id__codeblock_edm_3k3_ddc"><strong class="hl-keyword">struct</strong> hal_xspi_transfer {
u8 *tx_data;
u8 *rx_data;
u32 data_len;
};</pre><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_prn_3k3_ddc" data-ofbid="id__codeblock_prn_3k3_ddc"><strong class="hl-keyword">struct</strong> hal_xspi_proto_cfg {
u8 mode;
u8 clk_mode;
u8 parallel_mode;
u8 wr_cmd_clk_mode;
u8 wr_cmd_lines;
u8 wr_cmd_val;
u8 rd_cmd_clk_mode;
u8 rd_cmd_lines;
u8 rd_cmd_val;
u8 addr_clk_mode;
u8 addr_lines;
u8 addr_width;
u8 wr_dummy;
u8 rd_dummy;
u8 wr_cnt_lines;
u32 wr_cnt;
u8 rd_cnt_lines;
u32 rd_cnt;
};</pre><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="id__codeblock_icm_jk3_ddc" data-ofbid="id__codeblock_icm_jk3_ddc"><strong class="hl-keyword">struct</strong> hal_xspi_state {
u32 idx;
hal_xspi_async_cb cb;
<strong class="hl-keyword">void</strong> *cb_priv;
u32 status;
u32 clk_id;
u32 bus_hz;
u32 bus_width;
<strong class="hl-keyword">struct</strong> hal_xspi_dma_config dma_cfg;
<strong class="hl-keyword">void</strong> *dma_tx;
<strong class="hl-keyword">void</strong> *dma_rx;
u8 *async_tx; <em class="hl-comment">/* Used in Async Non-DMA mode */</em>
u8 *async_rx; <em class="hl-comment">/* Used in Async Non-DMA mode */</em>
u32 async_tx_remain; <em class="hl-comment">/* Used in Async Non-DMA mode */</em>
u32 async_rx_remain; <em class="hl-comment">/* Used in Async Non-DMA mode */</em>
u32 work_mode;
u32 done_mask;
};</pre></div>
2025-04-23 17:54:31 +08:00
</section>
<section class="- topic/section section" id="id__id6" data-ofbid="id__id6"><h2 class="- topic/title title sectiontitle">接口设计</h2>
2025-01-23 16:37:00 +08:00
<div class="- topic/div div section" id="id__id7">
<strong class="+ topic/ph hi-d/b ph b">Driver 接口设计</strong>
2025-04-23 17:54:31 +08:00
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_n3c_qyh_bdc" data-ofbid="id__table_n3c_qyh_bdc" data-cols="2"><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"> 2</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_get_xspi_by_index</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e244__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e248__20250519091514">static struct aic_xspi *aic_get_xspi_by_index(u32
2025-04-23 17:54:31 +08:00
idx)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e255__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e259__20250519091514">获取具体 XSPI 控制设备</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"><p class="- topic/p p" data-ofbid="d89420e266__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e270__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">u32 idx</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器编号XSPI 当前只有 0 可选择。</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e289__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e293__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">NULL: 失败</div>
<div class="- topic/div div">aic_xspi 实例: 成功</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e309__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e313__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_o3c_qyh_bdc" data-ofbid="id__table_o3c_qyh_bdc" data-cols="2"><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"> 3</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_xspi_psram_dev_reset</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e335__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e339__20250519091514">static u32 aic_xspi_psram_dev_reset(hal_xspi_handle
2025-04-23 17:54:31 +08:00
*handle)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e346__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e350__20250519091514">reset PSRAM 模块,当前只支持 APS3208K</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"><p class="- topic/p p" data-ofbid="d89420e357__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e361__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *handle</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器句柄, 经过 hal_xspi_init 初始化后可得到。</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e380__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e384__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0 操作完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e397__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e401__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_p3c_qyh_bdc" data-ofbid="id__table_p3c_qyh_bdc" data-cols="2"><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"> 4</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_xspi_psram_dev_init</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e423__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e427__20250519091514">static u32 aic_xspi_psram_dev_init(hal_xspi_handle
2025-04-23 17:54:31 +08:00
*handle)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e434__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e438__20250519091514">初始化 PSRAM 设备</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"><p class="- topic/p p" data-ofbid="d89420e445__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e449__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *handle</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器句柄, 经过 hal_xspi_init 初始化后可得到。</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e468__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e472__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0 操作完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e485__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e489__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_q3c_qyh_bdc" data-ofbid="id__table_q3c_qyh_bdc" data-cols="2"><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"> 5</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_xspi_psram_read_id</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e511__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e515__20250519091514">static u32 aic_xspi_psram_read_id(hal_xspi_handle
2025-04-23 17:54:31 +08:00
*handle)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e522__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e526__20250519091514">读取 PSRAM 的 ID</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"><p class="- topic/p p" data-ofbid="d89420e533__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e537__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *handle</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器句柄, 经过 hal_xspi_init 初始化后可得到。</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e556__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e560__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0 操作完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e573__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e577__20250519091514">该接口只是读取一遍,没有实际作用,仅作为调试使用</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_r3c_qyh_bdc" data-ofbid="id__table_r3c_qyh_bdc" data-cols="2"><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"> 6</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_xspi_psram_xip</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e599__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e603__20250519091514">static u32 aic_xspi_psram_xip(hal_xspi_handle *handle,
2025-04-23 17:54:31 +08:00
hal_xspi_proto_cfg_t proto)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e610__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e614__20250519091514">读取 PSRAM 的 ID</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"><p class="- topic/p p" data-ofbid="d89420e621__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e625__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *handle</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器句柄, 经过 hal_xspi_init 初始化后可得到。</div>
</div>
<div class="- topic/div div">hal_xspi_proto_cfg_t proto</div>
<div class="- topic/div div">
<div class="- topic/div div"> 关于 XIP 的相关配置</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e653__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e657__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0 操作完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e670__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e674__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_s3c_qyh_bdc" data-ofbid="id__table_s3c_qyh_bdc" data-cols="2"><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"> 7</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_xspi_psram_icp_calc</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e696__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e700__20250519091514">u32 aic_xspi_psram_icp_calc(u32 clk_in_hz)</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"><p class="- topic/p p" data-ofbid="d89420e707__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e711__20250519091514">根据配置的 clock获取 ICP 时钟等级</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"><p class="- topic/p p" data-ofbid="d89420e718__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e722__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">u32 clk_in_hz</div>
<div class="- topic/div div">
<div class="- topic/div div"> 配置给 XSPI 的时钟值</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e741__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e745__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: AIC_XSPI_ICP_50_100M</div>
<div class="- topic/div div">1AIC_XSPI_ICP_100_150M</div>
<div class="- topic/div div">2: AIC_XSPI_ICP_150_200M</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e764__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e768__20250519091514">返回结果一般作为 aic_xspi_psram_training 接口的 reg_icp 参数。</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_t3c_qyh_bdc" data-ofbid="id__table_t3c_qyh_bdc" data-cols="2"><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"> 8</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_xspi_psram_mem_test</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e790__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e794__20250519091514">static u8 aic_xspi_psram_mem_test(long address, u32
2025-04-23 17:54:31 +08:00
size)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e801__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e805__20250519091514">PSRAM 的 training 使用的 memtest</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"><p class="- topic/p p" data-ofbid="d89420e812__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e816__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">long address</div>
<div class="- topic/div div">
<div class="- topic/div div">training buffer 的起始地址</div>
</div>
<div class="- topic/div div">u32 size</div>
<div class="- topic/div div">
<div class="- topic/div div">training buffer 的空间大小</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e844__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e848__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功完成</div>
<div class="- topic/div div">1失败</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e864__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e868__20250519091514">需要判断是否成功</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_u3c_qyh_bdc" data-ofbid="id__table_u3c_qyh_bdc" data-cols="2"><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"> 9</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_xspi_psram_training</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e890__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e894__20250519091514">u32 aic_xspi_psram_training(hal_xspi_handle *h, u8 sel, u8
2025-04-23 17:54:31 +08:00
reg_icp, void *psram_buf, u32 len)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e901__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e905__20250519091514">PSRAM 的 training</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"><p class="- topic/p p" data-ofbid="d89420e912__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e916__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 sel</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 的 CS 选择0 1</div>
</div>
<div class="- topic/div div">u8 reg_icp</div>
<div class="- topic/div div">
<div class="- topic/div div"> XSPI 的时钟范围选择ICP__50_100M = 0x0, ICP_100_150M =
0x1,</div>
<div class="- topic/div div">
<div class="- topic/div div">ICP_150_200M = 0x2, ICP_200_266M = 0x3.</div>
</div>
</div>
<div class="- topic/div div">void *psram_buf</div>
<div class="- topic/div div">
<div class="- topic/div div"> psram 的 training 地址,取 psram 的地址空间</div>
</div>
<div class="- topic/div div">u32 len</div>
<div class="- topic/div div">
<div class="- topic/div div"> 地址空间大小,建议 256KB 以上</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e978__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e982__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 传输成功完成</div>
<div class="- topic/div div">1传输失败</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e998__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1002__20250519091514">需要判断是否 traning 成功</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_v3c_qyh_bdc" data-ofbid="id__table_v3c_qyh_bdc" data-cols="2"><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"> 10</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">aic_xspi_psram_init</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1025__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1029__20250519091514">u32 aic_xspi_psram_init(void)</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"><p class="- topic/p p" data-ofbid="d89420e1036__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1040__20250519091514">读取 PSRAM 的 ID</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"><p class="- topic/p p" data-ofbid="d89420e1047__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1051__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div"></div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1064__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1068__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0 操作完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1081__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1085__20250519091514">training 失败时,会打印 trainning failed 并停止系统启动。</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div></div>
2025-01-23 16:37:00 +08:00
<div class="- topic/div div section" id="id__id8">
<strong class="+ topic/ph hi-d/b ph b">HAL 接口设计</strong>
2025-04-23 17:54:31 +08:00
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_w3c_qyh_bdc" data-ofbid="id__table_w3c_qyh_bdc" data-cols="2"><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"> 11</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_init</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1113__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1117__20250519091514">int hal_xspi_init(hal_xspi_handle *h, struct hal_xspi_config
2025-04-23 17:54:31 +08:00
*cfg)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1124__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1128__20250519091514">XSPI 控制器的初始化函数</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"><p class="- topic/p p" data-ofbid="d89420e1135__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1139__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">struct hal_xspi_config *cfg</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器的初始化配置参数</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1167__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1171__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1187__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1191__20250519091514">初始化时Handle 的空间由使用者负责分配和释放</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_x3c_qyh_bdc" data-ofbid="id__table_x3c_qyh_bdc" data-cols="2"><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"> 12</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_cmd_width</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1214__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1218__20250519091514">int hal_xspi_set_cmd_width(hal_xspi_handle *h, u8
2025-04-23 17:54:31 +08:00
ddr_sdr_mode, u8 lines)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1225__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1229__20250519091514">设置 CMD 传输所使用的模式和总线位宽</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"><p class="- topic/p p" data-ofbid="d89420e1236__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1240__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 ddr_sdr_mode</div>
<div class="- topic/div div">
<div class="- topic/div div"> cmd 数据设置 ddrsdr 模式</div>
</div>
<div class="- topic/div div">u8 lines</div>
<div class="- topic/div div">
<div class="- topic/div div"> cmd 数据设置 1/2/4/8 线传输</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1278__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1282__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1298__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1302__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_y3c_qyh_bdc" data-ofbid="id__table_y3c_qyh_bdc" data-cols="2"><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"> 13</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_cmd</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1325__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1329__20250519091514">int hal_xspi_set_cmd(hal_xspi_handle *h, u8 ddr_sdr_mode, u8
2025-04-23 17:54:31 +08:00
cmd)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1336__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1340__20250519091514">设置 CMD 的模式和 opcode</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"><p class="- topic/p p" data-ofbid="d89420e1347__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1351__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 ddr_sdr_mode</div>
<div class="- topic/div div">
<div class="- topic/div div"> cmd 数据设置 ddrsdr 模式</div>
</div>
<div class="- topic/div div">u8 cmd</div>
<div class="- topic/div div">
<div class="- topic/div div">设置 CMD 的 opcode</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1389__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1393__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1409__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1413__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_z3c_qyh_bdc" data-ofbid="id__table_z3c_qyh_bdc" data-cols="2"><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"> 14</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_addr_width</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1436__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1440__20250519091514">int hal_xspi_set_addr_width(hal_xspi_handle *h, u8
2025-04-23 17:54:31 +08:00
ddr_sdr_mode, u8 lines, u8 bw_3_4_bytes)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1447__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1451__20250519091514">设置 addr 的模式,传输线数,地址宽度</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"><p class="- topic/p p" data-ofbid="d89420e1458__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1462__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 ddr_sdr_mode</div>
<div class="- topic/div div">
<div class="- topic/div div"> ADDR 数据设置 ddrsdr 模式, 0x0 是 sdr 0x01 是 ddr</div>
</div>
<div class="- topic/div div">u8 lines</div>
<div class="- topic/div div">
<div class="- topic/div div"> ADDR 数据设置 1/2/4/8 线传输, 可取值 0 1 2 3</div>
</div>
<div class="- topic/div div">u8 bw_3_4_bytes</div>
<div class="- topic/div div">
<div class="- topic/div div"> ADDR 数据的宽度,可取值 3、4</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1509__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1513__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1529__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1533__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_ajc_qyh_bdc" data-ofbid="id__table_ajc_qyh_bdc" data-cols="2"><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"> 15</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_addr</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1555__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1559__20250519091514">int hal_xspi_set_addr(hal_xspi_handle *h, u8 addr)</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"><p class="- topic/p p" data-ofbid="d89420e1566__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1570__20250519091514">设置 addr 的 opcode</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"><p class="- topic/p p" data-ofbid="d89420e1577__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1581__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 addr</div>
<div class="- topic/div div">
<div class="- topic/div div">addr 的 opcode</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1609__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1613__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1629__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1633__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_bjc_qyh_bdc" data-ofbid="id__table_bjc_qyh_bdc" data-cols="2"><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"> 16</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_dummy</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1657__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1661__20250519091514">int hal_xspi_set_dummy(hal_xspi_handle *h, u8 lines, u8
2025-04-23 17:54:31 +08:00
dummy)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1668__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1672__20250519091514">配置 read dummy</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"><p class="- topic/p p" data-ofbid="d89420e1679__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1683__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 lines</div>
<div class="- topic/div div">
<div class="- topic/div div"> 设置 1/2/4/8 线传输, 可取值 0 1 2 3可固定任意值</div>
</div>
<div class="- topic/div div">u8 dummy</div>
<div class="- topic/div div">
<div class="- topic/div div">dummy 个数</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1721__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1725__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1741__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1745__20250519091514">line 可以设置任意值dummy 不受传输线限制</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_cjc_qyh_bdc" data-ofbid="id__table_cjc_qyh_bdc" data-cols="2"><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"> 17</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_write_cnt</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1767__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1771__20250519091514">int hal_xspi_set_write_cnt(hal_xspi_handle *h, u8
2025-04-23 17:54:31 +08:00
ddr_sdr_mode, u8 lines, u32 count)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1778__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1782__20250519091514">配置写 data 的个数</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"><p class="- topic/p p" data-ofbid="d89420e1789__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1793__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 ddr_sdr_mode</div>
<div class="- topic/div div">
<div class="- topic/div div"> 写数据设置 ddrsdr 模式, 0x0 是 sdr 0x01 是 ddr</div>
</div>
<div class="- topic/div div">u8 lines</div>
<div class="- topic/div div">
<div class="- topic/div div"> 设置 1/2/4/8 线传输, 可取值 0 1 2 3</div>
</div>
<div class="- topic/div div">u32 count</div>
<div class="- topic/div div">
<div class="- topic/div div"> 设置写入 data 的个数bytes 为单位</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1840__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1844__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1860__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1864__20250519091514">u8 lines 需要根据实际配置,传入的 lines 和 count 硬件会控制输出的 cycle</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_djc_qyh_bdc" data-ofbid="id__table_djc_qyh_bdc" data-cols="2"><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"> 18</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_read_cnt</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e1887__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1891__20250519091514">int hal_xspi_set_read_cnt(hal_xspi_handle *h, u8
2025-04-23 17:54:31 +08:00
ddr_sdr_mode, u8 lines, u32 count)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1898__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1902__20250519091514">配置读 data 的个数</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"><p class="- topic/p p" data-ofbid="d89420e1909__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1913__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 ddr_sdr_mode</div>
<div class="- topic/div div">
<div class="- topic/div div"> 读数据设置 ddrsdr 模式, 0x0 是 sdr 0x01 是 ddr</div>
</div>
<div class="- topic/div div">u8 lines</div>
<div class="- topic/div div">
<div class="- topic/div div"> 设置 1/2/4/8 线传输, 可取值 0 1 2 3</div>
</div>
<div class="- topic/div div">u32 count</div>
<div class="- topic/div div">
<div class="- topic/div div"> 设置读入 data 的个数bytes 为单位</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1960__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e1964__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e1980__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e1984__20250519091514">u8 lines 需要根据实际配置,传入的 lines 和 count 硬件会控制输出的 cycle</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_ejc_qyh_bdc" data-ofbid="id__table_ejc_qyh_bdc" data-cols="2"><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"> 19</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_start_transfer</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2007__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2011__20250519091514">int hal_xspi_start_transfer(hal_xspi_handle *h)</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"><p class="- topic/p p" data-ofbid="d89420e2018__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2022__20250519091514">开始传输使能</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"><p class="- topic/p p" data-ofbid="d89420e2029__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2033__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2052__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2056__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 成功</div>
2025-04-23 17:54:31 +08:00
<div class="- topic/div div">其它: 失败</div>
2025-01-23 16:37:00 +08:00
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2072__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2076__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_fjc_qyh_bdc" data-ofbid="id__table_fjc_qyh_bdc" data-cols="2"><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"> 20</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_transfer_cpu_sync</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2099__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2103__20250519091514">int hal_xspi_transfer_cpu_sync(hal_xspi_handle *h, struct
2025-04-23 17:54:31 +08:00
hal_xspi_transfer *t)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2110__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2114__20250519091514">数据传输配置,写入 fifo。</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"><p class="- topic/p p" data-ofbid="d89420e2121__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2125__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">struct hal_xspi_transfer *t</div>
<div class="- topic/div div">
<div class="- topic/div div">数据结构体</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2153__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2157__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 传输成功完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2170__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2174__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_gjc_qyh_bdc" data-ofbid="id__table_gjc_qyh_bdc" data-cols="2"><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"> 21</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_xip_cfg</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2197__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2201__20250519091514">int hal_xspi_xip_cfg(hal_xspi_handle *h, hal_xspi_proto_cfg_t
2025-04-23 17:54:31 +08:00
xip_proto_cfg)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2208__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2212__20250519091514">XSPI 的 XIP 配置,根据实际的 psram 设备协议写入 XIP 指令</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"><p class="- topic/p p" data-ofbid="d89420e2219__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2223__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">hal_xspi_proto_cfg_t xip_proto_cfg</div>
<div class="- topic/div div">
<div class="- topic/div div"> psram 设备协议 XIP 指令</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2251__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2255__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 设置完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2268__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2272__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_hjc_qyh_bdc" data-ofbid="id__table_hjc_qyh_bdc" data-cols="2"><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"> 22</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_xip_enable</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2296__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2300__20250519091514">int hal_xspi_xip_enable( hal_xspi_handle *h)</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"><p class="- topic/p p" data-ofbid="d89420e2307__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2311__20250519091514">XSPI 的 XIP 使能</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"><p class="- topic/p p" data-ofbid="d89420e2318__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2322__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2341__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2345__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 设置完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2358__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2362__20250519091514">在 hal_xspi_xip_cfg()后调用</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
<div class="table-container"><table class="- topic/table table frame-all" id="id__table_ijc_qyh_bdc" data-ofbid="id__table_ijc_qyh_bdc" data-cols="2"><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"> 23</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_cs</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2385__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2389__20250519091514">int hal_xspi_set_cs(hal_xspi_handle *h, u8 sel)</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"><p class="- topic/p p" data-ofbid="d89420e2396__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2400__20250519091514">数据传输配置,写入 fifo。</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"><p class="- topic/p p" data-ofbid="d89420e2407__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2411__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 sel</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 的 CS 选择0 1</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2439__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2443__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 设置完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2456__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2460__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_jjc_qyh_bdc" data-ofbid="id__table_jjc_qyh_bdc" data-cols="2"><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"> 24</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_boudary</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2482__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2486__20250519091514">int hal_xspi_set_boudary(hal_xspi_handle *h, u8 by)</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"><p class="- topic/p p" data-ofbid="d89420e2493__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2497__20250519091514">数据切割,根据具体 psram 配置</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"><p class="- topic/p p" data-ofbid="d89420e2504__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2508__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 by</div>
<div class="- topic/div div">
<div class="- topic/div div"> 数据长度切割,可选 xspi_2k = 0x0, xspi_1k = 0x1,</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2536__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2540__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 设置完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2553__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2557__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_kjc_qyh_bdc" data-ofbid="id__table_kjc_qyh_bdc" data-cols="2"><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"> 25</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_parallel_mode</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2579__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2583__20250519091514">int hal_xspi_set_parallel_mode(hal_xspi_handle *h, u8
2025-04-23 17:54:31 +08:00
mode)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2590__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2594__20250519091514">使用双/单片 PSRAM 配置。</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"><p class="- topic/p p" data-ofbid="d89420e2601__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2605__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 mode</div>
<div class="- topic/div div">
<div class="- topic/div div"> 单片或双片配置,可选 single_mode = 0x0, parellel_mode =
0x1</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2633__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2637__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 设置完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2650__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2654__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_ljc_qyh_bdc" data-ofbid="id__table_ljc_qyh_bdc" data-cols="2"><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"> 26</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_dll_ctl</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2676__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2680__20250519091514">int hal_xspi_set_dll_ctl(hal_xspi_handle *h, u8 sel, u8
2025-04-23 17:54:31 +08:00
reg_icp, u8 phase_sel)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2687__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2691__20250519091514"> 时钟采样相位和时钟频率等级配置,需要传入与时钟频率等级和相位值,一般在 training
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"><p class="- topic/p p" data-ofbid="d89420e2698__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2702__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 sel</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 的 CS 选择0 1</div>
</div>
<div class="- topic/div div">u8 reg_icp</div>
<div class="- topic/div div">
<div class="- topic/div div"> 时钟频率等级ICP_50_100MICP_100_150M
ICP_150_200M。</div>
</div>
<div class="- topic/div div">u8 phase_sel</div>
<div class="- topic/div div">
<div class="- topic/div div"> 相位等级配置0x00-0x0f</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2749__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2753__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 设置完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2766__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2770__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div><div class="table-container"><table class="- topic/table table frame-all" id="id__table_mjc_qyh_bdc" data-ofbid="id__table_mjc_qyh_bdc" data-cols="2"><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"> 27</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">hal_xspi_set_phase_sel</span></caption><colgroup><col style="width:16.666666666666664%"/><col style="width:83.33333333333334%"/></colgroup><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"><p class="- topic/p p" data-ofbid="d89420e2792__20250519091514"> 函数原型 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2796__20250519091514">int hal_xspi_set_phase_sel(hal_xspi_handle *h, u8 sel, u8
2025-04-23 17:54:31 +08:00
phase_sel)</p></td>
</tr>
<tr class="- topic/row">
2025-07-22 11:15:46 +08:00
<td class="- topic/entry entry colsep-1 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2803__20250519091514"> 功能说明 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2807__20250519091514">时钟采样相位配置,需要传入相位值,一般在 training 过程尝试不同相位时配置。</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"><p class="- topic/p p" data-ofbid="d89420e2814__20250519091514"> 参数定义 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2818__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">hal_xspi_handle *h</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 控制器 Handle</div>
</div>
<div class="- topic/div div">u8 sel</div>
<div class="- topic/div div">
<div class="- topic/div div">XSPI 的 CS 选择0 1</div>
</div>
<div class="- topic/div div">u8 phase_sel</div>
<div class="- topic/div div">
<div class="- topic/div div"> 相位等级配置0x00-0x0f</div>
</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2856__20250519091514"> 返回值 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-1"><p class="- topic/p p" data-ofbid="d89420e2860__20250519091514">
2025-01-23 16:37:00 +08:00
<div class="- topic/div div">
<div class="- topic/div div">0: 设置完成</div>
</div>
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"><p class="- topic/p p" data-ofbid="d89420e2873__20250519091514"> 注意事项 </p></td>
<td class="- topic/entry entry colsep-0 rowsep-0"><p class="- topic/p p" data-ofbid="d89420e2877__20250519091514">-</p></td>
2025-04-23 17:54:31 +08:00
</tr>
</tbody></table></div>
2025-01-23 16:37:00 +08:00
</div>
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__id2" data-tocid="id__id2">源码说明</a></div></li><li class="section-item"><div class="section-title"><a href="#id__id3" data-tocid="id__id3">模块架构</a></div></li><li class="section-item"><div class="section-title"><a href="#id__hal-drv" data-tocid="id__hal-drv">HAL 与 DRV</a></div></li><li class="section-item"><div class="section-title"><a href="#id__id4" data-tocid="id__id4">关键流程设计</a></div></li><li class="section-item"><div class="section-title"><a href="#id__id5" data-tocid="id__id5">数据结构设计</a></div></li><li class="section-item"><div class="section-title"><a href="#id__id6" data-tocid="id__id6">接口设计</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>