位置:
首页

>

>

AliOS Things物联网开发板(基于STM32L496VGTx)的初体验
时间:
& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& n跟随嵌入式云IOT技术小组,带给您更多精彩! & nbsp; & nbsp;& nbsp;今天,我们将介绍由阿里(Ali)启动的开发板:AliOS Things开发人员工具包默认情况下,该开发板随附AliOS Things。官方建议使用AliOS-Things uCube。
开发特定的应用程序,甚至通过STM32CubeMX工具生成源代码,以生成基本的IO配置和功能,并在HAL库的基础上继续进行二次开发。如果您对个人使用不满意,请改回Keil环境。
在此期间,我遇到了一个问题。顺便记录一下。
& nbsp; & nbsp;使用开发板时,首先要点亮,第一步是照明,然后还有其他任务。照明程序仍基于STM32CubeMX,然后在Keil MDK上实现。
第一个LED的硬件连接图。如示意图所示,LED连接到PB6引脚。
当向IO写入低电平时,LED点亮,否则LED熄灭,然后开始打开STM32CubeMX并开始基本配置。 1.创建一个新的STM32L496VGTx项目(基于STM32L496VGTx)1.1时钟配置默认情况下,选择外部晶体振荡器提供的时钟,然后默认配置最高频率。
1.2组态LED由于处于低电平活动状态,因此CPU上电的默认引脚状态在此处将其拉高。 1.3生成Keil MDK项目1.4并编写演示int以使LED翻转main(void){& nbsp; / *& nbsp; USER& nbsp; CODE& nbsp; BEGIN& nbsp ; 1& nbsp;& nbsp; / *& nbsp; USER& nbsp; END& nbsp; 1& nbsp; * /& nbsp;& nbsp; / ** ; nbsp; MCU& nbsp;配置-------------------------------- ---------- -------------- * /& /& nbsp; / *& nbsp;重置& nbsp;所有 所有外围设备,  Initializes&   Flash& nbsp;接口和  Systick。
* /& nbsp;& nbsp; HAL_Init();& nbsp; / **& nbsp; USER  USER  CODEBEGIN& Init& Instant& Nbsp; * /& nbsp;& nbsp; / *& nbsp; USER& nbsp; CODE& nbsp; END& nbsp; Init& nbsp;& nbsp; / *& nbsp;配置  系统& nbsp; clock& nbsp; * /& nbsp;    SystemClock_Config();& nbsp; / *& nbsp; USER& nbsp; CODE& nbsp; BEGIN& nbsp; SysInit& nbsp; * /& nbsp;& nbsp; / ** USER& nbsp;代码& nbsp; SysInit& nbsp; * /& nbsp;& nbsp; / *& nbsp;初始化并配置所有外围设备& nbsp;& nbsp; MX_GPIO_Init();& nbsp;& nbsp; USER& nbsp; CODE& nbsp; BEGIN& nbsp; 2& nbsp; * /& nbsp;& n nb sp; / *& nbsp; USER& nbsp; END& nbsp; 2& nbsp; * /& nbsp;& nbsp; / *& nbsp; Infinite& nbsp; loop& nbsp; * /& nbsp; / *& nbsp; USER& nbsp; CODE& nbsp; BEGIN& nbsp; WHILE& nbsp; * /  & nbsp; while& nbsp;(1)& nbsp; {& nbsp;& nbsp;& nbsp;& nbsp; / *& nbsp; USER& nbsp; CODE& nbsp; END& nbsp; * /& nbsp;& nbsp;& nbsp;& nbsp; / *& nbsp; USER& nbsp; CODE  BEGIN  3& nbsp; * /& nbsp;& nbsp;& nbsp;& nbsp;& nbsp;& nbsp; HAL_GPIO_TogglePin(LED_GPIO_Port,& nbsp; LED_Pin);& nbsp; ; nbsp;& nbsp;& nbsp;& nbsp; HAL_Delay(200);& nbsp;& nbsp;& nbsp; / *& nbsp; USER& nbsp如代码中所示,HAL_GPIO_TogglePin函数将使与IO翻转相对应的LED高和低电平,由于增加了延迟时间200ms,所以您看到的效果是LED快速闪烁。  & nbsp;& nbsp;开发板使用USB到ST_Link,因此您需要在此之前安装驱动程序。
还提供了董事会的开发信息。董事会的所有信息,包括源代码,都在Github上提供。
有兴趣的朋友可以下载它。 https://github.com/alibaba/AliOS-Things/wiki/Developer-Kit-Tutorial如果不下载相应的驱动程序,Keil将无法识别SW设备。
安装驱动程序后,将如下图所示:接下来,单击Keil在下载程序中将出现以下提示,因为发现Keil未添加与STM32L4XXX相对应的FLASH算法。我们添加了算法,然后再次单击下载以解决该问题。
2.跑步。
产品资料
行业信息