打印
[活动专区]

【AT-START-F405测评】+Workbench生成代码控制LED

[复制链接]
1419|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
xu@xupt|  楼主 | 2024-4-21 20:36 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 xu@xupt 于 2024-4-21 20:37 编辑
【AT-START-F405测评】+1、Workbench生成代码控制LED
1、AT32_Work_Bench安装
A、安装软件
AT 32 Work Bench可以通过MCU图形配置生成初始化C代码和相应的IDE项目,从而减少开发工作量、时间和成本。AT 32工作台具有以下功能:
1.支持外围设备初始化配置
2.支持PIN UX配置和定制PIN标签
3。支持自动系统时钟配置
4.支持在线代码查看
5.支持“添加用户代码”功能(现有代码不会被新项目覆盖)
6.支持Keil、IAR和AT 32 IDE
7中的自动项目生成。记录最近的设计
8。生成配置报告(.pdf)
9.支持简体中文和英文菜单
10.支持Windows和Linux
11。支持在线软件升级和MCU硬件下载
https://www.arterychip.com/en/support/index.jsp?index=6

B、配置
AT 32 Work Bench和STM 的很像
在本例中配置的

很直观的配置,可以配置管脚,很方便。

2、AT32_Work_Bench代码生成
生成的代码如下:
/* add user code begin Header */
/**
  **************************************************************************
  * @file     main.c
  * @brief    main program
  **************************************************************************
  *                       Copyright notice & Disclaimer
  *
  * The software Board Support Package (BSP) that is made available to
  * download from Artery official website is the copyrighted work of Artery.
  * Artery authorizes customers to use, copy, and distribute the BSP
  * software and its related documentation for the purpose of design and
  * development in conjunction with Artery microcontrollers. Use of the
  * software is governed by this copyright notice and the following disclaimer.
  *
  * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
  * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
  * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
  * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
  * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
  *
  **************************************************************************
  */
/* add user code end Header */
/* Includes ------------------------------------------------------------------*/
#include "at32f402_405_wk_config.h"
/* private includes ----------------------------------------------------------*/
/* add user code begin private includes */
/* add user code end private includes */
/* private typedef -----------------------------------------------------------*/
/* add user code begin private typedef */
/* add user code end private typedef */
/* private define ------------------------------------------------------------*/
/* add user code begin private define */
/* add user code end private define */
/* private macro -------------------------------------------------------------*/
/* add user code begin private macro */
/* add user code end private macro */
/* private variables ---------------------------------------------------------*/
/* add user code begin private variables */
/* add user code end private variables */
/* private function prototypes --------------------------------------------*/
/* add user code begin function prototypes */
/* add user code end function prototypes */
/* private user code ---------------------------------------------------------*/
/* add user code begin 0 */
/* add user code end 0 */
/**
  * @brief main function.
  * @param  none
  * @retval none
  */
int main(void)
{
  /* add user code begin 1 */
  /* add user code end 1 */
  /* system clock config. */
wk_system_clock_config();
  /* config periph clock. */
wk_periph_clock_config();
  /* nvic config. */
wk_nvic_config();
  /* initgpio function. */
wk_gpio_config();
  /* add user code begin 2 */
  /* add user code end 2 */
while(1)
  {
    /* add user code begin 3 */
gpio_bits_reset(GPIOF, GPIO_PINS_4 | GPIO_PINS_5 | GPIO_PINS_6);
    /* add user code end 3 */
  }
}
通多编译,下载可以实现三个LED同时亮。


效果

62b1f8aeacd7449de14d1be6144c0570 (505.24 KB )

62b1f8aeacd7449de14d1be6144c0570

af464d9df01f931b4a6cb368833f02fe (379.2 KB )

af464d9df01f931b4a6cb368833f02fe

171351c8cf77fe6a3499200de5e83a98 (37.75 KB )

171351c8cf77fe6a3499200de5e83a98

16b3cb43f3589a22da3a6c985b98fe1c (80.46 KB )

16b3cb43f3589a22da3a6c985b98fe1c

8afd2321aa1d59312e522ffd00260de9 (152.97 KB )

8afd2321aa1d59312e522ffd00260de9

bf4150b75d7b39bb6d4c770fb692173b (128.59 KB )

bf4150b75d7b39bb6d4c770fb692173b

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

113

主题

700

帖子

3

粉丝