[docs] update pwm and get_start rst
This commit is contained in:
parent
3235d20a7a
commit
1e5f80ab19
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 5e2136c8889edd21ef4392d0839f5aa1
|
||||
config: c1a44f4f683944084f04b029ea7630d0
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 16 KiB |
@ -250,17 +250,29 @@ PWM设备 ``event`` 类型如下
|
||||
- dev 需要关闭的pwm通道句柄
|
||||
|
||||
|
||||
**pwm_channel_update**
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**pwm_channel_freq_update**
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``pwm_channel_update`` 用于更新PWM通道的频率和占空比。实际是调用 ``device_control`` ,其中 ``cmd`` 为 ``DEVICE_CTRL_CONFIG``。
|
||||
``pwm_channel_freq_update`` 用于更新PWM通道的频率。实际是调用 ``device_control`` ,其中 ``cmd`` 为 ``DEIVCE_CTRL_PWM_FREQUENCE_CONFIG``。
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
pwm_channel_update(dev,cfg)
|
||||
pwm_channel_freq_update(dev,count)
|
||||
|
||||
- dev 需要更新的pwm通道句柄
|
||||
- cfg pwm_config_t句柄
|
||||
- count 周期值 ,实际频率=pwm_clk/pwm_div/count
|
||||
|
||||
**pwm_channel_dutycycle_update**
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``pwm_channel_dutycycle_update`` 用于更新PWM通道的频率。实际是调用 ``device_control`` ,其中 ``cmd`` 为 ``DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG``。
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
pwm_channel_dutycycle_update(dev,cfg)
|
||||
|
||||
- dev 需要更新周期计数值的pwm通道句柄
|
||||
- cfg pwm_dutycycle_config_t句柄
|
||||
|
||||
|
||||
**pwm_it_pulse_count_update**
|
||||
|
@ -70,7 +70,7 @@ Sipeed RV-Debugger Plus 调试器在 Windows 系统中所以时我们需要将
|
||||
|
||||
.. figure:: img/sipeed_rv_debugger_7.png
|
||||
|
||||
.. important:: 3. 若在设备管理器中没有串口,显示其他设备,请到 `FTDI 官网 <https://ftdichip.com/drivers/vcp-drivers/>`_ 下载与系统匹配的驱动
|
||||
.. important:: 3. 若在设备管理器中没有显示串口,只显示其他设备,或者只在通用串行总线控制器中看到 ``USB Serial Converter A`` 和 ``USB Serial Converter B``,请到 `FTDI 官网 <https://ftdichip.com/drivers/vcp-drivers/>`_ 下载与系统匹配的驱动
|
||||
|
||||
.. figure:: img/sipeed_rv_debugger_6.png
|
||||
|
||||
@ -96,7 +96,7 @@ Sipeed RV-Debugger Plus 调试器在 Windows 系统中所以时我们需要将
|
||||
**Linux**
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- 首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,执行以下命令,查看是否存在
|
||||
- 首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,打开 Terminal,在终端中输入 lsusb 命令,即可看到如下信息的设备
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -104,16 +104,14 @@ Sipeed RV-Debugger Plus 调试器在 Windows 系统中所以时我们需要将
|
||||
|
||||
.. figure:: img/sipeed_rv_debugger_8.png
|
||||
|
||||
- 安装 Openocd 及其需要的依赖项
|
||||
- 如果上述图中不显示 FT2232C 字样,需要安装 ftdi 驱动
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ apt install openocd libusb-dev libftdi-dev libhidapi-dev
|
||||
$ sudo apt install libusb-dev libftdi-dev libhidapi-dev
|
||||
|
||||
- 重新插拔调试器使修改生效
|
||||
- 打开 Terminal,在终端中输入 lsusb 命令,即可看到如下信息的设备
|
||||
|
||||
.. code-block::bash
|
||||
|
||||
$ Bus 001 Device 003: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
|
||||
- 调试代码需要安装 openocd,使用 openocd 0.11 版本
|
||||
|
||||
.. note:: 在 linux 中,串口是使用 /dev/ttyUSB1,调试口使用 /dev/ttyUSB0,如果显示 /dev/ttyACM0 则表示进入 boot 模式
|
||||
|
@ -66,7 +66,7 @@ PWM - 驱动步进电机
|
||||
.. code-block:: C
|
||||
:linenos:
|
||||
|
||||
#define BSP_PWM_CLOCK_SOURCE ROOT_CLOCK_SOURCE_RC_32K
|
||||
#define BSP_PWM_CLOCK_SOURCE ROOT_CLOCK_SOURCE_32K_CLK
|
||||
#define BSP_PWM_CLOCK_DIV 32
|
||||
|
||||
- 配置 ``PWM`` 设备时钟源,见 ``bsp/board/bl706_iot/clock_config.h``
|
||||
|
@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '0.2',
|
||||
VERSION: '0.3',
|
||||
LANGUAGE: 'zh_CN',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>1. API 概述 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>1. API 概述 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>6. BLE — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>6. BLE — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2. Board 配置系统 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>2. Board 配置系统 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.9. ADC 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.9. ADC 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.1. 时钟树 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.1. 时钟树 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.10. DAC 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.10. DAC 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.5. DMA 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.5. DMA 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.2. GPIO 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.2. GPIO 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.6. I2C 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.6. I2C 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.7. I2S 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.7. I2S 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.4. PWM 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.4. PWM 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
@ -117,8 +117,9 @@
|
||||
<li class="toctree-l4"><a class="reference internal" href="#device-set-callback">3.4.4.5. <strong>device_set_callback</strong></a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#pwm-channel-start">3.4.4.6. <strong>pwm_channel_start</strong></a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#pwm-channel-stop">3.4.4.7. <strong>pwm_channel_stop</strong></a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#pwm-channel-update">3.4.4.8. <strong>pwm_channel_update</strong></a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#pwm-it-pulse-count-update">3.4.4.9. <strong>pwm_it_pulse_count_update</strong></a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#pwm-channel-freq-update">3.4.4.8. <strong>pwm_channel_freq_update</strong></a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#pwm-channel-dutycycle-update">3.4.4.9. <strong>pwm_channel_dutycycle_update</strong></a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#pwm-it-pulse-count-update">3.4.4.10. <strong>pwm_it_pulse_count_update</strong></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -489,19 +490,30 @@
|
||||
<li><p>dev 需要关闭的pwm通道句柄</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="pwm-channel-update">
|
||||
<h3><span class="section-number">3.4.4.8. </span><strong>pwm_channel_update</strong><a class="headerlink" href="#pwm-channel-update" title="永久链接至标题">¶</a></h3>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">pwm_channel_update</span></code> 用于更新PWM通道的频率和占空比。实际是调用 <code class="docutils literal notranslate"><span class="pre">device_control</span></code> ,其中 <code class="docutils literal notranslate"><span class="pre">cmd</span></code> 为 <code class="docutils literal notranslate"><span class="pre">DEVICE_CTRL_CONFIG</span></code>。</p>
|
||||
<div class="highlight-C notranslate"><div class="highlight"><pre><span></span><span class="n">pwm_channel_update</span><span class="p">(</span><span class="n">dev</span><span class="p">,</span><span class="n">cfg</span><span class="p">)</span>
|
||||
<div class="section" id="pwm-channel-freq-update">
|
||||
<h3><span class="section-number">3.4.4.8. </span><strong>pwm_channel_freq_update</strong><a class="headerlink" href="#pwm-channel-freq-update" title="永久链接至标题">¶</a></h3>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">pwm_channel_freq_update</span></code> 用于更新PWM通道的频率。实际是调用 <code class="docutils literal notranslate"><span class="pre">device_control</span></code> ,其中 <code class="docutils literal notranslate"><span class="pre">cmd</span></code> 为 <code class="docutils literal notranslate"><span class="pre">DEIVCE_CTRL_PWM_FREQUENCE_CONFIG</span></code>。</p>
|
||||
<div class="highlight-C notranslate"><div class="highlight"><pre><span></span><span class="n">pwm_channel_freq_update</span><span class="p">(</span><span class="n">dev</span><span class="p">,</span><span class="n">count</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>dev 需要更新的pwm通道句柄</p></li>
|
||||
<li><p>cfg pwm_config_t句柄</p></li>
|
||||
<li><p>count 周期值 ,实际频率=pwm_clk/pwm_div/count</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="pwm-channel-dutycycle-update">
|
||||
<h3><span class="section-number">3.4.4.9. </span><strong>pwm_channel_dutycycle_update</strong><a class="headerlink" href="#pwm-channel-dutycycle-update" title="永久链接至标题">¶</a></h3>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">pwm_channel_dutycycle_update</span></code> 用于更新PWM通道的频率。实际是调用 <code class="docutils literal notranslate"><span class="pre">device_control</span></code> ,其中 <code class="docutils literal notranslate"><span class="pre">cmd</span></code> 为 <code class="docutils literal notranslate"><span class="pre">DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG</span></code>。</p>
|
||||
<div class="highlight-C notranslate"><div class="highlight"><pre><span></span><span class="n">pwm_channel_dutycycle_update</span><span class="p">(</span><span class="n">dev</span><span class="p">,</span><span class="n">cfg</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>dev 需要更新周期计数值的pwm通道句柄</p></li>
|
||||
<li><p>cfg pwm_dutycycle_config_t句柄</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="pwm-it-pulse-count-update">
|
||||
<h3><span class="section-number">3.4.4.9. </span><strong>pwm_it_pulse_count_update</strong><a class="headerlink" href="#pwm-it-pulse-count-update" title="永久链接至标题">¶</a></h3>
|
||||
<h3><span class="section-number">3.4.4.10. </span><strong>pwm_it_pulse_count_update</strong><a class="headerlink" href="#pwm-it-pulse-count-update" title="永久链接至标题">¶</a></h3>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">pwm_it_pulse_count_update</span></code> 用于更新PWM通道的计数值,需要先使能PWM中断才起作用,当pwm计数达到设置的周期计数值则会产生中断。实际是调用 <code class="docutils literal notranslate"><span class="pre">device_control</span></code> ,其中 <code class="docutils literal notranslate"><span class="pre">cmd</span></code> 为 <code class="docutils literal notranslate"><span class="pre">DEIVCE_CTRL_PWM_IT_PULSE_COUNT_CONFIG</span></code>。</p>
|
||||
<div class="highlight-C notranslate"><div class="highlight"><pre><span></span><span class="n">pwm_it_pulse_count_update</span><span class="p">(</span><span class="n">dev</span><span class="p">,</span><span class="n">count</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.8. SPI 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.8. SPI 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.11. TIMER 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.11. TIMER 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.3. UART 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.3. UART 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.12. USB 设备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.12. USB 设备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3. Peripheral — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3. Peripheral — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>4. Shell — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>4. Shell — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>5. USB Stack — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>5. USB Stack — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>索引 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>索引 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2.3. Linux OR WSL 环境开发指南 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>2.3. Linux OR WSL 环境开发指南 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2.1. Windows 下使用 CDK (类 MDK Keil)开发指南 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>2.1. Windows 下使用 CDK (类 MDK Keil)开发指南 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2.2. Windows 下使用 Eclipse 开发指南 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>2.2. Windows 下使用 Eclipse 开发指南 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3. BLDevCube 烧录工具指南 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3. BLDevCube 烧录工具指南 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>使用 CDK + CK-Link 编译调试 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>使用 CDK + CK-Link 编译调试 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>使用 CDK + Sipeed RV-Debugger Plus 编译调试 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>使用 CDK + Sipeed RV-Debugger Plus 编译调试 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>4. 基于 cmake 框架新建工程指南 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>4. 基于 cmake 框架新建工程指南 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>5. 硬件连接指南 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>5. 硬件连接指南 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>1. 开发前的准备 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>1. 开发前的准备 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
@ -287,7 +287,7 @@
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">重要</p>
|
||||
<ol class="arabic simple" start="3">
|
||||
<li><p>若在设备管理器中没有串口,显示其他设备,请到 <a class="reference external" href="https://ftdichip.com/drivers/vcp-drivers/">FTDI 官网</a> 下载与系统匹配的驱动</p></li>
|
||||
<li><p>若在设备管理器中没有显示串口,只显示其他设备,或者只在通用串行总线控制器中看到 <code class="docutils literal notranslate"><span class="pre">USB</span> <span class="pre">Serial</span> <span class="pre">Converter</span> <span class="pre">A</span></code> 和 <code class="docutils literal notranslate"><span class="pre">USB</span> <span class="pre">Serial</span> <span class="pre">Converter</span> <span class="pre">B</span></code>,请到 <a class="reference external" href="https://ftdichip.com/drivers/vcp-drivers/">FTDI 官网</a> 下载与系统匹配的驱动</p></li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="figure align-default">
|
||||
@ -338,7 +338,7 @@
|
||||
<div class="section" id="id6">
|
||||
<h3><span class="section-number">1.3.2. </span><strong>Linux</strong><a class="headerlink" href="#id6" title="永久链接至标题">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><p>首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,执行以下命令,查看是否存在</p></li>
|
||||
<li><p>首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,打开 Terminal,在终端中输入 lsusb 命令,即可看到如下信息的设备</p></li>
|
||||
</ul>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ lsusb
|
||||
</pre></div>
|
||||
@ -347,15 +347,19 @@
|
||||
<img alt="../_images/sipeed_rv_debugger_8.png" src="../_images/sipeed_rv_debugger_8.png" />
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>安装 Openocd 及其需要的依赖项</p></li>
|
||||
<li><p>如果上述图中不显示 FT2232C 字样,需要安装 ftdi 驱动</p></li>
|
||||
</ul>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ apt install openocd libusb-dev libftdi-dev libhidapi-dev
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo apt install libusb-dev libftdi-dev libhidapi-dev
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>重新插拔调试器使修改生效</p></li>
|
||||
<li><p>打开 Terminal,在终端中输入 lsusb 命令,即可看到如下信息的设备</p></li>
|
||||
<li><p>调试代码需要安装 openocd,使用 openocd 0.11 版本</p></li>
|
||||
</ul>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>在 linux 中,串口是使用 /dev/ttyUSB1,调试口使用 /dev/ttyUSB0,如果显示 /dev/ttyACM0 则表示进入 boot 模式</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2. 开发环境搭建指南 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>2. 开发环境搭建指南 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>BL MCU SDK 开发指南 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>BL MCU SDK 开发指南 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>6. BLE 客户端和服务端互连 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>6. BLE 客户端和服务端互连 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>5. BOOT2 IAP — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>5. BOOT2 IAP — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2. Fatfs 文件系统读写 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>2. Fatfs 文件系统读写 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>4. LowPower 低功耗评估 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>4. LowPower 低功耗评估 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>1. Shell 命令行调试 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>1. Shell 命令行调试 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3. USB Device 应用 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3. USB Device 应用 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.5. AUDIO - 麦克风 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.5. AUDIO - 麦克风 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.1. CDC - 虚拟串口 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.1. CDC - 虚拟串口 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.3. HID - 键盘&鼠标 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.3. HID - 键盘&鼠标 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.2. MSC - U 盘 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.2. MSC - U 盘 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.4. VIDEO - 摄像头 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.4. VIDEO - 摄像头 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>8.1. ADC - 按键检测电压 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>8.1. ADC - 按键检测电压 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>8. ADC 示例 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>8. ADC 示例 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>5.1. DMA - RAM间数据搬运 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>5.1. DMA - RAM间数据搬运 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>5. DMA 示例 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>5. DMA 示例 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>1.1. GPIO 输出 - 流水灯 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>1.1. GPIO 输出 - 流水灯 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>1.2. GPIO 中断 - 按键检测 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>1.2. GPIO 中断 - 按键检测 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>1. GPIO 示例 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>1. GPIO 示例 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>7.1. I2C - AT24CXX 读写 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>7.1. I2C - AT24CXX 读写 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>7. I2C 示例 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>7. I2C 示例 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>4. MTIMER 示例 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>4. MTIMER 示例 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>4.1. MTIMER - 系统定时器 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>4.1. MTIMER - 系统定时器 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3. PWM 示例 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3. PWM 示例 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.1. PWM - 呼吸灯 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.1. PWM - 呼吸灯 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>3.2. PWM - 驱动步进电机 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>3.2. PWM - 驱动步进电机 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
@ -262,7 +262,7 @@
|
||||
<li><p>软件代码见 <code class="docutils literal notranslate"><span class="pre">examples/pwm/pwm_step_motor</span></code></p></li>
|
||||
</ul>
|
||||
<div class="highlight-C notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">#define BSP_PWM_CLOCK_SOURCE ROOT_CLOCK_SOURCE_RC_32K</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">#define BSP_PWM_CLOCK_SOURCE ROOT_CLOCK_SOURCE_32K_CLK</span>
|
||||
<span class="cp">#define BSP_PWM_CLOCK_DIV 32</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>6. SPI 示例 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>6. SPI 示例 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>6.1. SPI - TFT LCD 显示 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>6.1. SPI - TFT LCD 显示 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2. UART 示例 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>2. UART 示例 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2.1. UART - 数据自收发 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>2.1. UART - 数据自收发 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>搜索 — BL_MCU_SDK 开发指南 0.2 文档</title>
|
||||
<title>搜索 — BL_MCU_SDK 开发指南 0.3 文档</title>
|
||||
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
0.2
|
||||
0.3
|
||||
</div>
|
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -250,17 +250,29 @@ PWM设备 ``event`` 类型如下
|
||||
- dev 需要关闭的pwm通道句柄
|
||||
|
||||
|
||||
**pwm_channel_update**
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**pwm_channel_freq_update**
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``pwm_channel_update`` 用于更新PWM通道的频率和占空比。实际是调用 ``device_control`` ,其中 ``cmd`` 为 ``DEVICE_CTRL_CONFIG``。
|
||||
``pwm_channel_freq_update`` 用于更新PWM通道的频率。实际是调用 ``device_control`` ,其中 ``cmd`` 为 ``DEIVCE_CTRL_PWM_FREQUENCE_CONFIG``。
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
pwm_channel_update(dev,cfg)
|
||||
pwm_channel_freq_update(dev,count)
|
||||
|
||||
- dev 需要更新的pwm通道句柄
|
||||
- cfg pwm_config_t句柄
|
||||
- count 周期值 ,实际频率=pwm_clk/pwm_div/count
|
||||
|
||||
**pwm_channel_dutycycle_update**
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``pwm_channel_dutycycle_update`` 用于更新PWM通道的频率。实际是调用 ``device_control`` ,其中 ``cmd`` 为 ``DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG``。
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
pwm_channel_dutycycle_update(dev,cfg)
|
||||
|
||||
- dev 需要更新周期计数值的pwm通道句柄
|
||||
- cfg pwm_dutycycle_config_t句柄
|
||||
|
||||
|
||||
**pwm_it_pulse_count_update**
|
||||
|
@ -21,10 +21,10 @@ project = 'BL_MCU_SDK 开发指南'
|
||||
copyright = '2021, BouffaloLab Co., Ltd'
|
||||
author = 'BouffaloLab MCU Team'
|
||||
|
||||
version = '0.2'
|
||||
version = '0.3'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '0.2'
|
||||
release = '0.3'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
@ -70,7 +70,7 @@ Sipeed RV-Debugger Plus 调试器在 Windows 系统中所以时我们需要将
|
||||
|
||||
.. figure:: img/sipeed_rv_debugger_7.png
|
||||
|
||||
.. important:: 3. 若在设备管理器中没有串口,显示其他设备,请到 `FTDI 官网 <https://ftdichip.com/drivers/vcp-drivers/>`_ 下载与系统匹配的驱动
|
||||
.. important:: 3. 若在设备管理器中没有显示串口,只显示其他设备,或者只在通用串行总线控制器中看到 ``USB Serial Converter A`` 和 ``USB Serial Converter B``,请到 `FTDI 官网 <https://ftdichip.com/drivers/vcp-drivers/>`_ 下载与系统匹配的驱动
|
||||
|
||||
.. figure:: img/sipeed_rv_debugger_6.png
|
||||
|
||||
@ -96,7 +96,7 @@ Sipeed RV-Debugger Plus 调试器在 Windows 系统中所以时我们需要将
|
||||
**Linux**
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- 首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,执行以下命令,查看是否存在
|
||||
- 首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,打开 Terminal,在终端中输入 lsusb 命令,即可看到如下信息的设备
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -104,16 +104,14 @@ Sipeed RV-Debugger Plus 调试器在 Windows 系统中所以时我们需要将
|
||||
|
||||
.. figure:: img/sipeed_rv_debugger_8.png
|
||||
|
||||
- 安装 Openocd 及其需要的依赖项
|
||||
- 如果上述图中不显示 FT2232C 字样,需要安装 ftdi 驱动
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ apt install openocd libusb-dev libftdi-dev libhidapi-dev
|
||||
$ sudo apt install libusb-dev libftdi-dev libhidapi-dev
|
||||
|
||||
- 重新插拔调试器使修改生效
|
||||
- 打开 Terminal,在终端中输入 lsusb 命令,即可看到如下信息的设备
|
||||
|
||||
.. code-block::bash
|
||||
|
||||
$ Bus 001 Device 003: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
|
||||
- 调试代码需要安装 openocd,使用 openocd 0.11 版本
|
||||
|
||||
.. note:: 在 linux 中,串口是使用 /dev/ttyUSB1,调试口使用 /dev/ttyUSB0,如果显示 /dev/ttyACM0 则表示进入 boot 模式
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 16 KiB |
@ -66,7 +66,7 @@ PWM - 驱动步进电机
|
||||
.. code-block:: C
|
||||
:linenos:
|
||||
|
||||
#define BSP_PWM_CLOCK_SOURCE ROOT_CLOCK_SOURCE_RC_32K
|
||||
#define BSP_PWM_CLOCK_SOURCE ROOT_CLOCK_SOURCE_32K_CLK
|
||||
#define BSP_PWM_CLOCK_DIV 32
|
||||
|
||||
- 配置 ``PWM`` 设备时钟源,见 ``bsp/board/bl706_iot/clock_config.h``
|
||||
|
Reference in New Issue
Block a user