【安信可UWB室内定位模组NodeMCU-BU01】03.移植准备:硬件原理图分析
<div class='showpostmsg'><p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">NodeMCU-BU01</font><font face="宋体">开发板</font></span></span></span></span></strong></p><p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-family: 宋体; font-size: 10.5pt;">电源</span></strong></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">电源部分使用了</font><font face="Calibri">Micro USB</font><font face="宋体">作为</font><font face="Calibri">NodeMCU-BU01</font><font face="宋体">开发板的供电接口,预留了</font><font face="Calibri">PA11\PA12</font><font face="宋体">可用作</font><font face="Calibri">USB</font><font face="宋体">功能扩展,通过</font><font face="Calibri">ASM1117-3.3</font><font face="宋体">这颗</font><font face="Calibri">LDO</font><font face="宋体">将</font><font face="Calibri">USB</font><font face="宋体">输入的</font><font face="Calibri">5V</font><font face="宋体">电压转换为</font><font face="Calibri">3.3V</font><font face="宋体">,给整个开发板提供工作电压。</font></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">主控芯片</font></span></span></span></span></strong></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">主控芯片选择</font><font face="Calibri">STM32</font><font face="宋体">主流微控制器,</font><font face="Calibri">STM32F103C8T6</font><font face="宋体">带有</font><font face="Calibri">20KB</font><font face="宋体">的</font><font face="Calibri">SRAM</font><font face="宋体">和</font><font face="Calibri">64KB</font><font face="宋体">的</font><font face="Calibri">FLASH</font><font face="宋体">程序存储空间,完全满足了测距算法实现所需要的对</font><font face="Calibri">RAM</font><font face="宋体">和</font><font face="Calibri">ROM</font><font face="宋体">的空间大小要求。</font></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">晶振电路</font></span></span></span></span></strong></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">开发板板载了</font><font face="Calibri">2</font><font face="宋体">个晶振源,一个</font><font face="Calibri">8MHz</font><font face="宋体">的晶振给</font><font face="Calibri">MCU</font><font face="宋体">提供外部时钟输入,另一个</font><font face="Calibri">32.768kHz</font><font face="宋体">的晶振给</font><font face="Calibri">MCU</font><font face="宋体">内部的</font><font face="Calibri">RTC</font><font face="宋体">部分提供外部时钟输入。</font></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">复位电路、</font><font face="Calibri">BOOT</font><font face="宋体">、</font><font face="Calibri">SWD</font><font face="宋体">下载接口</font></span></span></span></span></strong></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">典型的</font><font face="Calibri">MCU</font><font face="宋体">复位电路及</font><font face="Calibri">BOOT</font><font face="宋体">跳帽选择,通过对</font><font face="Calibri">BOOT0/BOOT1</font><font face="宋体">引脚配置不同的电平,来达到从不同程序起始地址启动的功能;另外</font><font face="Calibri">SWD</font><font face="宋体">接口给</font><font face="Calibri">MCU</font><font face="宋体">的程序下载和在线调试提供了便捷。</font></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">LED</font><font face="宋体">灯、用户按键</font></span></span></span></span></strong></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">板载多个</font><font face="Calibri">LED</font><font face="宋体">灯,红色</font><font face="Calibri">LED</font><font face="宋体">指示系统电源供电状态,另外三个绿色、蓝色、黄色</font><font face="Calibri">LED</font><font face="宋体">灯用作用户编程,可以编程指示不同的系统运行状态;</font><font face="Calibri">BTN</font><font face="宋体">按键给整个开发板提供了输入接口。</font></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">传感器</font></span></span></span></span></strong></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">板载了</font><font face="Calibri">2</font><font face="宋体">个传感器,</font><font face="Calibri">SHT20</font><font face="宋体">用作温湿度的采集,另外还有一颗三轴加速度传感器,与</font><font face="Calibri">MCU</font><font face="宋体">共用同一个硬件</font><font face="Calibri">I2C</font><font face="宋体">接口进行通讯控制。</font></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">BU01</font><font face="宋体">测距模块</font></span></span></span></span></strong></p>
<p align="justify" style="text-align:justify"><span style="font-size:10.5pt"><span style="text-justify:inter-ideograph"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">BU01</font><font face="宋体">测距模块与</font><font face="Calibri">MCU</font><font face="宋体">之间通过</font><font face="Calibri">SPI</font><font face="宋体">接口进行通讯,再配合相应的</font><font face="Calibri">GPIO</font><font face="宋体">口控制,来完成测距功能。</font></span></span></span></span></span></p>
<p align="justify" style="text-align:justify"><span style="font-size:10.5pt"><span style="text-justify:inter-ideograph"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">EXTON</font><font face="宋体">是外部设备启用引脚,在唤醒过程中置们并操持活动状态,直到设备进入睡眠模式。可用于控制外部</font><font face="Calibri">DC-DC</font><font face="宋体">转换器或设备处于睡眠模式时不需要的其他电路,以最大程序地降低功耗。</font></span></span></span></span></span></p>
<p align="justify" style="text-align:justify"><span style="font-size:10.5pt"><span style="text-justify:inter-ideograph"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">WAKEUP</font><font face="宋体">引脚,当置为有效高电平状态时,</font><font face="Calibri">BU01</font><font face="宋体">将从休眠或</font><font face="Calibri">DEEPSLEEP</font><font face="宋体">状态切换到工作模式,如果未使用,则该引脚可以接地。</font></span></span></span></span></span></p>
<p align="justify" style="text-align:justify"><span style="font-size:10.5pt"><span style="text-justify:inter-ideograph"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">RSTN</font><font face="宋体">是复位引脚,低电平有效输出。可以通过外部开漏驱动器拉低以复位。</font></span></span></span></span></span></p>
<p align="justify" style="text-align:justify"><span style="font-size:10.5pt"><span style="text-justify:inter-ideograph"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">IRQ</font><font face="宋体">引脚,是从</font><font face="Calibri">BU01</font><font face="宋体">到</font><font face="Calibri">MCU</font><font face="宋体">的中断请求输出。默认情况下,</font><font face="Calibri">IRQ</font><font face="宋体">是高电平有效输出,但是如果需要,可以将其配置为低电平有效。为了在</font><font face="Calibri">SLEEP</font><font face="宋体">和</font><font face="Calibri">DEEPSLEEP</font><font face="宋体">模式下正确运行,应将其配置为高电平有效运行。该引脚将在</font><font face="Calibri">SLEEP</font><font face="宋体">和</font><font face="Calibri">DEEPSLEEP</font><font face="宋体">状态下浮动,除非将其拉低,否则可以导致伪中断。当不使用</font><font face="Calibri">IRQ</font><font face="宋体">功能时,可以将该引脚重新配置为通用</font><font face="Calibri">I/O</font><font face="宋体">线</font><font face="Calibri">GPIO8</font><font face="宋体">。</font></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">最后就是</font><font face="Calibri">SPI</font><font face="宋体">接口,其中</font><font face="Calibri">CS</font><font face="宋体">引脚既为芯片选择引脚,也可以用作唤醒信号,使</font><font face="Calibri">BU01</font><font face="宋体">退出</font><font face="Calibri">SLEEP</font><font face="宋体">或</font><font face="Calibri">DEEPSLEEP</font><font face="宋体">状态。</font></span></span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">扩展接口</font></span></span></span></span></strong></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">后续</font></span></span></span></span></strong></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">在安信可官方提供了</font><font face="Calibri">NodeMCU-BU01</font><font face="宋体">开发板出厂固件</font><font face="Calibri">AT</font><font face="宋体">源码</font><font face="Calibri">STM32</font><font face="宋体">,后面我们将通过代码分析形式来熟悉测距功能代码;使用</font><font face="Calibri">PIN TO PIN</font><font face="宋体">兼容的</font><font face="Calibri">MCU</font><font face="宋体">来替换</font><font face="Calibri">STM32</font><font face="宋体">,将测距算法移植到新的</font><font face="Calibri">MCU</font><font face="宋体">,来实现测距功能。</font></span></span></span></span></p>
<p style="text-align:justify"> </p>
</div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>
页:
[1]