| 
 
| 本帖最后由 xu@xupt 于 2024-4-21 20:37 编辑 
 【AT-START-F405测评】+1、Workbench生成代码控制LED1、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同时亮。
 
   
   效果
 
   | 
 |