diff --git a/AT32F413_periph_lib_V2.0.0.chm b/AT32F413_periph_lib_V2.0.2.chm similarity index 60% rename from AT32F413_periph_lib_V2.0.0.chm rename to AT32F413_periph_lib_V2.0.2.chm index 4c19f9f..dd820eb 100644 Binary files a/AT32F413_periph_lib_V2.0.0.chm and b/AT32F413_periph_lib_V2.0.2.chm differ diff --git a/document/ReleaseNotes_AT32F413_Firmware_Library.pdf b/document/ReleaseNotes_AT32F413_Firmware_Library.pdf index d13e73a..35e77ec 100644 Binary files a/document/ReleaseNotes_AT32F413_Firmware_Library.pdf and b/document/ReleaseNotes_AT32F413_Firmware_Library.pdf differ diff --git a/libraries/cmsis/cm4/device_support/at32f413.h b/libraries/cmsis/cm4/device_support/at32f413.h index 59f420d..a669d24 100644 --- a/libraries/cmsis/cm4/device_support/at32f413.h +++ b/libraries/cmsis/cm4/device_support/at32f413.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 header file ************************************************************************** * Copyright notice & Disclaimer @@ -57,7 +57,7 @@ extern "C" { !defined (AT32F413CCT7) && !defined (AT32F413RBT7) && !defined (AT32F413RCT7) && \ !defined (AT32FEBKC8T7) && !defined (AT32F413TBU7) - #error "Please select first the target at32f4xx device used in your application (in at32f4xx.h file)" + #error "Please select first the target device used in your application (in at32f413.h file)" #endif #if defined (AT32F413KBU7_4) || defined (AT32F413KCU7_4) || defined (AT32F413CBU7) || \ @@ -87,7 +87,7 @@ extern "C" { */ #define __AT32F413_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */ #define __AT32F413_LIBRARY_VERSION_MIDDLE (0x00) /*!< [23:16] middle version */ -#define __AT32F413_LIBRARY_VERSION_MINOR (0x00) /*!< [15:8] minor version */ +#define __AT32F413_LIBRARY_VERSION_MINOR (0x02) /*!< [15:8] minor version */ #define __AT32F413_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */ #define __AT32F413_LIBRARY_VERSION ((__AT32F413_LIBRARY_VERSION_MAJOR << 24) | \ (__AT32F413_LIBRARY_VERSION_MIDDLE << 16) | \ @@ -371,7 +371,8 @@ typedef enum {ERROR = 0, SUCCESS = !ERROR} error_status; /** * @} */ - + +#include "at32f413_def.h" #include "at32f413_conf.h" #ifdef __cplusplus diff --git a/libraries/cmsis/cm4/device_support/at32f413_conf_template.h b/libraries/cmsis/cm4/device_support/at32f413_conf_template.h index 40c301e..4c16bce 100644 --- a/libraries/cmsis/cm4/device_support/at32f413_conf_template.h +++ b/libraries/cmsis/cm4/device_support/at32f413_conf_template.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s index 7360c5a..8d0e880 100644 --- a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s +++ b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file startup_at32f413.s - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413xx devices vector table for gcc toolchain. * this module performs: * - set the initial sp diff --git a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f413.s b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f413.s index 1c4659b..5a5c81a 100644 --- a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f413.s +++ b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f413.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f413.s -;* @version v2.0.0 -;* @date 2021-11-26 +;* @version v2.0.2 +;* @date 2021-12-31 ;* @brief at32f413 startup file for IAR Systems ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s index 81b4d6b..c542730 100644 --- a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s +++ b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f403a_407.s -;* @version v2.0.0 -;* @date 2021-11-26 +;* @version v2.0.2 +;* @date 2021-12-31 ;* @brief at32f403a_407 startup file for keil ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/system_at32f413.c b/libraries/cmsis/cm4/device_support/system_at32f413.c index a0b334d..b6c7cc9 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f413.c +++ b/libraries/cmsis/cm4/device_support/system_at32f413.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f413.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for cmsis cortex-m4 system source file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/cm4/device_support/system_at32f413.h b/libraries/cmsis/cm4/device_support/system_at32f413.h index c96dfff..931976a 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f413.h +++ b/libraries/cmsis/cm4/device_support/system_at32f413.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f413.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief cmsis cortex-m4 system header file. ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_acc.h b/libraries/drivers/inc/at32f413_acc.h index 5ef74bf..1342fdb 100644 --- a/libraries/drivers/inc/at32f413_acc.h +++ b/libraries/drivers/inc/at32f413_acc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_acc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 acc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_adc.h b/libraries/drivers/inc/at32f413_adc.h index a918961..f1575e7 100644 --- a/libraries/drivers/inc/at32f413_adc.h +++ b/libraries/drivers/inc/at32f413_adc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_adc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 adc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_bpr.h b/libraries/drivers/inc/at32f413_bpr.h index e4d78fd..549f853 100644 --- a/libraries/drivers/inc/at32f413_bpr.h +++ b/libraries/drivers/inc/at32f413_bpr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_bpr.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 bpr header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_can.h b/libraries/drivers/inc/at32f413_can.h index 9e62cd4..79117db 100644 --- a/libraries/drivers/inc/at32f413_can.h +++ b/libraries/drivers/inc/at32f413_can.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_can.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 can header file ************************************************************************** * Copyright notice & Disclaimer @@ -110,16 +110,21 @@ extern "C" { /** * @brief can flag clear operation macro definition val */ -#define CAN_MSTS_EOIF_VAL ((uint32_t)0x00000004) /*!< eoif bit w1 */ -#define CAN_MSTS_QDZIF_VAL ((uint32_t)0x00000008) /*!< qdzif bit w1 */ -#define CAN_MSTS_EDZIF_VAL ((uint32_t)0x00000010) /*!< edzif bit w1 */ -#define CAN_TSTS_TM0TCF_VAL ((uint32_t)0x00000001) /*!< tm0tcf bit w1 */ -#define CAN_TSTS_TM1TCF_VAL ((uint32_t)0x00000100) /*!< tm1tcf bit w1 */ -#define CAN_TSTS_TM2TCF_VAL ((uint32_t)0x00010000) /*!< tm2tcf bit w1 */ -#define CAN_RF0_RF0FF_VAL ((uint32_t)0x00000008) /*!< rf0ff bit w1 */ -#define CAN_RF0_RF0OF_VAL ((uint32_t)0x00000010) /*!< rf0of bit w1 */ -#define CAN_RF1_RF1FF_VAL ((uint32_t)0x00000008) /*!< rf1ff bit w1 */ -#define CAN_RF1_RF1OF_VAL ((uint32_t)0x00000010) /*!< rf1of bit w1 */ +#define CAN_MSTS_EOIF_VAL ((uint32_t)0x00000004) /*!< eoif bit value, it clear by writing 1 */ +#define CAN_MSTS_QDZIF_VAL ((uint32_t)0x00000008) /*!< qdzif bit value, it clear by writing 1 */ +#define CAN_MSTS_EDZIF_VAL ((uint32_t)0x00000010) /*!< edzif bit value, it clear by writing 1 */ +#define CAN_TSTS_TM0TCF_VAL ((uint32_t)0x00000001) /*!< tm0tcf bit value, it clear by writing 1 */ +#define CAN_TSTS_TM1TCF_VAL ((uint32_t)0x00000100) /*!< tm1tcf bit value, it clear by writing 1 */ +#define CAN_TSTS_TM2TCF_VAL ((uint32_t)0x00010000) /*!< tm2tcf bit value, it clear by writing 1 */ +#define CAN_TSTS_TM0CT_VAL ((uint32_t)0x00000080) /*!< tm0ct bit value, it clear by writing 1 */ +#define CAN_TSTS_TM1CT_VAL ((uint32_t)0x00008000) /*!< tm1ct bit value, it clear by writing 1 */ +#define CAN_TSTS_TM2CT_VAL ((uint32_t)0x00800000) /*!< tm2ct bit value, it clear by writing 1 */ +#define CAN_RF0_RF0FF_VAL ((uint32_t)0x00000008) /*!< rf0ff bit value, it clear by writing 1 */ +#define CAN_RF0_RF0OF_VAL ((uint32_t)0x00000010) /*!< rf0of bit value, it clear by writing 1 */ +#define CAN_RF0_RF0R_VAL ((uint32_t)0x00000020) /*!< rf0r bit value, it clear by writing 1 */ +#define CAN_RF1_RF1FF_VAL ((uint32_t)0x00000008) /*!< rf1ff bit value, it clear by writing 1 */ +#define CAN_RF1_RF1OF_VAL ((uint32_t)0x00000010) /*!< rf1of bit value, it clear by writing 1 */ +#define CAN_RF1_RF1R_VAL ((uint32_t)0x00000020) /*!< rf1r bit value, it clear by writing 1 */ /** @defgroup CAN_exported_types * @{ diff --git a/libraries/drivers/inc/at32f413_crc.h b/libraries/drivers/inc/at32f413_crc.h index 2f84711..f74317d 100644 --- a/libraries/drivers/inc/at32f413_crc.h +++ b/libraries/drivers/inc/at32f413_crc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_crc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 crc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_crm.h b/libraries/drivers/inc/at32f413_crm.h index 87f732b..2164a47 100644 --- a/libraries/drivers/inc/at32f413_crm.h +++ b/libraries/drivers/inc/at32f413_crm.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_crm.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 crm header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_debug.h b/libraries/drivers/inc/at32f413_debug.h index 036bce5..4dae0ea 100644 --- a/libraries/drivers/inc/at32f413_debug.h +++ b/libraries/drivers/inc/at32f413_debug.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_debug.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 debug header file ************************************************************************** * Copyright notice & Disclaimer @@ -133,7 +133,7 @@ typedef struct * @} */ -#define DEBUG ((debug_type *) DEBUG_BASE) +#define DEBUGMCU ((debug_type *) DEBUG_BASE) /** @defgroup DEBUG_exported_functions * @{ diff --git a/libraries/drivers/inc/at32f413_def.h b/libraries/drivers/inc/at32f413_def.h new file mode 100644 index 0000000..4ed8de0 --- /dev/null +++ b/libraries/drivers/inc/at32f413_def.h @@ -0,0 +1,69 @@ +/** + ************************************************************************** + * @file at32f413_def.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief at32f413 macros header file + ************************************************************************** + * 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. + * + ************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F413_DEF_H +#define __AT32F413_DEF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* gnu compiler */ +#if defined (__GNUC__) + #ifndef ALIGNED_HEAD + #define ALIGNED_HEAD + #endif + #ifndef ALIGNED_TAIL + #define ALIGNED_TAIL __attribute__ ((aligned (4))) + #endif +#endif + +/* arm compiler */ +#if defined (__CC_ARM) + #ifndef ALIGNED_HEAD + #define ALIGNED_HEAD __align(4) + #endif + #ifndef ALIGNED_TAIL + #define ALIGNED_TAIL + #endif +#endif + +/* iar compiler */ +#if defined (__ICCARM__) + #ifndef ALIGNED_HEAD + #define ALIGNED_HEAD + #endif + #ifndef ALIGNED_TAIL + #define ALIGNED_TAIL + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libraries/drivers/inc/at32f413_dma.h b/libraries/drivers/inc/at32f413_dma.h index f99bc1a..3dad222 100644 --- a/libraries/drivers/inc/at32f413_dma.h +++ b/libraries/drivers/inc/at32f413_dma.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_dma.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 dma header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_exint.h b/libraries/drivers/inc/at32f413_exint.h index 222dbcb..ce8dc38 100644 --- a/libraries/drivers/inc/at32f413_exint.h +++ b/libraries/drivers/inc/at32f413_exint.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_exint.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 exint header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_flash.h b/libraries/drivers/inc/at32f413_flash.h index abee227..208cc5c 100644 --- a/libraries/drivers/inc/at32f413_flash.h +++ b/libraries/drivers/inc/at32f413_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_flash.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_gpio.h b/libraries/drivers/inc/at32f413_gpio.h index ac54628..c6d4135 100644 --- a/libraries/drivers/inc/at32f413_gpio.h +++ b/libraries/drivers/inc/at32f413_gpio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_gpio.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 gpio header file ************************************************************************** * Copyright notice & Disclaimer @@ -409,7 +409,7 @@ typedef struct }; /** - * @brief gpio wcr register, offset:0x10 + * @brief gpio scr register, offset:0x10 */ union { diff --git a/libraries/drivers/inc/at32f413_i2c.h b/libraries/drivers/inc/at32f413_i2c.h index f46d20b..ce02cd8 100644 --- a/libraries/drivers/inc/at32f413_i2c.h +++ b/libraries/drivers/inc/at32f413_i2c.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_i2c.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 i2c header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_misc.h b/libraries/drivers/inc/at32f413_misc.h index 0b215cf..6a348b7 100644 --- a/libraries/drivers/inc/at32f413_misc.h +++ b/libraries/drivers/inc/at32f413_misc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_misc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 misc header file ************************************************************************** * Copyright notice & Disclaimer @@ -64,11 +64,11 @@ extern "C" { */ typedef enum { - NVIC_PRIORITY_GROUP_0 = ((uint32_t)0x700), /*!< 0 bits for preemption priority, 4 bits for subpriority */ - NVIC_PRIORITY_GROUP_1 = ((uint32_t)0x600), /*!< 1 bits for preemption priority, 3 bits for subpriority */ - NVIC_PRIORITY_GROUP_2 = ((uint32_t)0x500), /*!< 2 bits for preemption priority, 2 bits for subpriority */ - NVIC_PRIORITY_GROUP_3 = ((uint32_t)0x400), /*!< 3 bits for preemption priority, 1 bits for subpriority */ - NVIC_PRIORITY_GROUP_4 = ((uint32_t)0x300) /*!< 4 bits for preemption priority, 0 bits for subpriority */ + NVIC_PRIORITY_GROUP_0 = ((uint32_t)0x7), /*!< 0 bits for preemption priority, 4 bits for subpriority */ + NVIC_PRIORITY_GROUP_1 = ((uint32_t)0x6), /*!< 1 bits for preemption priority, 3 bits for subpriority */ + NVIC_PRIORITY_GROUP_2 = ((uint32_t)0x5), /*!< 2 bits for preemption priority, 2 bits for subpriority */ + NVIC_PRIORITY_GROUP_3 = ((uint32_t)0x4), /*!< 3 bits for preemption priority, 1 bits for subpriority */ + NVIC_PRIORITY_GROUP_4 = ((uint32_t)0x3) /*!< 4 bits for preemption priority, 0 bits for subpriority */ } nvic_priority_group_type; /** diff --git a/libraries/drivers/inc/at32f413_pwc.h b/libraries/drivers/inc/at32f413_pwc.h index d617135..1781fbf 100644 --- a/libraries/drivers/inc/at32f413_pwc.h +++ b/libraries/drivers/inc/at32f413_pwc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_pwc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 pwc header file ************************************************************************** * Copyright notice & Disclaimer @@ -57,6 +57,11 @@ extern "C" { * @} */ +/** + * @brief pwc wakeup pin num definition + */ +#define PWC_WAKEUP_PIN_1 ((uint32_t)0x00000100) /*!< standby wake-up pin1 */ + /** @defgroup PWC_exported_types * @{ */ @@ -159,7 +164,7 @@ void pwc_reset(void); void pwc_battery_powered_domain_access(confirm_state new_state); void pwc_pvm_level_select(pwc_pvm_voltage_type pvm_voltage); void pwc_power_voltage_monitor_enable(confirm_state new_state); -void pwc_wakeup_pin_enable(confirm_state new_state); +void pwc_wakeup_pin_enable(uint32_t pin_num, confirm_state new_state); void pwc_flag_clear(uint32_t pwc_flag); flag_status pwc_flag_get(uint32_t pwc_flag); void pwc_sleep_mode_enter(pwc_sleep_enter_type pwc_sleep_enter); diff --git a/libraries/drivers/inc/at32f413_rtc.h b/libraries/drivers/inc/at32f413_rtc.h index c73bc00..53bcd23 100644 --- a/libraries/drivers/inc/at32f413_rtc.h +++ b/libraries/drivers/inc/at32f413_rtc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_rtc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 rtc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_sdio.h b/libraries/drivers/inc/at32f413_sdio.h index b67522e..3351283 100644 --- a/libraries/drivers/inc/at32f413_sdio.h +++ b/libraries/drivers/inc/at32f413_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_sdio.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 sdio header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_spi.h b/libraries/drivers/inc/at32f413_spi.h index 3d1de72..5afdfa8 100644 --- a/libraries/drivers/inc/at32f413_spi.h +++ b/libraries/drivers/inc/at32f413_spi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_spi.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 spi header file ************************************************************************** * Copyright notice & Disclaimer @@ -122,8 +122,8 @@ typedef enum */ typedef enum { - SPI_CS_HARDWARE_MODE = 0x00, /*!< cs is software mode */ - SPI_CS_SOFTWARE_MODE = 0x01 /*!< cs is hardware mode */ + SPI_CS_HARDWARE_MODE = 0x00, /*!< cs is hardware mode */ + SPI_CS_SOFTWARE_MODE = 0x01 /*!< cs is software mode */ } spi_cs_mode_type; /** diff --git a/libraries/drivers/inc/at32f413_tmr.h b/libraries/drivers/inc/at32f413_tmr.h index 4a72b3e..2527b38 100644 --- a/libraries/drivers/inc/at32f413_tmr.h +++ b/libraries/drivers/inc/at32f413_tmr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_tmr.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 tmr header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_usart.h b/libraries/drivers/inc/at32f413_usart.h index bee95c7..8f5a66c 100644 --- a/libraries/drivers/inc/at32f413_usart.h +++ b/libraries/drivers/inc/at32f413_usart.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_usart.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 usart header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_usb.h b/libraries/drivers/inc/at32f413_usb.h index 2139569..c11c6dd 100644 --- a/libraries/drivers/inc/at32f413_usb.h +++ b/libraries/drivers/inc/at32f413_usb.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_usb.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 usb header file ************************************************************************** * Copyright notice & Disclaimer @@ -689,6 +689,7 @@ void usb_remote_wkup_clear(usbd_type *usbx); uint16_t usb_buffer_malloc(uint16_t maxpacket); void usb_buffer_free(void); flag_status usb_flag_get(usbd_type *usbx, uint16_t flag); +void usb_flag_clear(usbd_type *usbx, uint16_t flag); #ifdef __cplusplus diff --git a/libraries/drivers/inc/at32f413_wdt.h b/libraries/drivers/inc/at32f413_wdt.h index b6aa5d5..7ead068 100644 --- a/libraries/drivers/inc/at32f413_wdt.h +++ b/libraries/drivers/inc/at32f413_wdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_wdt.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 wdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_wwdt.h b/libraries/drivers/inc/at32f413_wwdt.h index 298fe20..67bdd79 100644 --- a/libraries/drivers/inc/at32f413_wwdt.h +++ b/libraries/drivers/inc/at32f413_wwdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_wwdt.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 wwdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_acc.c b/libraries/drivers/src/at32f413_acc.c index 40656a8..9ddf947 100644 --- a/libraries/drivers/src/at32f413_acc.c +++ b/libraries/drivers/src/at32f413_acc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_acc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the acc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_adc.c b/libraries/drivers/src/at32f413_adc.c index 851b92d..433b26f 100644 --- a/libraries/drivers/src/at32f413_adc.c +++ b/libraries/drivers/src/at32f413_adc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_adc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the adc firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -918,7 +918,7 @@ flag_status adc_flag_get(adc_type *adc_x, uint8_t adc_flag) */ void adc_flag_clear(adc_type *adc_x, uint32_t adc_flag) { - adc_x->sts &= ~adc_flag; + adc_x->sts = ~adc_flag; } /** diff --git a/libraries/drivers/src/at32f413_bpr.c b/libraries/drivers/src/at32f413_bpr.c index fc279dc..95cf1ec 100644 --- a/libraries/drivers/src/at32f413_bpr.c +++ b/libraries/drivers/src/at32f413_bpr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_bpr.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the bpr firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_can.c b/libraries/drivers/src/at32f413_can.c index 7782137..942de04 100644 --- a/libraries/drivers/src/at32f413_can.c +++ b/libraries/drivers/src/at32f413_can.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_can.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the can firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -591,13 +591,13 @@ void can_transmit_cancel(can_type* can_x, can_tx_mailbox_num_type transmit_mailb switch (transmit_mailbox) { case CAN_TX_MAILBOX0: - can_x->tsts_bit.tm0ct = TRUE; + can_x->tsts = CAN_TSTS_TM0CT_VAL; break; case CAN_TX_MAILBOX1: - can_x->tsts_bit.tm1ct = TRUE; + can_x->tsts = CAN_TSTS_TM1CT_VAL; break; case CAN_TX_MAILBOX2: - can_x->tsts_bit.tm2ct = TRUE; + can_x->tsts = CAN_TSTS_TM2CT_VAL; break; default: break; @@ -668,10 +668,10 @@ void can_receive_fifo_release(can_type* can_x, can_rx_fifo_num_type fifo_number) switch (fifo_number) { case CAN_RX_FIFO0: - can_x->rf0_bit.rf0r = TRUE; + can_x->rf0 = CAN_RF0_RF0R_VAL; break; case CAN_RX_FIFO1: - can_x->rf1_bit.rf1r = TRUE; + can_x->rf1 = CAN_RF1_RF1R_VAL; break; default: break; diff --git a/libraries/drivers/src/at32f413_crc.c b/libraries/drivers/src/at32f413_crc.c index 67bcda0..5b1495b 100644 --- a/libraries/drivers/src/at32f413_crc.c +++ b/libraries/drivers/src/at32f413_crc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_crc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the crc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_crm.c b/libraries/drivers/src/at32f413_crm.c index 25fe7ff..3cbaf8d 100644 --- a/libraries/drivers/src/at32f413_crm.c +++ b/libraries/drivers/src/at32f413_crm.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_crm.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the crm firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_debug.c b/libraries/drivers/src/at32f413_debug.c index f8ee20d..e456fe3 100644 --- a/libraries/drivers/src/at32f413_debug.c +++ b/libraries/drivers/src/at32f413_debug.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_debug.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the debug firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -48,7 +48,7 @@ */ uint32_t debug_device_id_get(void) { - return DEBUG->pid; + return DEBUGMCU->pid; } /** @@ -81,11 +81,11 @@ void debug_periph_mode_set(uint32_t periph_debug_mode, confirm_state new_state) if(new_state != FALSE) { - DEBUG->ctrl |= periph_debug_mode; + DEBUGMCU->ctrl |= periph_debug_mode; } else { - DEBUG->ctrl &= ~periph_debug_mode; + DEBUGMCU->ctrl &= ~periph_debug_mode; } } diff --git a/libraries/drivers/src/at32f413_dma.c b/libraries/drivers/src/at32f413_dma.c index f86fea3..4d63f1b 100644 --- a/libraries/drivers/src/at32f413_dma.c +++ b/libraries/drivers/src/at32f413_dma.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_dma.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the dma firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -214,8 +214,7 @@ void dma_channel_enable(dma_channel_type* dmax_channely, confirm_state new_state * - FLEX_CHANNEL4 * - FLEX_CHANNEL5 * - FLEX_CHANNEL6 - * - FLEX_CHANNEL7 - * - DMA2_CHANNEL8 + * - FLEX_CHANNEL7 * @param flexible_request: every peripheral have specified hardware_id. * this parameter can be one of the following values: * - DMA_FLEXIBLE_ADC1 - DMA_FLEXIBLE_SPI1_RX - DMA_FLEXIBLE_SPI1_TX - DMA_FLEXIBLE_SPI2_RX @@ -344,13 +343,13 @@ flag_status dma_flag_get(uint32_t dmax_flag) */ void dma_flag_clear(uint32_t dmax_flag) { - if(dmax_flag > 0x10000000) + if(dmax_flag > ((uint32_t)0x10000000)) { - DMA2->clr = dmax_flag; + DMA2->clr = (uint32_t)(dmax_flag & 0x0FFFFFFF); } else { - DMA1->clr = dmax_flag; + DMA1->clr = dmax_flag; } } diff --git a/libraries/drivers/src/at32f413_exint.c b/libraries/drivers/src/at32f413_exint.c index 73bea43..ca19584 100644 --- a/libraries/drivers/src/at32f413_exint.c +++ b/libraries/drivers/src/at32f413_exint.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_exint.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the exint firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -52,7 +52,7 @@ void exint_reset(void) EXINT->polcfg1 = 0x00000000; EXINT->polcfg2 = 0x00000000; EXINT->evten = 0x00000000; - EXINT->intsts = 0x007FFFFF; + EXINT->intsts = 0x0007FFFF; } /** diff --git a/libraries/drivers/src/at32f413_flash.c b/libraries/drivers/src/at32f413_flash.c index 94f242c..060751a 100644 --- a/libraries/drivers/src/at32f413_flash.c +++ b/libraries/drivers/src/at32f413_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_flash.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the flash firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_gpio.c b/libraries/drivers/src/at32f413_gpio.c index 4c75c65..2a94bb7 100644 --- a/libraries/drivers/src/at32f413_gpio.c +++ b/libraries/drivers/src/at32f413_gpio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_gpio.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the gpio firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_i2c.c b/libraries/drivers/src/at32f413_i2c.c index a3d3c8d..81a3eef 100644 --- a/libraries/drivers/src/at32f413_i2c.c +++ b/libraries/drivers/src/at32f413_i2c.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_i2c.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the i2c firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_misc.c b/libraries/drivers/src/at32f413_misc.c index 2480189..ae04a3a 100644 --- a/libraries/drivers/src/at32f413_misc.c +++ b/libraries/drivers/src/at32f413_misc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_misc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the misc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_pwc.c b/libraries/drivers/src/at32f413_pwc.c index 15f4a62..f233879 100644 --- a/libraries/drivers/src/at32f413_pwc.c +++ b/libraries/drivers/src/at32f413_pwc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_pwc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the pwc firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -94,15 +94,25 @@ void pwc_power_voltage_monitor_enable(confirm_state new_state) /** * @brief enable or disable pwc standby wakeup pin + * @param pin_num: choose the wakeup pin. + * this parameter can be be any combination of the following values: + * - PWC_WAKEUP_PIN_1 * @param new_state: new state of the standby wakeup pin. * this parameter can be one of the following values: * - TRUE * - FALSE * @retval none */ -void pwc_wakeup_pin_enable(confirm_state new_state) +void pwc_wakeup_pin_enable(uint32_t pin_num, confirm_state new_state) { - PWC->ctrlsts_bit.swpen = new_state; + if(new_state == TRUE) + { + PWC->ctrlsts |= pin_num; + } + else + { + PWC->ctrlsts &= ~pin_num; + } } /** diff --git a/libraries/drivers/src/at32f413_rtc.c b/libraries/drivers/src/at32f413_rtc.c index 68d89c1..7ee7ab5 100644 --- a/libraries/drivers/src/at32f413_rtc.c +++ b/libraries/drivers/src/at32f413_rtc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_rtc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the rtc firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -49,14 +49,14 @@ void rtc_counter_set(uint32_t counter_value) { /* enter rtc config mode */ - RTC->ctrll_bit.cfgen = TRUE; + RTC->ctrll = 0x003F; /* set rtc counter */ RTC->cnth_bit.cnt = (uint16_t)(counter_value >> 16); RTC->cntl_bit.cnt = (uint16_t)(counter_value & 0x0000FFFF); /* exit rtc config mode */ - RTC->ctrll_bit.cfgen = FALSE; + RTC->ctrll = 0x000F; } /** @@ -82,14 +82,14 @@ uint32_t rtc_counter_get(void) void rtc_divider_set(uint32_t div_value) { /* enter rtc config mode */ - RTC->ctrll_bit.cfgen = TRUE; + RTC->ctrll = 0x003F; /* set rtc divider */ RTC->divh_bit.div = (uint16_t)(div_value >> 16); RTC->divl_bit.div = (uint16_t)(div_value & 0x0000FFFF); /* exit rtc config mode */ - RTC->ctrll_bit.cfgen = FALSE; + RTC->ctrll = 0x000F; } /** @@ -115,14 +115,14 @@ uint32_t rtc_divider_get(void) void rtc_alarm_set(uint32_t alarm_value) { /* enter rtc config mode */ - RTC->ctrll_bit.cfgen = TRUE; + RTC->ctrll = 0x003F; /* set rtc alarm value */ RTC->tah_bit.ta = (uint16_t)(alarm_value >> 16); RTC->tal_bit.ta = (uint16_t)(alarm_value & 0x0000FFFF); /* exit rtc config mode */ - RTC->ctrll_bit.cfgen = FALSE; + RTC->ctrll = 0x000F; } /** @@ -186,7 +186,7 @@ flag_status rtc_flag_get(uint16_t flag) */ void rtc_flag_clear(uint16_t flag) { - RTC->ctrll &= ~flag; + RTC->ctrll = ~(flag | 0x10) | (RTC->ctrll_bit.cfgen << 4); } /** diff --git a/libraries/drivers/src/at32f413_sdio.c b/libraries/drivers/src/at32f413_sdio.c index f165efa..bf8ead9 100644 --- a/libraries/drivers/src/at32f413_sdio.c +++ b/libraries/drivers/src/at32f413_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_sdio.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the sdio firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -325,7 +325,7 @@ flag_status sdio_flag_get(sdio_type *sdio_x, uint32_t flag) */ void sdio_flag_clear(sdio_type *sdio_x, uint32_t flag) { - sdio_x->intclr |= flag; + sdio_x->intclr = flag; } /** diff --git a/libraries/drivers/src/at32f413_spi.c b/libraries/drivers/src/at32f413_spi.c index 3925ae4..ec2deba 100644 --- a/libraries/drivers/src/at32f413_spi.c +++ b/libraries/drivers/src/at32f413_spi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_spi.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the spi firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -580,9 +580,9 @@ flag_status spi_i2s_flag_get(spi_type* spi_x, uint32_t spi_i2s_flag) void spi_i2s_flag_clear(spi_type* spi_x, uint32_t spi_i2s_flag) { volatile uint32_t temp = 0; - + temp = temp; if(spi_i2s_flag == SPI_CCERR_FLAG) - spi_x->sts_bit.ccerr = FALSE; + spi_x->sts = ~SPI_CCERR_FLAG; else if(spi_i2s_flag == SPI_I2S_RDBF_FLAG) temp = REG32(&spi_x->dt); else if(spi_i2s_flag == I2S_TUERR_FLAG) diff --git a/libraries/drivers/src/at32f413_tmr.c b/libraries/drivers/src/at32f413_tmr.c index d8e0169..bfff19c 100644 --- a/libraries/drivers/src/at32f413_tmr.c +++ b/libraries/drivers/src/at32f413_tmr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_tmr.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the tmr firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -1381,7 +1381,7 @@ flag_status tmr_flag_get(tmr_type *tmr_x, uint32_t tmr_flag) */ void tmr_flag_clear(tmr_type *tmr_x, uint32_t tmr_flag) { - tmr_x->ists &= ~tmr_flag; + tmr_x->ists = ~tmr_flag; } /** diff --git a/libraries/drivers/src/at32f413_usart.c b/libraries/drivers/src/at32f413_usart.c index f16bab7..19216a3 100644 --- a/libraries/drivers/src/at32f413_usart.c +++ b/libraries/drivers/src/at32f413_usart.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_usart.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the usart firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_usb.c b/libraries/drivers/src/at32f413_usb.c index 9582216..f51b96c 100644 --- a/libraries/drivers/src/at32f413_usb.c +++ b/libraries/drivers/src/at32f413_usb.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_usb.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains the functions for the usb firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -323,7 +323,11 @@ void usb_write_packet(uint8_t *pusr_buf, uint16_t offset_addr, uint16_t nbytes) uint16_t *pbuf = (uint16_t *)pusr_buf; for(n_index = 0; n_index < nhbytes; n_index ++) { +#if defined (__ICCARM__) && (__VER__ < 7000000) + *d_addr++ = *(__packed uint16_t *)pbuf; +#else *d_addr++ = __UNALIGNED_UINT16_READ(pbuf); +#endif d_addr ++; pbuf ++; } @@ -344,7 +348,11 @@ void usb_read_packet(uint8_t *pusr_buf, uint16_t offset_addr, uint16_t nbytes) uint16_t *pbuf = (uint16_t *)pusr_buf; for(n_index = 0; n_index < nhbytes; n_index ++) { +#if defined (__ICCARM__) && (__VER__ < 7000000) + *(__packed uint16_t *)pbuf = *(__IO uint16_t *)s_addr ++; +#else __UNALIGNED_UINT16_WRITE(pbuf, *(__IO uint16_t *)s_addr ++); +#endif s_addr ++; pbuf ++; } @@ -511,6 +519,27 @@ flag_status usb_flag_get(usbd_type *usbx, uint16_t flag) return status; } +/** + * @brief clear flag of usb. + * @param usbx: select the usb peripheral + * @param flag: select the usb flag + * this parameter can be one of the following values: + * - USB_INOUT_FLAG + * - USB_LSOF_FLAG + * - USB_SOF_FLAG + * - USB_RST_FLAG + * - USB_SP_FLAG + * - USB_WK_FLAG + * - USB_BE_FLAG + * - USB_UCFOR_FLAG + * - USB_TC_FLAG + * @retval none + */ +void usb_flag_clear(usbd_type *usbx, uint16_t flag) +{ + usbx->intsts = ~flag; +} + /** * @} */ diff --git a/libraries/drivers/src/at32f413_wdt.c b/libraries/drivers/src/at32f413_wdt.c index 98f716f..3a37452 100644 --- a/libraries/drivers/src/at32f413_wdt.c +++ b/libraries/drivers/src/at32f413_wdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_wdt.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the wdt firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_wwdt.c b/libraries/drivers/src/at32f413_wwdt.c index db545ff..b203f90 100644 --- a/libraries/drivers/src/at32f413_wwdt.c +++ b/libraries/drivers/src/at32f413_wwdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_wwdt.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the wwdt firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -73,7 +73,7 @@ void wwdt_divider_set(wwdt_division_type division) */ void wwdt_flag_clear(void) { - WWDT->sts_bit.rldf = FALSE; + WWDT->sts = 0; } /** diff --git a/middlewares/i2c_application_library/i2c_application.c b/middlewares/i2c_application_library/i2c_application.c index 2f9a46b..a3b7c20 100644 --- a/middlewares/i2c_application_library/i2c_application.c +++ b/middlewares/i2c_application_library/i2c_application.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file i2c_application.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief the driver library of the i2c peripheral ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/i2c_application_library/i2c_application.h b/middlewares/i2c_application_library/i2c_application.h index 3889b32..ff37b7b 100644 --- a/middlewares/i2c_application_library/i2c_application.h +++ b/middlewares/i2c_application_library/i2c_application.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file i2c_application.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief i2c application libray header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_class.c b/middlewares/usbd_class/audio/audio_class.c index e094844..4e65ffa 100644 --- a/middlewares/usbd_class/audio/audio_class.c +++ b/middlewares/usbd_class/audio/audio_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb audio class type ************************************************************************** * Copyright notice & Disclaimer @@ -190,11 +190,11 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) } break; case USB_STD_REQ_GET_INTERFACE: - audio_get_interface(pudev, setup); + audio_get_interface(udev, setup); break; case USB_STD_REQ_SET_INTERFACE: - audio_set_interface(pudev, setup); + audio_set_interface(udev, setup); usbd_ctrl_send_status(pudev); break; @@ -302,7 +302,6 @@ usb_sts_type class_ept0_rx_handler(void *udev) usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; - usbd_core_type *pudev = (usbd_core_type *)udev; uint32_t len = 0; /* ...user code... @@ -311,13 +310,13 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) if((ept_num & 0x7F) == (USBD_AUDIO_MIC_IN_EPT & 0x7F)) { len = audio_codec_mic_get_data(audio_struct.audio_mic_data); - usbd_ept_send(pudev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + usbd_ept_send(udev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); } else if((ept_num & 0x7F) == (USBD_AUDIO_FEEDBACK_EPT & 0x7F)) { len = audio_codec_spk_feedback(audio_struct.audio_feed_back); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + usbd_ept_send(udev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); } return status; @@ -411,22 +410,26 @@ void audio_req_get_cur(void *udev, usb_setup_type *setup) { if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) { - usbd_ctrl_send(pudev, &audio_struct.spk_mute, setup->wLength); + audio_struct.g_audio_cur[0] = audio_struct.spk_mute; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } else { - usbd_ctrl_send(pudev, (uint8_t *)&audio_struct.spk_volume, setup->wLength); + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } } else { if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) { - usbd_ctrl_send(pudev, &audio_struct.mic_mute, setup->wLength); + audio_struct.g_audio_cur[0] = audio_struct.mic_mute; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } else { - usbd_ctrl_send(pudev, (uint8_t *)&audio_struct.mic_volume, setup->wLength); + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } } @@ -482,11 +485,13 @@ void audio_req_get_min(void *udev, usb_setup_type *setup) usbd_core_type *pudev = (usbd_core_type *)udev; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - usbd_ctrl_send(pudev, (uint8_t *)&audio_struct.spk_volume_limits[0], setup->wLength); + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[0]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } else { - usbd_ctrl_send(pudev, (uint8_t *)&audio_struct.mic_volume_limits[0], setup->wLength); + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[0]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } } @@ -501,11 +506,13 @@ void audio_req_get_max(void *udev, usb_setup_type *setup) usbd_core_type *pudev = (usbd_core_type *)udev; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - usbd_ctrl_send(pudev, (uint8_t *)&audio_struct.spk_volume_limits[1], setup->wLength); + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[1]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } else { - usbd_ctrl_send(pudev, (uint8_t *)&audio_struct.mic_volume_limits[1], setup->wLength); + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[1]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } } @@ -520,11 +527,13 @@ void audio_req_get_res(void *udev, usb_setup_type *setup) usbd_core_type *pudev = (usbd_core_type *)udev; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - usbd_ctrl_send(pudev, (uint8_t *)&audio_struct.spk_volume_limits[2], setup->wLength); + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[2]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } else { - usbd_ctrl_send(pudev, (uint8_t *)&audio_struct.mic_volume_limits[2], setup->wLength); + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[2]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); } } @@ -544,8 +553,9 @@ void audio_set_interface(void *udev, usb_setup_type *setup) audio_codec_spk_alt_setting(audio_struct.spk_alt_setting); if(audio_struct.spk_alt_setting ) { + int len = audio_codec_spk_feedback(audio_struct.audio_feed_back); usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, 3); + usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); } } diff --git a/middlewares/usbd_class/audio/audio_class.h b/middlewares/usbd_class/audio/audio_class.h index bacf32d..84c6ce3 100644 --- a/middlewares/usbd_class/audio/audio_class.h +++ b/middlewares/usbd_class/audio/audio_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb audio class file ************************************************************************** * Copyright notice & Disclaimer @@ -58,11 +58,11 @@ extern "C" { /** * @brief endpoint support max size */ -#define AUDIO_REMAIN_SIZE 8 +#define AUDIO_REMAIN_SIZE 40 #define AUDIO_MIC_IN_MAXPACKET_SIZE (AUDIO_SUPPORT_MAX_FREQ * AUDIO_MIC_CHANEL_NUM * (AUDIO_MIC_DEFAULT_BITW / 8) + AUDIO_REMAIN_SIZE) #define AUDIO_SPK_OUT_MAXPACKET_SIZE (AUDIO_SUPPORT_MAX_FREQ * AUDIO_SPK_CHANEL_NUM * (AUDIO_SPK_DEFAULT_BITW / 8) + AUDIO_REMAIN_SIZE) #define AUDIO_FEEDBACK_MAXPACKET_SIZE 0x3 - +#define FEEDBACK_REFRESH_TIME 0x8 /** * @brief request type define */ diff --git a/middlewares/usbd_class/audio/audio_conf.h b/middlewares/usbd_class/audio/audio_conf.h index f0a4032..7b8583f 100644 --- a/middlewares/usbd_class/audio/audio_conf.h +++ b/middlewares/usbd_class/audio/audio_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb audio config ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_desc.c b/middlewares/usbd_class/audio/audio_desc.c index 6a428f2..effe508 100644 --- a/middlewares/usbd_class/audio/audio_desc.c +++ b/middlewares/usbd_class/audio/audio_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb audio device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -78,7 +78,10 @@ usbd_desc_handler audio_desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -103,7 +106,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -361,8 +367,8 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = 0x11, /* bmAttributes: endpoint attributes */ LBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ HBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ - 0x08, /* bRefresh: this field indicates the rate at which an iso syncronization + 1, /* bInterval: interval for polling endpoint for data transfers */ + FEEDBACK_REFRESH_TIME, /* bRefresh: this field indicates the rate at which an iso syncronization pipe provides new syncronization feedback data. this rate must be a power of 2, therefore only the power is reported back and the range of this field is from 1(2ms) to 9(512ms) */ @@ -375,7 +381,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -386,7 +395,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/audio/audio_desc.h b/middlewares/usbd_class/audio/audio_desc.h index a3867fb..154347a 100644 --- a/middlewares/usbd_class/audio/audio_desc.h +++ b/middlewares/usbd_class/audio/audio_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb audio descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_conf.h b/middlewares/usbd_class/audio_hid/audio_conf.h new file mode 100644 index 0000000..50634e5 --- /dev/null +++ b/middlewares/usbd_class/audio_hid/audio_conf.h @@ -0,0 +1,92 @@ +/** + ************************************************************************** + * @file audio_conf.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief usb audio config + ************************************************************************** + * 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. + * + ************************************************************************** + */ + + /* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AUDIO_CONF_H +#define __AUDIO_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** @addtogroup AT32F413_middlewares_usbd_class + * @{ + */ + +/** @addtogroup USB_audio_hid_class + * @{ + */ + +/** @defgroup USB_device_audio_hid_config_definition + * @{ + */ +#define AUDIO_SUPPORT_SPK 1 +#define AUDIO_SUPPORT_MIC 1 +#define AUDIO_SUPPORT_FEEDBACK 1 + +#define AUDIO_SUPPORT_FREQ_16K 0 +#define AUDIO_SUPPORT_FREQ_48K 1 + + +#define AUDIO_SUPPORT_FREQ (AUDIO_SUPPORT_FREQ_16K + \ + AUDIO_SUPPORT_FREQ_48K \ + ) + +#define AUDIO_FREQ_16K 16000 +#define AUDIO_FREQ_48K 48000 +#define AUDIO_BITW_16 16 + +#define AUDIO_MIC_CHANEL_NUM 2 +#define AUDIO_MIC_DEFAULT_BITW AUDIO_BITW_16 + +#define AUDIO_SPK_CHANEL_NUM 2 +#define AUDIO_SPK_DEFAULT_BITW AUDIO_BITW_16 + + +#define AUDIO_SUPPORT_MAX_FREQ 48 +#define AUDIO_DEFAULT_FREQ AUDIO_FREQ_48K +#define AUDIO_DEFAULT_BITW AUDIO_BITW_16 + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif + + + diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.c b/middlewares/usbd_class/audio_hid/audio_hid_class.c new file mode 100644 index 0000000..f17d217 --- /dev/null +++ b/middlewares/usbd_class/audio_hid/audio_hid_class.c @@ -0,0 +1,846 @@ +/** + ************************************************************************** + * @file audio_class.c + * @version v2.0.2 + * @date 2021-12-31 + * @brief usb audio class type + ************************************************************************** + * 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. + * + ************************************************************************** + */ +#include "usbd_core.h" +#include "audio_hid_class.h" +#include "audio_hid_desc.h" +#include "audio_codec.h" + +/** @addtogroup AT32F413_middlewares_usbd_class + * @{ + */ + +/** @defgroup USB_audio_hid_class + * @brief usb device class audio hid demo + * @{ + */ + +/** @defgroup USB_audio_hid_class_private_functions + * @{ + */ + +usb_sts_type class_init_handler(void *udev); +usb_sts_type class_clear_handler(void *udev); +usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +usb_sts_type class_ept0_tx_handler(void *udev); +usb_sts_type class_ept0_rx_handler(void *udev); +usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +usb_sts_type class_sof_handler(void *udev); +usb_sts_type class_event_handler(void *udev, usbd_event_type event); + +void audio_req_get_cur(void *udev, usb_setup_type *setup); +void audio_req_set_cur(void *udev, usb_setup_type *setup); +void audio_req_get_min(void *udev, usb_setup_type *setup); +void audio_req_get_max(void *udev, usb_setup_type *setup); +void audio_req_get_res(void *udev, usb_setup_type *setup); +void audio_get_interface(void *udev, usb_setup_type *setup); +void audio_set_interface(void *udev, usb_setup_type *setup); +void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len); +/* usb hid rx and tx buffer */ +static uint8_t g_rxhid_buff[USBD_OUT_MAXPACKET_SIZE]; +static uint8_t g_txhid_buff[USBD_IN_MAXPACKET_SIZE]; + +usb_audio_type audio_struct = {0, 0, 0, 0, 0, 0x1400, 0, 0, 0, {0x0000, 0x1400, 0x33}, {0x0000, 0x1400, 0x33}}; +/* custom hid static variable */ +static uint32_t hid_protocol = 0; +static uint32_t hid_set_idle = 0; +static uint32_t alt_setting = 0; +static uint8_t hid_state; +uint8_t hid_set_report[64]; +static __IO uint16_t audio_feedback_state = 0; +static __IO uint8_t audio_spk_out_stage = 0; +/* usb device class handler */ +usbd_class_handler audio_hid_class_handler = +{ + class_init_handler, + class_clear_handler, + class_setup_handler, + class_ept0_tx_handler, + class_ept0_rx_handler, + class_in_handler, + class_out_handler, + class_sof_handler, + class_event_handler, +}; + +/** + * @brief initialize usb custom hid endpoint + * @param udev: usb device core handler type + * @retval status of usb_sts_type + */ +usb_sts_type class_init_handler(void *udev) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + + /* enable microphone in endpoint double buffer mode */ + usbd_ept_dbuffer_enable(pudev, USBD_AUDIO_MIC_IN_EPT); + + /* open microphone in endpoint */ + usbd_ept_open(pudev, USBD_AUDIO_MIC_IN_EPT, EPT_ISO_TYPE, AUDIO_MIC_IN_MAXPACKET_SIZE); + + /* enable speaker out endpoint double buffer mode */ + usbd_ept_dbuffer_enable(pudev, USBD_AUDIO_SPK_OUT_EPT); + + /* open speaker out endpoint */ + usbd_ept_open(pudev, USBD_AUDIO_SPK_OUT_EPT, EPT_ISO_TYPE, AUDIO_SPK_OUT_MAXPACKET_SIZE); +#if AUDIO_SUPPORT_FEEDBACK + /* enable speaker feedback endpoint double buffer mode */ + usbd_ept_dbuffer_enable(pudev, USBD_AUDIO_FEEDBACK_EPT); + + /* open speaker feedback endpoint */ + usbd_ept_open(pudev, USBD_AUDIO_FEEDBACK_EPT, EPT_ISO_TYPE, AUDIO_FEEDBACK_MAXPACKET_SIZE); +#endif + /* start receive speaker out data */ + usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + + /*open hid endpoint */ + + /* open custom hid in endpoint */ + usbd_ept_open(pudev, USBD_HID_IN_EPT, EPT_INT_TYPE, USBD_IN_MAXPACKET_SIZE); + + /* open custom hid out endpoint */ + usbd_ept_open(pudev, USBD_HID_OUT_EPT, EPT_INT_TYPE, USBD_OUT_MAXPACKET_SIZE); + + /* set out endpoint to receive status */ + usbd_ept_recv(pudev, USBD_HID_OUT_EPT, g_rxhid_buff, USBD_OUT_MAXPACKET_SIZE); + + return status; +} + +/** + * @brief clear endpoint or other state + * @param udev: usb device core handler type + * @retval status of usb_sts_type + */ +usb_sts_type class_clear_handler(void *udev) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + + /* close in endpoint */ + usbd_ept_close(pudev, USBD_AUDIO_MIC_IN_EPT); + +#if AUDIO_SUPPORT_FEEDBACK + /* close in endpoint */ + usbd_ept_close(pudev, USBD_AUDIO_FEEDBACK_EPT); +#endif + + /* close out endpoint */ + usbd_ept_close(pudev, USBD_AUDIO_SPK_OUT_EPT); + + /* close custom hid in endpoint */ + usbd_ept_close(pudev, USBD_HID_IN_EPT); + + /* close custom hid out endpoint */ + usbd_ept_close(pudev, USBD_HID_OUT_EPT); + + return status; +} + +/** + * @brief usb device class setup request handler + * @param udev: usb device core handler type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +usb_sts_type class_audio_setup_handler(void *udev, usb_setup_type *setup) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + uint16_t len; + + switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) + { + /* class request */ + case USB_REQ_TYPE_CLASS: + switch(setup->bRequest) + { + case AUDIO_REQ_GET_CUR: + audio_req_get_cur(pudev, setup); + break; + + case AUDIO_REQ_SET_CUR: + audio_req_set_cur(pudev, setup); + break; + + case AUDIO_REQ_GET_MIN: + audio_req_get_min(pudev, setup); + break; + + case AUDIO_REQ_GET_MAX: + audio_req_get_max(pudev, setup); + break; + + case AUDIO_REQ_GET_RES: + audio_req_get_res(pudev, setup); + break; + + default: + usbd_ctrl_unsupport(pudev); + break; + } + break; + /* standard request */ + case USB_REQ_TYPE_STANDARD: + switch(setup->bRequest) + { + case USB_STD_REQ_GET_DESCRIPTOR: + if((setup->wValue >> 8) == AUDIO_DESCRIPTOR_TYPE) + { + len = MIN(AUDIO_DESCRIPTOR_SIZE, setup->wLength); + usbd_ctrl_send(pudev, g_usbd_configuration+18, len); + } + else + { + usbd_ctrl_unsupport(pudev); + } + break; + case USB_STD_REQ_GET_INTERFACE: + audio_get_interface(udev, setup); + break; + + case USB_STD_REQ_SET_INTERFACE: + audio_set_interface(udev, setup); + usbd_ctrl_send_status(pudev); + break; + + default: + break; + } + break; + + default: + usbd_ctrl_unsupport(pudev); + break; + } + return status; + +} + +/** + * @brief usb device class setup request handler + * @param udev: usb device core handler type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + uint16_t len; + uint8_t *buf; + + switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) + { + /* class request */ + case USB_REQ_TYPE_CLASS: + switch(setup->bRequest) + { + case HID_REQ_SET_PROTOCOL: + hid_protocol = (uint8_t)setup->wValue; + break; + case HID_REQ_GET_PROTOCOL: + usbd_ctrl_send(pudev, (uint8_t *)&hid_protocol, 1); + break; + case HID_REQ_SET_IDLE: + hid_set_idle = (uint8_t)(setup->wValue >> 8); + break; + case HID_REQ_GET_IDLE: + usbd_ctrl_send(pudev, (uint8_t *)&hid_set_idle, 1); + break; + case HID_REQ_SET_REPORT: + hid_state = HID_REQ_SET_REPORT; + usbd_ctrl_recv(pudev, hid_set_report, setup->wLength); + break; + default: + usbd_ctrl_unsupport(pudev); + break; + } + break; + /* standard request */ + case USB_REQ_TYPE_STANDARD: + switch(setup->bRequest) + { + case USB_STD_REQ_GET_DESCRIPTOR: + if(setup->wValue >> 8 == HID_REPORT_DESC) + { + len = MIN(USBD_HID_SIZ_REPORT_DESC, setup->wLength); + buf = (uint8_t *)g_usbd_hid_report; + } + else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE) + { + len = MIN(9, setup->wLength); + buf = (uint8_t *)g_hid_usb_desc; + } + usbd_ctrl_send(pudev, (uint8_t *)buf, len); + break; + case USB_STD_REQ_GET_INTERFACE: + usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + break; + case USB_STD_REQ_SET_INTERFACE: + alt_setting = setup->wValue; + break; + default: + break; + } + break; + default: + usbd_ctrl_unsupport(pudev); + break; + } + return status; +} +/** + * @brief usb device class setup request handler + * @param udev: usb device core handler type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + switch(setup->bmRequestType & USB_REQ_RECIPIENT_MASK) + { + case USB_REQ_RECIPIENT_INTERFACE: + if(setup->wIndex == HID_INTERFACE_NUMBER) + { + class_hid_setup_handler(udev, setup); + } + else + { + class_audio_setup_handler(pudev, setup); + } + break; + case USB_REQ_RECIPIENT_ENDPOINT: + class_audio_setup_handler(pudev, setup); + break; + + } + return status; + + +} + +/** + * @brief usb device endpoint 0 in status stage complete + * @param udev: usb device core handler type + * @retval status of usb_sts_type + */ +usb_sts_type class_ept0_tx_handler(void *udev) +{ + usb_sts_type status = USB_OK; + + /* ...user code... */ + + return status; +} + +/** + * @brief usb device endpoint 0 out status stage complete + * @param udev: usb device core handler type + * @retval status of usb_sts_type + */ +usb_sts_type class_ept0_rx_handler(void *udev) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_setup_type *setup = &pudev->setup; + uint32_t recv_len = usbd_get_recv_len(pudev, 0); + + /* ...user code... */ + if(setup->wIndex == HID_INTERFACE_NUMBER) + { + if( hid_state == HID_REQ_SET_REPORT) + { + /* hid buffer process */ + usb_hid_buf_process(udev, hid_set_report, recv_len); + hid_state = 0; + } + } + else + { + /* ...user code... */ + if( audio_struct.audio_cmd == AUDIO_REQ_SET_CUR) + { + /* class process */ + switch(audio_struct.request_no) + { + case AUDIO_VOLUME_CONTROL: + if(audio_struct.interface == AUDIO_SPK_FEATURE_UNIT_ID) + { + audio_struct.spk_volume = (uint16_t)(audio_struct.g_audio_cur[0] | + (audio_struct.g_audio_cur[1] << 8)); + /* set volume */ + audio_codec_set_spk_volume(audio_struct.spk_volume*100/audio_struct.spk_volume_limits[1]); + } + else + { + audio_struct.mic_volume = (uint16_t)(audio_struct.g_audio_cur[0] | + (audio_struct.g_audio_cur[1] << 8)); + + audio_codec_set_mic_volume(audio_struct.mic_volume*256/audio_struct.mic_volume_limits[1]); + } + break; + case AUDIO_MUTE_CONTROL: + if(audio_struct.interface == AUDIO_SPK_FEATURE_UNIT_ID) + { + audio_struct.spk_mute = audio_struct.g_audio_cur[0]; + audio_codec_set_spk_mute(audio_struct.spk_mute); + } + else + { + audio_struct.mic_mute = audio_struct.g_audio_cur[0]; + audio_codec_set_mic_mute(audio_struct.mic_mute); + } + + break; + case AUDIO_FREQ_SET_CONTROL: + if(audio_struct.enpd == USBD_AUDIO_MIC_IN_EPT) + { + audio_struct.mic_freq = (audio_struct.g_audio_cur[0] | + (audio_struct.g_audio_cur[1] << 8) | + (audio_struct.g_audio_cur[2] << 16)); + audio_codec_set_mic_freq(audio_struct.mic_freq); + } + else + { + audio_struct.spk_freq = (audio_struct.g_audio_cur[0] | + (audio_struct.g_audio_cur[1] << 8) | + (audio_struct.g_audio_cur[2] << 16)); + audio_codec_set_spk_freq(audio_struct.spk_freq); + } + break; + default: + break; + } + } + } + + return status; +} + +/** + * @brief usb device transmision complete handler + * @param udev: usb device core handler type + * @param ept_num: endpoint number + * @retval status of usb_sts_type + */ +usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +{ + usb_sts_type status = USB_OK; + uint32_t len = 0; + + /* ...user code... + trans next packet data + */ + if((ept_num & 0x7F) == (USBD_AUDIO_MIC_IN_EPT & 0x7F)) + { + len = audio_codec_mic_get_data(audio_struct.audio_mic_data); + usbd_ept_send(udev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + } +#if AUDIO_SUPPORT_FEEDBACK + else if((ept_num & 0x7F) == (USBD_AUDIO_FEEDBACK_EPT & 0x7F)) + { + len = audio_codec_spk_feedback(audio_struct.audio_feed_back); + usbd_ept_send(udev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + } +#endif + else if((ept_num & 0x7F) == (USBD_HID_IN_EPT & 0x7F)) + { + + } + + return status; +} + +/** + * @brief usb device endpoint receive data + * @param udev: usb device core handler type + * @param ept_num: endpoint number + * @retval status of usb_sts_type + */ +usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + uint16_t g_rxlen; + + /* get endpoint receive data length */ + g_rxlen = usbd_get_recv_len(pudev, ept_num); + + if((ept_num & 0x7F) == (USBD_AUDIO_SPK_OUT_EPT & 0x7F)) + { + /* speaker data*/ + audio_codec_spk_fifo_write(audio_struct.audio_spk_data, g_rxlen); + + /* get next data */ + usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + } + else if((ept_num & 0x7F) == (USBD_HID_OUT_EPT & 0x7F)) + { + /* hid buffer process */ + usb_hid_buf_process(udev, g_rxhid_buff, g_rxlen); + + /* start receive next packet */ + usbd_ept_recv(pudev, USBD_HID_OUT_EPT, g_rxhid_buff, USBD_OUT_MAXPACKET_SIZE); + } + return status; +} + +/** + * @brief usb device sof handler + * @param udev: usb device core handler type + * @retval status of usb_sts_type + */ +usb_sts_type class_sof_handler(void *udev) +{ + usb_sts_type status = USB_OK; + + /* ...user code... */ + + return status; +} + +/** + * @brief usb device event handler + * @param udev: usb device core handler type + * @param event: usb device event + * @retval status of usb_sts_type + */ +usb_sts_type class_event_handler(void *udev, usbd_event_type event) +{ + usb_sts_type status = USB_OK; + switch(event) + { + case USBD_RESET_EVENT: + + /* ...user code... */ + + break; + case USBD_SUSPEND_EVENT: + audio_struct.spk_alt_setting = 0; + audio_codec_spk_alt_setting(audio_struct.spk_alt_setting); + audio_struct.mic_alt_setting = 0; + audio_codec_mic_alt_setting(audio_struct.spk_alt_setting); + /* ...user code... */ + + break; + case USBD_WAKEUP_EVENT: + /* ...user code... */ + + break; + default: + break; + } + return status; +} + +/** + * @brief usb audio request get cur + * @param udev: usb device core handler type + * @param setup: setup class + * @retval none + */ +void audio_req_get_cur(void *udev, usb_setup_type *setup) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) + { + if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) + { + audio_struct.g_audio_cur[0] = audio_struct.spk_mute; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } + else + { + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } + } + else + { + if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) + { + audio_struct.g_audio_cur[0] = audio_struct.mic_mute; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } + else + { + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } + + } +} + +/** + * @brief usb audio request set cur + * @param udev: usb device core handler type + * @param setup: setup class + * @retval none + */ +void audio_req_set_cur(void *udev, usb_setup_type *setup) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + if(setup->wLength > 0) + { + usbd_ctrl_recv(pudev, audio_struct.g_audio_cur, setup->wLength); + + audio_struct.audio_cmd = AUDIO_REQ_SET_CUR; + audio_struct.audio_cmd_len = setup->wLength; + + switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK) + { + case AUDIO_REQ_CONTROL_INTERFACE: + audio_struct.interface = HBYTE(setup->wIndex); + if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) + { + audio_struct.request_no = AUDIO_MUTE_CONTROL; + } + else + { + audio_struct.request_no = AUDIO_VOLUME_CONTROL; + } + break; + case AUDIO_REQ_CONTROL_ENDPOINT: + audio_struct.enpd = setup->wIndex; + audio_struct.request_no = AUDIO_FREQ_SET_CONTROL; + break; + default: + break; + } + } +} + +/** + * @brief usb audio request get min + * @param udev: usb device core handler type + * @param setup: setup class + * @retval none + */ +void audio_req_get_min(void *udev, usb_setup_type *setup) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) + { + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[0]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } + else + { + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[0]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } +} + +/** + * @brief usb audio request get max + * @param udev: usb device core handler type + * @param setup: setup class + * @retval none + */ +void audio_req_get_max(void *udev, usb_setup_type *setup) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) + { + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[1]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } + else + { + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[1]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } +} + +/** + * @brief usb audio request get res + * @param udev: usb device core handler type + * @param setup: setup class + * @retval none + */ +void audio_req_get_res(void *udev, usb_setup_type *setup) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) + { + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[2]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } + else + { + *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[2]; + usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + } +} + +/** + * @brief usb audio set interface + * @param udev: usb device core handler type + * @param setup: setup class + * @retval none + */ +void audio_set_interface(void *udev, usb_setup_type *setup) +{ + uint32_t len; + usbd_core_type *pudev = (usbd_core_type *)udev; + if(LBYTE(setup->wIndex) == AUDIO_SPK_INTERFACE_NUMBER) + { + audio_struct.spk_alt_setting = setup->wValue; + audio_codec_spk_alt_setting(audio_struct.spk_alt_setting); + if(audio_struct.spk_alt_setting ) + { + int len = audio_codec_spk_feedback(audio_struct.audio_feed_back); + usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + } + + } + else if(LBYTE(setup->wIndex) == AUDIO_MIC_INTERFACE_NUMBER) + { + audio_struct.mic_alt_setting = setup->wValue; + audio_codec_mic_alt_setting(audio_struct.mic_alt_setting); + if(audio_struct.mic_alt_setting) + { + len = audio_codec_mic_get_data(audio_struct.audio_mic_data); + usbd_ept_send(pudev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + } + } + +} + + +/** + * @brief usb audio get interface + * @param udev: usb device core handler type + * @param setup: setup class + * @retval none + */ +void audio_get_interface(void *udev, usb_setup_type *setup) +{ + if(LBYTE(setup->wIndex) == AUDIO_SPK_INTERFACE_NUMBER) + { + usbd_ctrl_send((usbd_core_type *)udev, (uint8_t *)&audio_struct.spk_alt_setting, 1); + } + else if(LBYTE(setup->wIndex) == AUDIO_MIC_INTERFACE_NUMBER) + { + usbd_ctrl_send((usbd_core_type *)udev, (uint8_t *)&audio_struct.mic_alt_setting, 1); + } + +} + +/** + * @brief usb device class send report + * @param udev: to the structure of usbd_core_type + * @param report: report buffer + * @param len: report length + * @retval status of usb_sts_type + */ +usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + + if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) + usbd_ept_send(pudev, USBD_HID_IN_EPT, report, len); + + return status; +} + + +/** + * @brief usb device report function + * @param udev: to the structure of usbd_core_type + * @param report: report buffer + * @param len: report length + * @retval none + */ +void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) +{ + uint32_t i_index; + usbd_core_type *pudev = (usbd_core_type *)udev; + + switch(report[0]) + { + case HID_REPORT_ID_2: + if(g_rxhid_buff[1] == 0) + { + at32_led_off(LED2); + } + else + { + at32_led_on(LED2); + } + break; + case HID_REPORT_ID_3: + if(g_rxhid_buff[1] == 0) + { + at32_led_off(LED3); + } + else + { + at32_led_on(LED3); + } + break; + case HID_REPORT_ID_4: + if(g_rxhid_buff[1] == 0) + { + at32_led_off(LED4); + } + else + { + at32_led_on(LED4); + } + break; + case HID_REPORT_ID_6: + for(i_index = 0; i_index < len; i_index ++) + { + g_txhid_buff[i_index] = report[i_index]; + } + usbd_ept_send(pudev, USBD_HID_IN_EPT, g_txhid_buff, len); + default: + break; + } + +} + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + + diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.h b/middlewares/usbd_class/audio_hid/audio_hid_class.h new file mode 100644 index 0000000..7a953ac --- /dev/null +++ b/middlewares/usbd_class/audio_hid/audio_hid_class.h @@ -0,0 +1,170 @@ +/** + ************************************************************************** + * @file audio_class.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief usb audio class file + ************************************************************************** + * 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. + * + ************************************************************************** + */ + + /* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AUDIO_CLASS_H +#define __AUDIO_CLASS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "usb_std.h" +#include "usbd_core.h" +#include "audio_conf.h" + +/** @addtogroup AT32F413_middlewares_usbd_class + * @{ + */ + +/** @addtogroup USB_audio_hid_class + * @{ + */ + +/** @defgroup USB_audio_hid_class_definition + * @{ + */ + +/** + * @brief endpoint define + */ +#define USBD_AUDIO_MIC_IN_EPT 0x81 +#define USBD_AUDIO_SPK_OUT_EPT 0x02 +#define USBD_AUDIO_FEEDBACK_EPT 0x83 + +/** + * @brief usb custom hid use endpoint define + */ +#define USBD_HID_IN_EPT 0x84 +#define USBD_HID_OUT_EPT 0x05 + +/** + * @brief usb custom hid in and out max packet size define + */ +#define USBD_IN_MAXPACKET_SIZE 0x40 +#define USBD_OUT_MAXPACKET_SIZE 0x40 + +/** + * @brief endpoint support max size + */ +#define AUDIO_REMAIN_SIZE 40 +#define AUDIO_MIC_IN_MAXPACKET_SIZE (AUDIO_SUPPORT_MAX_FREQ * AUDIO_MIC_CHANEL_NUM * (AUDIO_MIC_DEFAULT_BITW / 8) + AUDIO_REMAIN_SIZE) +#define AUDIO_SPK_OUT_MAXPACKET_SIZE (AUDIO_SUPPORT_MAX_FREQ * AUDIO_SPK_CHANEL_NUM * (AUDIO_SPK_DEFAULT_BITW / 8) + AUDIO_REMAIN_SIZE) +#define AUDIO_FEEDBACK_MAXPACKET_SIZE 0x3 +#define FEEDBACK_REFRESH_TIME 0x8 +/** + * @brief request type define + */ +#define AUDIO_REQ_CONTROL_INTERFACE 0x01 +#define AUDIO_REQ_CONTROL_ENDPOINT 0x02 +#define AUDIO_REQ_CONTROL_MASK 0x03 + +/** + * @brief audio set cur type define + */ +#define AUDIO_MUTE_CONTROL 0x01 +#define AUDIO_VOLUME_CONTROL 0x02 +#define AUDIO_FREQ_SET_CONTROL 0x03 + +/** + * @brief audio descriptor type + */ + +/** + * @brief audio set cur type define + */ +#define AUDIO_MUTE_CONTROL 0x01 +#define AUDIO_VOLUME_CONTROL 0x02 +#define AUDIO_FREQ_SET_CONTROL 0x03 + +/** + * @brief audio descriptor type + */ +#define AUDIO_DESCRIPTOR_TYPE 0x21 +#define AUDIO_DESCRIPTOR_SIZE 0x09 + +/** + * @brief usb custom hid class request code define + */ +#define HID_REQ_SET_PROTOCOL 0x0B +#define HID_REQ_GET_PROTOCOL 0x03 +#define HID_REQ_SET_IDLE 0x0A +#define HID_REQ_GET_IDLE 0x02 +#define HID_REQ_SET_REPORT 0x09 +#define HID_REQ_GET_REPORT 0x01 +#define HID_DESCRIPTOR_TYPE 0x21 +#define HID_REPORT_DESC 0x22 + + +/** + * @brief usb audio control struct + */ +typedef struct +{ + uint8_t enpd; + uint8_t interface; + uint8_t request_no; + uint8_t spk_mute; + uint8_t mic_mute; + uint16_t spk_volume; + uint16_t mic_volume; + uint32_t spk_freq; + uint32_t mic_freq; + uint16_t spk_volume_limits[3]; /*[0] is mininum value, [1] is maxnum value, [2] is volume resolution */ + uint16_t mic_volume_limits[3]; /*[0] is mininum value, [1] is maxnum value, [2] is volume resolution */ + + uint8_t audio_cmd; + uint32_t audio_cmd_len; + uint32_t spk_alt_setting; + uint32_t mic_alt_setting; + uint8_t g_audio_cur[64]; + uint8_t audio_spk_data[AUDIO_SPK_OUT_MAXPACKET_SIZE]; + uint8_t audio_mic_data[AUDIO_MIC_IN_MAXPACKET_SIZE]; + uint8_t audio_feed_back[AUDIO_FEEDBACK_MAXPACKET_SIZE+1]; +}usb_audio_type; + +extern usbd_class_handler audio_hid_class_handler; + +usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.c b/middlewares/usbd_class/audio_hid/audio_hid_desc.c new file mode 100644 index 0000000..bcfcd9e --- /dev/null +++ b/middlewares/usbd_class/audio_hid/audio_hid_desc.c @@ -0,0 +1,786 @@ +/** + ************************************************************************** + * @file audio_desc.c + * @version v2.0.2 + * @date 2021-12-31 + * @brief usb audio device descriptor + ************************************************************************** + * 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. + * + ************************************************************************** + */ +#include "usb_std.h" +#include "usbd_sdr.h" +#include "usbd_core.h" +#include "audio_hid_desc.h" + +/** @addtogroup AT32F413_middlewares_usbd_class + * @{ + */ + +/** @defgroup USB_audio_hid_desc + * @brief usb device audio hid descriptor + * @{ + */ + +/** @defgroup USB_audio_hid_desc_private_functions + * @{ + */ + + +usbd_desc_t *get_device_descriptor(void); +usbd_desc_t *get_device_qualifier(void); +usbd_desc_t *get_device_configuration(void); +usbd_desc_t *get_device_other_speed(void); +usbd_desc_t *get_device_lang_id(void); +usbd_desc_t *get_device_manufacturer_string(void); +usbd_desc_t *get_device_product_string(void); +usbd_desc_t *get_device_serial_string(void); +usbd_desc_t *get_device_interface_string(void); +usbd_desc_t *get_device_config_string(void); + +uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); +static void get_serial_num(void); +static uint8_t g_usbd_desc_buffer[256]; + +/** + * @brief device descriptor handler structure + */ +usbd_desc_handler audio_hid_desc_handler = +{ + get_device_descriptor, + get_device_qualifier, + get_device_configuration, + get_device_other_speed, + get_device_lang_id, + get_device_manufacturer_string, + get_device_product_string, + get_device_serial_string, + get_device_interface_string, + get_device_config_string, +}; + +/** + * @brief usb device standard descriptor + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +{ + USB_DEVICE_DESC_LEN, /* bLength */ + USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ + 0x00, /* bcdUSB */ + 0x02, + 0x00, /* bDeviceClass */ + 0x00, /* bDeviceSubClass */ + 0x00, /* bDeviceProtocol */ + USB_MAX_EP0_SIZE, /* bMaxPacketSize */ + LBYTE(USBD_VENDOR_ID), /* idVendor */ + HBYTE(USBD_VENDOR_ID), /* idVendor */ + LBYTE(USBD_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_PRODUCT_ID), /* idProduct */ + 0x00, /* bcdDevice rel. 2.00 */ + 0x02, + USB_MFC_STRING, /* Index of manufacturer string */ + USB_PRODUCT_STRING, /* Index of product string */ + USB_SERIAL_STRING, /* Index of serial number string */ + 0x01 /* bNumConfigurations */ +}; + +/** + * @brief usb configuration standard descriptor + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +{ + USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ + USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ + LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + 0x1 + AUDIO_INTERFACE_NUM + 0x1, /* bNumInterfaces: n interface */ + 0x01, /* bConfigurationValue: configuration value */ + 0x00, /* iConfiguration: index of string descriptor describing + the configuration */ + 0xC0, /* bmAttributes: self powered */ + 0x32, /* MaxPower 100 mA: this current is used for detecting vbus */ + + USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + 0x00, /* bInterfaceNumber: number of interface */ + 0x00, /* bAlternateSetting: alternate set */ + 0x00, /* bNumEndpoints: number of endpoints */ + USB_CLASS_CODE_AUDIO, /* bInterfaceClass: audio class code */ + AUDIO_SUBCLASS_AUDIOCONTROL, /* bInterfaceSubClass: audio control */ + AUDIO_PROTOCOL_UNDEFINED, /* bInterfaceProtocol: undefined */ + 0x00, /* iInterface: index of string descriptor */ + + 0x08+AUDIO_INTERFACE_NUM, /* bLength: size of this descriptor, in bytes 8+n */ + AUDIO_CS_INTERFACE, /* bDescriptorType: cs interface descriptor type */ + AUDIO_AC_HEADER, /* bDescriptorSubtype: Header function Descriptor*/ + LBYTE(BCD_NUM), + HBYTE(BCD_NUM), /* bcdCDC: audio device class specification release number */ + LBYTE(AUDIO_INTERFACE_LEN), + HBYTE(AUDIO_INTERFACE_LEN), /* wTotalLength: total number of bytes returned for the class-specific audio control interface */ + AUDIO_INTERFACE_NUM, /* bInClollection: the number of audio streaming */ +#if (AUDIO_INTERFACE_NUM == 2) /* two interface */ + 0x02, + 0x01, +#else + 0x01, +#endif + + /* usb microphone config */ +#if (AUDIO_SUPPORT_MIC == 1) + AUDIO_INPUT_TERMINAL_SIZE, /* bLength: descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: configuration */ + AUDIO_AC_INPUT_TERMINAL, /* bDescriptorSubtype: input_terminal type*/ + AUDIO_MIC_INPUT_TERMINAL_ID, /* bTerminalID: id of this input terminal*/ + LBYTE(AUDIO_INPUT_TERMINAL_MICROPHONE), + HBYTE(AUDIO_INPUT_TERMINAL_MICROPHONE),/* wTerminalType: terminal is microphone */ + 0x00, /* bAssocTerminal: no association */ + AUDIO_MIC_CHR, /* bNrChannels: two channel */ +#if (AUDIO_MIC_CHR == 2) + 0x03, /* wChannelConfig: left front and right front */ +#endif +#if (AUDIO_MIC_CHR == 1) + 0x00, /* wChannelConfig */ +#endif + 0x00, /* wChannelConfig */ + 0x00, /* iChannelNames: unused */ + 0x00, /* iTerminal: unused */ + + AUDIO_FEATURE_UNIT_SIZE, /* bLength: descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: configuration */ + AUDIO_AC_FEATURE_UNIT, /* bDescriptorSubtype: feature unit type*/ + AUDIO_MIC_FEATURE_UNIT_ID, /* bUnitID: id of this feature unit */ + AUDIO_MIC_INPUT_TERMINAL_ID, /* bSourceID: from input terminal */ + 0x01, /* bControlSize: 1 byte */ + 0x01, /* bmaControls0: mute */ + 0x02, /* bmaControls1: volume */ + 0x00, /* iFeature: unused */ + + AUDIO_OUTPUT_TERMINAL_SIZE, /* bLength: descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: configuration */ + AUDIO_AC_OUTPUT_TERMINAL, /* bDescriptorSubtype: output_terminal type*/ + AUDIO_MIC_OUTPUT_TERMINAL_ID, /* bTerminalID: id of this output terminal*/ + LBYTE(AUDIO_TERMINAL_TYPE_STREAMING), + HBYTE(AUDIO_TERMINAL_TYPE_STREAMING), /* wTerminalType: usb streaming */ + 0x00, /* bAssocTerminal: unused */ + AUDIO_MIC_FEATURE_UNIT_ID, /* bSourceID: from feature unit terminal */ + 0x00, /* iTerminal: unused */ +#endif + +#if (AUDIO_SUPPORT_SPK == 1) + /* speaker config */ + AUDIO_INPUT_TERMINAL_SIZE, /* bLength: descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: configuration */ + AUDIO_AC_INPUT_TERMINAL, /* bDescriptorSubtype: input_terminal type*/ + AUDIO_SPK_INPUT_TERMINAL_ID, /* bTerminalID: id of this input terminal*/ + LBYTE(AUDIO_TERMINAL_TYPE_STREAMING), /* wTerminalType: usb streaming */ + HBYTE(AUDIO_TERMINAL_TYPE_STREAMING), /* wTerminalType: usb streaming */ + 0x00, /* bAssocTerminal: no association */ + AUDIO_SPK_CHR, /* bNrChannels: two channel */ +#if (AUDIO_SPK_CHR == 2) + 0x03, /* wChannelConfig: left front and right front */ +#endif +#if (AUDIO_SPK_CHR == 1) + 0x00, /* wChannelConfig */ +#endif + 0x00, /* wChannelConfig */ + 0x00, /* iChannelNames: unused */ + 0x00, /* iTerminal: unused */ + + AUDIO_FEATURE_UNIT_SIZE, /* bLength: descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: configuration */ + AUDIO_AC_FEATURE_UNIT, /* bDescriptorSubtype: feature unit type*/ + AUDIO_SPK_FEATURE_UNIT_ID, /* bUnitID: id of this feature unit */ + AUDIO_SPK_INPUT_TERMINAL_ID, /* bSourceID: from input terminal */ + 0x01, /* bControlSize: 1 byte */ + 0x01, /* bmaControls0: mute*/ + 0x02, /* bmaControls1: volume */ + 0x00, /* iFeature: unused */ + + AUDIO_OUTPUT_TERMINAL_SIZE, /* bLength: descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: configuration */ + AUDIO_AC_OUTPUT_TERMINAL, /* bDescriptorSubtype: output_terminal type*/ + AUDIO_SPK_OUTPUT_TERMINAL_ID, /* bTerminalID: id of this output terminal*/ + LBYTE(AUDIO_OUTPUT_TERMINAL_SPEAKER), /* wTerminalType: usb speaker */ + HBYTE(AUDIO_OUTPUT_TERMINAL_SPEAKER), /* wTerminalType: usb speaker */ + 0x00, /* bAssocTerminal: unused */ + AUDIO_SPK_FEATURE_UNIT_ID, /* bSourceID: from feature unit terminal */ + 0x00, /* iTerminal: unused */ +#endif + +#if (AUDIO_SUPPORT_MIC == 1) + /* microphone interface */ + 0x09, /* bLength: descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + AUDIO_MIC_INTERFACE_NUMBER, /* bInterfaceNumber: index of this interface */ + 0x00, /* bAlternateSetting: index of this setting */ + 0x00, /* bNumEndpoints: 0 endpoints */ + USB_CLASS_CODE_AUDIO, /* bInterfaceClass: audio */ + AUDIO_SUBCLASS_AUDIOSTREAMING, /* bInterfaceSubclass: audio streaming */ + 0x00, /* bInterfaceProtocol: unused */ + 0x00, /* iInterface: unused */ + + 0x09, /* bLength: descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + AUDIO_MIC_INTERFACE_NUMBER, /* bInterfaceNumber: index of this interface */ + 0x01, /* bAlternateSetting: index of this setting */ + 0x01, /* bNumEndpoints: 1 endpoints */ + USB_CLASS_CODE_AUDIO, /* bInterfaceClass: audio */ + AUDIO_SUBCLASS_AUDIOSTREAMING, /* bInterfaceSubclass: audio streaming */ + 0x00, /* bInterfaceProtocol: unused */ + 0x00, /* iInterface: unused */ + + 0x07, /* bLength: configuration descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: interface descriptor type */ + AUDIO_AS_GENERAL, /* bDescriptorSubtype: general sub type*/ + AUDIO_MIC_OUTPUT_TERMINAL_ID, /* bTerminalLink: unit id of the output terminal */ + 0x01, /* bDelay: interface delay */ + 0x01, /* wFormatTag: pcm format*/ + 0x00, /* wFormatTag: pcm format*/ + + 0x08 + AUDIO_MIC_FREQ_SIZE * 3, /* bLength: descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: interface descriptor type */ + AUDIO_AS_FORMAT_TYPE, /* bDescriptorSubtype: format subtype */ + AUDIO_FORMAT_TYPE_I, /* bFormatType: format type 1 */ + AUDIO_MIC_CHR, /* bNrChannels: channel number */ + AUDIO_MIC_BITW / 8, /* bSubFrameSize: per audio subframe */ + AUDIO_MIC_BITW, /* bBitResolution: n bits per sample */ + AUDIO_MIC_FREQ_SIZE, /* bSamFreqType: n frequency supported */ +#if (AUDIO_SUPPORT_FREQ_16K == 1) + SAMPLE_FREQ(AT32_AUDIO_FREQ_16K), /* tSamFreq: 16000hz */ +#endif +#if (AUDIO_SUPPORT_FREQ_48K == 1) + SAMPLE_FREQ(AT32_AUDIO_FREQ_48K), /* tSamFreq: 48000hz */ +#endif + + 0x09, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_AUDIO_MIC_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_ISO | USB_ETP_DESC_ASYNC, /* bmAttributes: endpoint attributes */ + LBYTE(AUDIO_MIC_IN_MAXPACKET_SIZE), + HBYTE(AUDIO_MIC_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + 0x00, /* bRefresh: unused */ + 0x00, /* bSynchAddress: unused */ + + 0x07, /* bLength: size of endpoint descriptor in bytes */ + AUDIO_CS_ENDPOINT, /* bDescriptorType: cs endpoint descriptor type */ + 0x01, /* bDescriptorSubtype: general subtype */ + 0x01, /* bmAttributes */ + 0x00, /* bLockDelayUnits: unused */ + 0x00, /* wLockDelay: unused */ + 0x00, /* wLockDelay: unused */ +#endif + +#if (AUDIO_SUPPORT_SPK == 1) + /* speaker interface */ + 0x09, /* bLength: descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + AUDIO_SPK_INTERFACE_NUMBER, /* bInterfaceNumber: index of this interface */ + 0x00, /* bAlternateSetting: index of this setting */ + 0x00, /* bNumEndpoints: 0 endpoints */ + USB_CLASS_CODE_AUDIO, /* bInterfaceClass: audio */ + AUDIO_SUBCLASS_AUDIOSTREAMING, /* bInterfaceSubclass: audio streaming */ + 0x00, /* bInterfaceProtocol: unused */ + 0x00, /* iInterface: unused */ + + 0x09, /* bLength: descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + AUDIO_SPK_INTERFACE_NUMBER, /* bInterfaceNumber: index of this interface */ + 0x01, /* bAlternateSetting: index of this setting */ + 0x01 + AUDIO_SUPPORT_FEEDBACK, /* bNumEndpoints: endpoints */ + USB_CLASS_CODE_AUDIO, /* bInterfaceClass: audio */ + AUDIO_SUBCLASS_AUDIOSTREAMING, /* bInterfaceSubclass: audio streaming */ + 0x00, /* bInterfaceProtocol: unused */ + 0x00, /* iInterface: unused */ + + 0x07, /* bLength: configuration descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: interface descriptor type */ + AUDIO_AS_GENERAL, /* bDescriptorSubtype: general sub type*/ + AUDIO_SPK_INPUT_TERMINAL_ID, /* bTerminalLink: unit id of the input terminal */ + 0x01, /* bDelay: interface delay */ + 0x01, /* wFormatTag: pcm format*/ + 0x00, /* wFormatTag: pcm format*/ + + 0x08 + AUDIO_SPK_FREQ_SIZE * 3, /* bLength: descriptor size */ + AUDIO_CS_INTERFACE, /* bDescriptorType: interface descriptor type */ + AUDIO_AS_FORMAT_TYPE, /* bDescriptorSubtype: format subtype */ + AUDIO_FORMAT_TYPE_I, /* bFormatType: format type 1 */ + AUDIO_SPK_CHR, /* bNrChannels: channel number */ + AUDIO_SPK_BITW / 8, /* bSubFrameSize: per audio subframe */ + AUDIO_SPK_BITW, /* bBitResolution: n bits per sample */ + AUDIO_SPK_FREQ_SIZE, /* bSamFreqType: n frequency supported */ +#if (AUDIO_SUPPORT_FREQ_16K == 1) + SAMPLE_FREQ(AT32_AUDIO_FREQ_16K), /* tSamFreq: 16000hz */ +#endif +#if (AUDIO_SUPPORT_FREQ_48K == 1) + SAMPLE_FREQ(AT32_AUDIO_FREQ_48K), /* tSamFreq: 48000hz */ +#endif + + 0x09, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_AUDIO_SPK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_ISO | USB_ETP_DESC_ASYNC, /* bmAttributes: endpoint attributes */ + LBYTE(AUDIO_SPK_OUT_MAXPACKET_SIZE), + HBYTE(AUDIO_SPK_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + 0x00, /* bRefresh: unused */ +#if (AUDIO_SUPPORT_FEEDBACK == 1) + USBD_AUDIO_FEEDBACK_EPT, /* bSynchAddress: feedback endpoint */ +#else + 0x00, /* bSynchAddress: unused */ +#endif + + 0x07, /* bLength: size of endpoint descriptor in bytes */ + AUDIO_CS_ENDPOINT, /* bDescriptorType: cs endpoint descriptor type */ + 0x01, /* bDescriptorSubtype: general subtype */ + 0x01, /* bmAttributes */ + 0x00, /* bLockDelayUnits: unused */ + 0x00, /* wLockDelay: unused */ + 0x00, /* wLockDelay: unused */ + +#if (AUDIO_SUPPORT_FEEDBACK == 1) + 0x09, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_AUDIO_FEEDBACK_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + 0x11, /* bmAttributes: endpoint attributes */ + LBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + HBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + 1, /* bInterval: interval for polling endpoint for data transfers */ + FEEDBACK_REFRESH_TIME, /* bRefresh: this field indicates the rate at which an iso syncronization + pipe provides new syncronization feedback data. this rate must be a power of + 2, therefore only the power is reported back and the range of this field is from + 1(2ms) to 9(512ms) */ + 0x00, /* bSynchAddress: 0x00*/ +#endif + +#endif + + USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + HID_INTERFACE_NUMBER, /* bInterfaceNumber: number of interface */ + 0x00, /* bAlternateSetting: alternate set */ + 0x02, /* bNumEndpoints: number of endpoints */ + USB_CLASS_CODE_HID, /* bInterfaceClass: class code hid */ + 0x00, /* bInterfaceSubClass: subclass code */ + 0x00, /* bInterfaceProtocol: protocol code */ + 0x00, /* iInterface: index of string descriptor */ + + 0x09, /* bLength: size of HID descriptor in bytes */ + HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ + LBYTE(HID_BCD_NUM), + HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + 0x00, /* bCountryCode: hardware target conutry */ + 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ + HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ + LBYTE(sizeof(g_usbd_hid_report)), + HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + + USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_IN_MAXPACKET_SIZE), + HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + + USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_HID_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_OUT_MAXPACKET_SIZE), + HBYTE(USBD_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ +}; + +/** + * @brief usb hid report descriptor + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = +{ + 0x06, 0xFF, 0x00, /* USAGE_PAGE(Vendor Page:0xFF00) */ + 0x09, 0x01, /* USAGE (Demo Kit) */ + 0xa1, 0x01, /* COLLECTION (Application) */ + /* 7 */ + + /* Led 2 */ + 0x85, HID_REPORT_ID_2, /* REPORT_ID 2 */ + 0x09, 0x02, /* USAGE (LED 2) */ + 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ + 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ + 0x75, 0x08, /* REPORT_SIZE (8) */ + 0x95, 0x3F, /* REPORT_COUNT (1) */ + 0xB1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */ + + 0x85, 0x02, /* REPORT_ID (2) */ + 0x09, 0x02, /* USAGE (LED 2) */ + 0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */ + /* 27 */ + + /* Led 3 */ + 0x85, HID_REPORT_ID_3, /* REPORT_ID (3) */ + 0x09, 0x03, /* USAGE (LED 3) */ + 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ + 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ + 0x75, 0x08, /* REPORT_SIZE (8) */ + 0x95, 0x3F, /* REPORT_COUNT (1) */ + 0xB1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */ + + 0x85, 0x03, /* REPORT_ID (3) */ + 0x09, 0x03, /* USAGE (LED 3) */ + 0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */ + /* 47 */ + + /* Led 4 */ + 0x85, HID_REPORT_ID_4, /* REPORT_ID 4) */ + 0x09, 0x04, /* USAGE (LED 4) */ + 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ + 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ + 0x75, 0x08, /* REPORT_SIZE (8) */ + 0x95, 0x3F, /* REPORT_COUNT (1) */ + 0xB1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */ + + 0x85, 0x04, /* REPORT_ID (4) */ + 0x09, 0x04, /* USAGE (LED 4) */ + 0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */ + /* 67 */ + + /* key Push Button */ + 0x85, HID_REPORT_ID_5, /* REPORT_ID (5) */ + 0x09, 0x05, /* USAGE (Push Button) */ + 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ + 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ + 0x75, 0x01, /* REPORT_SIZE (1) */ + 0x81, 0x82, /* INPUT (Data,Var,Abs,Vol) */ + + 0x09, 0x05, /* USAGE (Push Button) */ + 0x75, 0x01, /* REPORT_SIZE (1) */ + 0xb1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */ + + 0x75, 0x07, /* REPORT_SIZE (7) */ + 0x81, 0x83, /* INPUT (Cnst,Var,Abs,Vol) */ + 0x85, 0x05, /* REPORT_ID (5) */ + + 0x75, 0x07, /* REPORT_SIZE (7) */ + 0xb1, 0x83, /* FEATURE (Cnst,Var,Abs,Vol) */ + /* 95 */ + + /* Data OUT */ + 0x85, HID_REPORT_ID_6, /* REPORT_ID (0xF0) */ + 0x09, 0x06, /* USAGE */ + 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ + 0x26, 0x00,0xff, /* LOGICAL_MAXIMUM (255) */ + 0x75, 0x08, /* REPORT_SIZE (8) */ + 0x95, 0x3F, /* REPORT_COUNT (64) */ + 0x91, 0x02, /* OUTPUT(Data,Var,Abs,Vol) */ + /* 110 */ + + /* Data IN */ + 0x85, HID_REPORT_ID_6, /* REPORT_ID (0xF0) */ + 0x09, 0x07, /* USAGE */ + 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ + 0x26, 0x00,0xff, /* LOGICAL_MAXIMUM (255) */ + 0x75, 0x08, /* REPORT_SIZE (8) */ + 0x95, 0x3F, /* REPORT_COUNT (64) */ + 0x81, 0x82, /* INPUT(Data,Var,Abs,Vol) */ + + /* 125 */ + 0xc0 /* END_COLLECTION */ +}; + +/** + * @brief usb hid descriptor + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = +{ + 0x09, /* bLength: size of HID descriptor in bytes */ + HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ + LBYTE(HID_BCD_NUM), + HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + 0x00, /* bCountryCode: hardware target conutry */ + 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ + HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ + LBYTE(sizeof(g_usbd_hid_report)), + HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ +}; + +/** + * @brief usb string lang id + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +{ + USBD_SIZ_STRING_LANGID, + USB_DESCIPTOR_TYPE_STRING, + 0x09, + 0x04, +}; + +/** + * @brief usb string serial + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +{ + USBD_SIZ_STRING_SERIAL, + USB_DESCIPTOR_TYPE_STRING, +}; + + +/* device descriptor */ +usbd_desc_t device_descriptor = +{ + USB_DEVICE_DESC_LEN, + g_usbd_descriptor +}; + +/* config descriptor */ +usbd_desc_t config_descriptor = +{ + USBD_CONFIG_DESC_SIZE, + g_usbd_configuration +}; + +/* langid descriptor */ +usbd_desc_t langid_descriptor = +{ + USBD_SIZ_STRING_LANGID, + g_string_lang_id +}; + +/* serial descriptor */ +usbd_desc_t serial_descriptor = +{ + USBD_SIZ_STRING_SERIAL, + g_string_serial +}; + +usbd_desc_t vp_desc; + +/** + * @brief standard usb unicode convert + * @param string: source string + * @param unicode_buf: unicode buffer + * @retval length + */ +uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +{ + uint16_t str_len = 0, id_pos = 2; + uint8_t *tmp_str = string; + + while(*tmp_str != '\0') + { + str_len ++; + unicode_buf[id_pos ++] = *tmp_str ++; + unicode_buf[id_pos ++] = 0x00; + } + + str_len = str_len * 2 + 2; + unicode_buf[0] = str_len; + unicode_buf[1] = USB_DESCIPTOR_TYPE_STRING; + + return str_len; +} + +/** + * @brief usb int convert to unicode + * @param value: int value + * @param pbus: unicode buffer + * @param len: length + * @retval none + */ +static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len) +{ + uint8_t idx = 0; + + for( idx = 0 ; idx < len ; idx ++) + { + if( ((value >> 28)) < 0xA ) + { + pbuf[2 * idx] = (value >> 28) + '0'; + } + else + { + pbuf[2 * idx] = (value >> 28) + 'A' - 10; + } + + value = value << 4; + + pbuf[2 * idx + 1] = 0; + } +} + +/** + * @brief usb get serial number + * @param none + * @retval none + */ +static void get_serial_num(void) +{ + uint32_t serial0, serial1, serial2; + + serial0 = *(uint32_t*)MCU_ID1; + serial1 = *(uint32_t*)MCU_ID2; + serial2 = *(uint32_t*)MCU_ID3; + + serial0 += serial2; + + if (serial0 != 0) + { + usbd_int_to_unicode (serial0, &g_string_serial[2] ,8); + usbd_int_to_unicode (serial1, &g_string_serial[18] ,4); + } +} + +/** + * @brief get device descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_descriptor(void) +{ + return &device_descriptor; +} + +/** + * @brief get device qualifier + * @param none + * @retval usbd_desc + */ +usbd_desc_t * get_device_qualifier(void) +{ + return NULL; +} + +/** + * @brief get config descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_configuration(void) +{ + return &config_descriptor; +} + +/** + * @brief get other speed descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_other_speed(void) +{ + return NULL; +} + +/** + * @brief get lang id descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_lang_id(void) +{ + return &langid_descriptor; +} + + +/** + * @brief get manufacturer descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_manufacturer_string(void) +{ + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.descriptor = g_usbd_desc_buffer; + return &vp_desc; +} + +/** + * @brief get product descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_product_string(void) +{ + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.descriptor = g_usbd_desc_buffer; + return &vp_desc; +} + +/** + * @brief get serial descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_serial_string(void) +{ + get_serial_num(); + return &serial_descriptor; +} + +/** + * @brief get interface descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_interface_string(void) +{ + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.descriptor = g_usbd_desc_buffer; + return &vp_desc; +} + +/** + * @brief get device config descriptor + * @param none + * @retval usbd_desc + */ +usbd_desc_t *get_device_config_string(void) +{ + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.descriptor = g_usbd_desc_buffer; + return &vp_desc; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.h b/middlewares/usbd_class/audio_hid/audio_hid_desc.h new file mode 100644 index 0000000..01e38ef --- /dev/null +++ b/middlewares/usbd_class/audio_hid/audio_hid_desc.h @@ -0,0 +1,266 @@ +/** + ************************************************************************** + * @file audio_desc.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief usb audio descriptor header file + ************************************************************************** + * 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. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AUDIO_DESC_H +#define __AUDIO_DESC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "audio_hid_class.h" +#include "usbd_core.h" +#include "audio_conf.h" + +/** @addtogroup AT32F413_middlewares_usbd_class + * @{ + */ + +/** @addtogroup USB_audio_hid_desc + * @{ + */ + +/** @defgroup USB_audio_hid_desc_definition + * @{ + */ + +#define BCD_NUM 0x0100 + +#define USBD_VENDOR_ID 0x2E3C +#define USBD_PRODUCT_ID 0x5730 + +#define USBD_SIZ_STRING_LANGID 4 +#define USBD_SIZ_STRING_SERIAL 0x1A + +#define USBD_DESC_MANUFACTURER_STRING "Artery" +#define USBD_DESC_PRODUCT_STRING "AT32 Audio" +#define USBD_DESC_CONFIGURATION_STRING "Audio Config" +#define USBD_DESC_INTERFACE_STRING "Audio Interface" + +/** + * @brief audio interface subclass codes + */ +#define AUDIO_SUBCLASS_UNDEFINED 0x00 +#define AUDIO_SUBCLASS_AUDIOCONTROL 0x01 +#define AUDIO_SUBCLASS_AUDIOSTREAMING 0x02 +#define AUDIO_SUBCLASS_MIDISTREMING 0x03 + +/** + * @brief audio class-specific descriptor types + */ +#define AUDIO_CS_INTERFACE 0x24 +#define AUDIO_CS_ENDPOINT 0x25 +#define AUDIO_CS_STRING 0x23 +#define AUDIO_CS_CONFIGURATION 0x22 +#define AUDIO_CS_DEVICE 0x21 +#define AUDIO_CS_UNDEFINED 0x20 + +/** + * @brief audio interface protocol codes + */ +#define AUDIO_PROTOCOL_UNDEFINED 0x00 + +/** + * @brief audio class-specific ac interface descriptor subtypes + */ +#define AUDIO_AC_DESCRIPTOR_UNDEFINED 0x00 +#define AUDIO_AC_HEADER 0x01 +#define AUDIO_AC_INPUT_TERMINAL 0x02 +#define AUDIO_AC_OUTPUT_TERMINAL 0x03 +#define AUDIO_AC_MIXER_UNIT 0x04 +#define AUDIO_AC_SELECTOR_UNIT 0x05 +#define AUDIO_AC_FEATURE_UNIT 0x06 +#define AUDIO_AC_PROCESSING_UNIT 0x07 +#define AUDIO_AC_EXTENSION_UNIT 0x08 + +/** + * @brief audio class-specific as interface descriptor subtypes + */ +#define AUDIO_AS_DESCRIPTOR_UNDEFINED 0x00 +#define AUDIO_AS_GENERAL 0x01 +#define AUDIO_AS_FORMAT_TYPE 0x02 +#define AUDIO_AS_FORMAT_SPECIFIC 0x03 + +/** + * @brief audio class-specific request codes + */ +#define AUDIO_REQUEST_CODE_UNDEFINED 0x00 +#define AUDIO_REQ_SET_CUR 0x01 +#define AUDIO_REQ_GET_CUR 0x81 +#define AUDIO_REQ_SET_MIN 0x02 +#define AUDIO_REQ_GET_MIN 0x82 +#define AUDIO_REQ_SET_MAX 0x03 +#define AUDIO_REQ_GET_MAX 0x83 +#define AUDIO_REQ_SET_RES 0x04 +#define AUDIO_REQ_GET_RES 0x84 +#define AUDIO_REQ_SET_MEM 0x05 +#define AUDIO_REQ_GET_MEM 0x85 +#define AUDIO_REQ_GET_STAT 0xFF + +/** + * @brief audio feature unit control selectors + */ +#define AUDIO_FU_CONTROL_UNDEFINED 0x00 +#define AUDIO_FU_MUTE_CONTROL 0x01 +#define AUDIO_FU_VOLUME_CONTROL 0x02 +#define AUDIO_FU_BASS_CONTROL 0x03 +#define AUDIO_FU_MID_CONTROL 0x04 +#define AUDIO_FU_TREBLE_CONTROL 0x05 + +/** + * @brief audio terminal type + */ +#define AUDIO_TERMINAL_TYPE_UNDEFINED 0x0100 +#define AUDIO_TERMINAL_TYPE_STREAMING 0x0101 +#define AUDIO_TERMINAL_TYPE_VENDOR 0x01FF +#define AUDIO_INPUT_TERMINAL_UNDEFINED 0x0200 +#define AUDIO_INPUT_TERMINAL_MICROPHONE 0x0201 +#define AUDIO_OUTPUT_TERMINAL_UNDEFINED 0x0300 +#define AUDIO_OUTPUT_TERMINAL_SPEAKER 0x0301 + +/** + * @brief audio format type 1 + */ +#define AUDIO_FORMAT_TYPE_I 0x01 + +/** + * @brief audio interface config + */ +#define AUDIO_INTERFACE_NUM (AUDIO_SUPPORT_SPK + AUDIO_SUPPORT_MIC) +#define AUDIO_INTERFACE_LEN ((0x08 + AUDIO_INTERFACE_NUM) + AUDIO_INTERFACE_NUM * 0x1E) +#define AUDIO_MIC_INTERFACE 0x01 +#define AUDIO_SPK_INTERFACE 0x02 + +/** + * @brief audio interface descriptor size define + */ +#define AUDIO_INPUT_TERMINAL_SIZE 0x0C +#define AUDIO_OUTPUT_TERMINAL_SIZE 0x09 +#define AUDIO_FEATURE_UNIT_SIZE 0x09 + +/** + * @brief audio terminal id define + */ +#define AUDIO_MIC_INPUT_TERMINAL_ID 0x01 +#define AUDIO_MIC_FEATURE_UNIT_ID 0x02 +#define AUDIO_MIC_OUTPUT_TERMINAL_ID 0x03 +#define AUDIO_SPK_INPUT_TERMINAL_ID 0x04 +#define AUDIO_SPK_FEATURE_UNIT_ID 0x05 +#define AUDIO_SPK_OUTPUT_TERMINAL_ID 0x06 + +/** + * @brief audio interface number + */ +#define AUDIO_MIC_INTERFACE_NUMBER 0x01 +#if (AUDIO_SUPPORT_MIC == 1) +#define AUDIO_SPK_INTERFACE_NUMBER 0x02 +#else +#define AUDIO_SPK_INTERFACE_NUMBER 0x01 +#endif +#define HID_INTERFACE_NUMBER 0x03 + +/** + * @brief audio support freq + */ +#define AT32_AUDIO_FREQ_16K 16000 +#define AT32_AUDIO_FREQ_48K 48000 + +/** + * @brief audio microphone freq and channel config + */ +#define AUDIO_MIC_FREQ_SIZE (AUDIO_SUPPORT_FREQ) +#define AUDIO_MIC_CHR AUDIO_MIC_CHANEL_NUM +#define AUDIO_MIC_BITW (AUDIO_MIC_DEFAULT_BITW) + +/** + * @brief audio speaker freq and channel config + */ +#define AUDIO_SPK_FREQ_SIZE (AUDIO_SUPPORT_FREQ) +#define AUDIO_SPK_CHR AUDIO_SPK_CHANEL_NUM +#define AUDIO_SPK_BITW (AUDIO_SPK_DEFAULT_BITW) + +#define HID_BINTERVAL_TIME 0x01 + +/** + * @brief usb bcd number define + */ +#define HID_BCD_NUM 0x0110 + +/** + * @brief usb hid class descriptor define + */ +#define HID_CLASS_DESC_HID 0x21 +#define HID_CLASS_DESC_REPORT 0x22 +#define HID_CLASS_DESC_PHYSICAL 0x23 + +/** + * @brief usb hid report id define + */ +#define HID_REPORT_ID_1 0x01 +#define HID_REPORT_ID_2 0x02 +#define HID_REPORT_ID_3 0x03 +#define HID_REPORT_ID_4 0x04 +#define HID_REPORT_ID_5 0x05 +#define HID_REPORT_ID_6 0xF0 + +#define USBD_HID_DESC_SIZE 32 +#define USBD_CONFIG_DESC_SIZE ( 0x12 + AUDIO_INTERFACE_LEN + \ + + (0x31 + AUDIO_SPK_FREQ_SIZE * 3) \ + + (0x31 + AUDIO_MIC_FREQ_SIZE * 3) \ + + (9 * AUDIO_SUPPORT_FEEDBACK) \ + + USBD_HID_DESC_SIZE) +#define USBD_HID_SIZ_REPORT_DESC 126 + +#define SAMPLE_FREQ(frq) (uint8_t)(frq), (uint8_t)((frq >> 8)), (uint8_t)((frq >> 16)) + +#define MCU_ID1 (0x1FFFF7E8) +#define MCU_ID2 (0x1FFFF7EC) +#define MCU_ID3 (0x1FFFF7F0) + +extern uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC]; +extern uint8_t g_hid_usb_desc[9]; +extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; +extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; +extern usbd_desc_handler audio_hid_desc_handler; + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/middlewares/usbd_class/cdc/cdc_class.c b/middlewares/usbd_class/cdc/cdc_class.c index c15cfea..08ad56e 100644 --- a/middlewares/usbd_class/cdc/cdc_class.c +++ b/middlewares/usbd_class/cdc/cdc_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb cdc class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/cdc/cdc_class.h b/middlewares/usbd_class/cdc/cdc_class.h index 4fcfcc3..eaed734 100644 --- a/middlewares/usbd_class/cdc/cdc_class.h +++ b/middlewares/usbd_class/cdc/cdc_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb cdc class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/cdc/cdc_desc.c b/middlewares/usbd_class/cdc/cdc_desc.c index e1d6ddf..2331886 100644 --- a/middlewares/usbd_class/cdc/cdc_desc.c +++ b/middlewares/usbd_class/cdc/cdc_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb cdc device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -77,7 +77,10 @@ usbd_desc_handler desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -102,7 +105,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -187,7 +193,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -198,7 +207,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/cdc/cdc_desc.h b/middlewares/usbd_class/cdc/cdc_desc.h index cf377de..5b46683 100644 --- a/middlewares/usbd_class/cdc/cdc_desc.h +++ b/middlewares/usbd_class/cdc/cdc_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb cdc descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c index bc5cecf..45ade0f 100644 --- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c +++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_keyboard_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb cdc and keyboard class type ************************************************************************** * Copyright notice & Disclaimer @@ -66,7 +66,7 @@ static uint8_t g_req; static uint16_t g_len, g_rxlen; __IO uint8_t g_tx_completed = 1, g_rx_completed = 0; -uint8_t g_keyboard_tx_completed = 0; +__IO uint8_t g_keyboard_tx_completed = 0; #define SHIFT 0x80 const unsigned char _asciimap[128] = diff --git a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.h b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.h index f527b4b..7547fda 100644 --- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.h +++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_keyboard_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb cdc and keyboard class file ************************************************************************** * Copyright notice & Disclaimer @@ -106,7 +106,7 @@ typedef struct * @{ */ extern usbd_class_handler cdc_keyboard_class_handler; -extern uint8_t g_keyboard_tx_completed; +extern __IO uint8_t g_keyboard_tx_completed; uint16_t usb_vcp_get_rxdata(void *udev, uint8_t *recv_data); error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len); usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); diff --git a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c index 141ae10..f0ac52d 100644 --- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c +++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_keyboard_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb cdc and keyboard device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -76,7 +76,10 @@ usbd_desc_handler cdc_keyboard_desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -101,7 +104,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -232,7 +238,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb hid descriptor */ -uint8_t g_hid_usb_desc[9] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ @@ -248,7 +257,10 @@ uint8_t g_hid_usb_desc[9] = /** * @brief usb hid keyboard report descriptor */ -uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x06, // USAGE (Keyboard) @@ -286,7 +298,10 @@ uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -297,7 +312,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.h b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.h index d17ed6d..b9eecd6 100644 --- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.h +++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_keyboard_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb cdc and keyboard descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.c b/middlewares/usbd_class/custom_hid/custom_hid_class.c index 18c5e4b..1349d3c 100644 --- a/middlewares/usbd_class/custom_hid/custom_hid_class.c +++ b/middlewares/usbd_class/custom_hid/custom_hid_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file custom_hid_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb custom hid class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.h b/middlewares/usbd_class/custom_hid/custom_hid_class.h index f795b80..41f720d 100644 --- a/middlewares/usbd_class/custom_hid/custom_hid_class.h +++ b/middlewares/usbd_class/custom_hid/custom_hid_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file custom_hid_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb custom hid header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/custom_hid/custom_hid_desc.c b/middlewares/usbd_class/custom_hid/custom_hid_desc.c index 0e1467c..24b9cce 100644 --- a/middlewares/usbd_class/custom_hid/custom_hid_desc.c +++ b/middlewares/usbd_class/custom_hid/custom_hid_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file custom_hid_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -77,7 +77,10 @@ usbd_desc_handler hid_desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -102,7 +105,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -155,7 +161,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb hid report descriptor */ -uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x06, 0xFF, 0x00, /* USAGE_PAGE(Vendor Page:0xFF00) */ 0x09, 0x01, /* USAGE (Demo Kit) */ @@ -250,7 +259,10 @@ uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = /** * @brief usb hid descriptor */ -uint8_t g_hid_usb_desc[9] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ @@ -267,7 +279,10 @@ uint8_t g_hid_usb_desc[9] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -278,7 +293,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/custom_hid/custom_hid_desc.h b/middlewares/usbd_class/custom_hid/custom_hid_desc.h index 9767be0..ae987ca 100644 --- a/middlewares/usbd_class/custom_hid/custom_hid_desc.h +++ b/middlewares/usbd_class/custom_hid/custom_hid_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file custom_hid_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb custom hid descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/hid_iap/hid_iap_class.c b/middlewares/usbd_class/hid_iap/hid_iap_class.c index 43bfa1e..c4b85de 100644 --- a/middlewares/usbd_class/hid_iap/hid_iap_class.c +++ b/middlewares/usbd_class/hid_iap/hid_iap_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file hid_iap_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid iap class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/hid_iap/hid_iap_class.h b/middlewares/usbd_class/hid_iap/hid_iap_class.h index c83e448..35ca748 100644 --- a/middlewares/usbd_class/hid_iap/hid_iap_class.h +++ b/middlewares/usbd_class/hid_iap/hid_iap_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file hid_iap_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid iap header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.c b/middlewares/usbd_class/hid_iap/hid_iap_desc.c index c58640b..11d76f7 100644 --- a/middlewares/usbd_class/hid_iap/hid_iap_desc.c +++ b/middlewares/usbd_class/hid_iap/hid_iap_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file hid_iap_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -77,7 +77,10 @@ usbd_desc_handler hid_iap_desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -102,7 +105,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -155,7 +161,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb hid report descriptor */ -uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x06, 0xFF, 0x00, /* USAGE_PAGE(Vendor Page:0xFF00) */ 0x09, 0x01, /* USAGE (Demo Kit) */ @@ -183,7 +192,10 @@ uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = /** * @brief usb hid descriptor */ -uint8_t g_hid_usb_desc[9] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ @@ -200,7 +212,10 @@ uint8_t g_hid_usb_desc[9] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -211,7 +226,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.h b/middlewares/usbd_class/hid_iap/hid_iap_desc.h index 6c625ed..96fc5ab 100644 --- a/middlewares/usbd_class/hid_iap/hid_iap_desc.h +++ b/middlewares/usbd_class/hid_iap/hid_iap_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file hid_iap_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/keyboard/keyboard_class.c b/middlewares/usbd_class/keyboard/keyboard_class.c index 0aab737..63542ea 100644 --- a/middlewares/usbd_class/keyboard/keyboard_class.c +++ b/middlewares/usbd_class/keyboard/keyboard_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file keyboard_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid keyboard class type ************************************************************************** * Copyright notice & Disclaimer @@ -55,9 +55,9 @@ static uint32_t hid_protocol = 0; static uint32_t hid_set_idle = 0; static uint32_t alt_setting = 0; static uint8_t hid_state; -uint8_t hid_suspend_flag = 0; +__IO uint8_t hid_suspend_flag = 0; uint8_t hid_set_report[64]; -uint8_t g_u8tx_completed = 0; +__IO uint8_t g_u8tx_completed = 0; #define SHIFT 0x80 const unsigned char _asciimap[128] = diff --git a/middlewares/usbd_class/keyboard/keyboard_class.h b/middlewares/usbd_class/keyboard/keyboard_class.h index 9e6aaaf..a08d43c 100644 --- a/middlewares/usbd_class/keyboard/keyboard_class.h +++ b/middlewares/usbd_class/keyboard/keyboard_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file keyboard_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid keyboard header file ************************************************************************** * Copyright notice & Disclaimer @@ -86,7 +86,7 @@ extern "C" { * @{ */ extern usbd_class_handler keyboard_class_handler; -extern uint8_t g_u8tx_completed; +extern __IO uint8_t g_u8tx_completed; usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); void usb_hid_keyboard_send_char(void *udev, uint8_t ascii_code); diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.c b/middlewares/usbd_class/keyboard/keyboard_desc.c index 5a15f92..f48a4a5 100644 --- a/middlewares/usbd_class/keyboard/keyboard_desc.c +++ b/middlewares/usbd_class/keyboard/keyboard_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file keyboard_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid keyboard device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -77,7 +77,10 @@ usbd_desc_handler keyboard_desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -102,7 +105,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -147,7 +153,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb mouse report descriptor */ -uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x06, // USAGE (Keyboard) @@ -186,7 +195,10 @@ uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = /** * @brief usb hid descriptor */ -uint8_t g_hid_usb_desc[9] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ @@ -203,7 +215,10 @@ uint8_t g_hid_usb_desc[9] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -214,7 +229,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.h b/middlewares/usbd_class/keyboard/keyboard_desc.h index 19692c8..468b9b1 100644 --- a/middlewares/usbd_class/keyboard/keyboard_desc.h +++ b/middlewares/usbd_class/keyboard/keyboard_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file keyboard_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb keyboard descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/mouse/mouse_class.c b/middlewares/usbd_class/mouse/mouse_class.c index c42eaca..e4e6738 100644 --- a/middlewares/usbd_class/mouse/mouse_class.c +++ b/middlewares/usbd_class/mouse/mouse_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file mouse_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid mouse class type ************************************************************************** * Copyright notice & Disclaimer @@ -55,7 +55,7 @@ static uint32_t hid_protocol = 0; static uint32_t hid_set_idle = 0; static uint32_t alt_setting = 0; static uint8_t hid_state; -uint8_t hid_suspend_flag = 0; +__IO uint8_t hid_suspend_flag = 0; uint8_t hid_set_report[64]; /* usb device class handler */ diff --git a/middlewares/usbd_class/mouse/mouse_class.h b/middlewares/usbd_class/mouse/mouse_class.h index d00581a..5e62997 100644 --- a/middlewares/usbd_class/mouse/mouse_class.h +++ b/middlewares/usbd_class/mouse/mouse_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file mouse_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid mouse header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/mouse/mouse_desc.c b/middlewares/usbd_class/mouse/mouse_desc.c index b227322..1a3073e 100644 --- a/middlewares/usbd_class/mouse/mouse_desc.c +++ b/middlewares/usbd_class/mouse/mouse_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file mouse_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb hid mouse device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -77,7 +77,10 @@ usbd_desc_handler mouse_desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -102,7 +105,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -147,7 +153,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb mouse report descriptor */ -uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x05,0x01, 0x09,0x02, @@ -200,7 +209,10 @@ uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] = /** * @brief usb hid descriptor */ -uint8_t g_hid_usb_desc[9] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ @@ -217,7 +229,10 @@ uint8_t g_hid_usb_desc[9] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -228,7 +243,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/mouse/mouse_desc.h b/middlewares/usbd_class/mouse/mouse_desc.h index faf9569..2bdbd8f 100644 --- a/middlewares/usbd_class/mouse/mouse_desc.h +++ b/middlewares/usbd_class/mouse/mouse_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file mouse_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb mouse descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.c b/middlewares/usbd_class/msc/msc_bot_scsi.c index 9145275..ce09a1c 100644 --- a/middlewares/usbd_class/msc/msc_bot_scsi.c +++ b/middlewares/usbd_class/msc/msc_bot_scsi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_bot_scsi.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb mass storage bulk-only transport and scsi command ************************************************************************** * Copyright notice & Disclaimer @@ -49,7 +49,10 @@ csw_type csw_struct = CSW_BCSWSTATUS_PASS, }; -uint8_t page00_inquiry_data[] = { +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = { 0x00, 0x00, 0x00, @@ -57,7 +60,10 @@ uint8_t page00_inquiry_data[] = { 0x00, }; -sense_type sense_data = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD sense_type sense_data ALIGNED_TAIL = { 0x70, 0x00, @@ -70,8 +76,10 @@ sense_type sense_data = 0x00000000 }; - -uint8_t mode_sense6_data[8] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t mode_sense6_data[8] ALIGNED_TAIL = { 0x00, 0x00, @@ -83,7 +91,10 @@ uint8_t mode_sense6_data[8] = 0x00 }; -uint8_t mode_sense10_data[8] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t mode_sense10_data[8] ALIGNED_TAIL = { 0x00, 0x06, diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.h b/middlewares/usbd_class/msc/msc_bot_scsi.h index 3c35f94..674866b 100644 --- a/middlewares/usbd_class/msc/msc_bot_scsi.h +++ b/middlewares/usbd_class/msc/msc_bot_scsi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_bot_scsi.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb mass storage bulk-only transport and scsi command header file ************************************************************************** * Copyright notice & Disclaimer @@ -194,7 +194,7 @@ typedef struct { uint8_t msc_state; uint8_t bot_status; - uint8_t max_lun; + uint32_t max_lun; uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN]; uint32_t blk_size[MSC_SUPPORT_MAX_LUN]; diff --git a/middlewares/usbd_class/msc/msc_class.c b/middlewares/usbd_class/msc/msc_class.c index ad3f30d..edcc369 100644 --- a/middlewares/usbd_class/msc/msc_class.c +++ b/middlewares/usbd_class/msc/msc_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb msc class type ************************************************************************** * Copyright notice & Disclaimer @@ -130,7 +130,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) switch(setup->bRequest) { case MSC_REQ_GET_MAX_LUN: - usbd_ctrl_send(pudev, &msc_struct.max_lun, 1); + usbd_ctrl_send(pudev, (uint8_t *)&msc_struct.max_lun, 1); break; case MSC_REQ_BO_RESET: bot_scsi_reset(udev); diff --git a/middlewares/usbd_class/msc/msc_class.h b/middlewares/usbd_class/msc/msc_class.h index 55d21b1..c726fab 100644 --- a/middlewares/usbd_class/msc/msc_class.h +++ b/middlewares/usbd_class/msc/msc_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb msc class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_desc.c b/middlewares/usbd_class/msc/msc_desc.c index 161b3f6..6d6a5dd 100644 --- a/middlewares/usbd_class/msc/msc_desc.c +++ b/middlewares/usbd_class/msc/msc_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb msc device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -78,7 +78,10 @@ usbd_desc_handler msc_desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -103,7 +106,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -146,7 +152,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -157,7 +166,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/msc/msc_desc.h b/middlewares/usbd_class/msc/msc_desc.h index 3bbc618..b668d85 100644 --- a/middlewares/usbd_class/msc/msc_desc.h +++ b/middlewares/usbd_class/msc/msc_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb msc descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_class.c b/middlewares/usbd_class/printer/printer_class.c index 218c9c1..1d2f217 100644 --- a/middlewares/usbd_class/printer/printer_class.c +++ b/middlewares/usbd_class/printer/printer_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file printer_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb printer class type ************************************************************************** * Copyright notice & Disclaimer @@ -62,7 +62,7 @@ uint8_t PRINTER_DEVICE_ID[PRINTER_DEVICE_ID_LEN] = 'M', 'F', 'G',':','A','r','t','e', 'r', 'y' ,' ', 'C','M', 'D', ':', 'E', 'S', 'C', 'P', 'O', 'S',' ', }; -static uint8_t g_printer_port_status = 0x18; +static uint32_t g_printer_port_status = 0x18; uint8_t g_printer_data[USBD_OUT_MAXPACKET_SIZE]; diff --git a/middlewares/usbd_class/printer/printer_class.h b/middlewares/usbd_class/printer/printer_class.h index 96a8fbe..c5ec794 100644 --- a/middlewares/usbd_class/printer/printer_class.h +++ b/middlewares/usbd_class/printer/printer_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file printer_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb printer class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_desc.c b/middlewares/usbd_class/printer/printer_desc.c index 795f7e5..84095fa 100644 --- a/middlewares/usbd_class/printer/printer_desc.c +++ b/middlewares/usbd_class/printer/printer_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file printer_desc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb printer device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -78,7 +78,10 @@ usbd_desc_handler printer_desc_handler = /** * @brief usb device standard descriptor */ -uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -103,7 +106,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = /** * @brief usb configuration standard descriptor */ -uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ @@ -146,7 +152,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = /** * @brief usb string lang id */ -uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = { USBD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, @@ -157,7 +166,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] = /** * @brief usb string serial */ -uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] = +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { USBD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, diff --git a/middlewares/usbd_class/printer/printer_desc.h b/middlewares/usbd_class/printer/printer_desc.h index a0bc40e..b574792 100644 --- a/middlewares/usbd_class/printer/printer_desc.h +++ b/middlewares/usbd_class/printer/printer_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file printer_desc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb printer descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/inc/usb_std.h b/middlewares/usbd_drivers/inc/usb_std.h index c99ef59..d0cea88 100644 --- a/middlewares/usbd_drivers/inc/usb_std.h +++ b/middlewares/usbd_drivers/inc/usb_std.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_std.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb standard header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/inc/usbd_core.h b/middlewares/usbd_drivers/inc/usbd_core.h index c6ae29e..edd31f9 100644 --- a/middlewares/usbd_drivers/inc/usbd_core.h +++ b/middlewares/usbd_drivers/inc/usbd_core.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_core.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb device core header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/inc/usbd_int.h b/middlewares/usbd_drivers/inc/usbd_int.h index 9c6dca2..25bc896 100644 --- a/middlewares/usbd_drivers/inc/usbd_int.h +++ b/middlewares/usbd_drivers/inc/usbd_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/inc/usbd_sdr.h b/middlewares/usbd_drivers/inc/usbd_sdr.h index c0c0a4f..73b7f2f 100644 --- a/middlewares/usbd_drivers/inc/usbd_sdr.h +++ b/middlewares/usbd_drivers/inc/usbd_sdr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_sdr.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb standard request header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/src/usbd_core.c b/middlewares/usbd_drivers/src/usbd_core.c index ff29b2e..7917578 100644 --- a/middlewares/usbd_drivers/src/usbd_core.c +++ b/middlewares/usbd_drivers/src/usbd_core.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_core.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb driver ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/src/usbd_int.c b/middlewares/usbd_drivers/src/usbd_int.c index b531fa1..6b1a3eb 100644 --- a/middlewares/usbd_drivers/src/usbd_int.c +++ b/middlewares/usbd_drivers/src/usbd_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb interrupt request ************************************************************************** * Copyright notice & Disclaimer @@ -58,7 +58,7 @@ void usbd_irq_handler(usbd_core_type *udev) if(sts_val & USB_RST_FLAG) { /* clear reset flag */ - usbx->intsts_bit.rst = 0; + usb_flag_clear(usbx, USB_RST_FLAG); /* reset interrupt handler */ usbd_reset_handler(udev); @@ -68,7 +68,7 @@ void usbd_irq_handler(usbd_core_type *udev) (sts_ien & USB_SOF_INT)) { /* clear sof flag */ - usbx->intsts_bit.sof = 0; + usb_flag_clear(usbx, USB_SOF_FLAG); /* sof interrupt handler */ usbd_sof_handler(udev); @@ -78,14 +78,14 @@ void usbd_irq_handler(usbd_core_type *udev) (sts_ien & USB_LSOF_INT)) { /* clear lsof flag */ - usbx->intsts_bit.lsof = 0; + usb_flag_clear(usbx, USB_LSOF_FLAG); } if((sts_val & USB_SP_FLAG) && (sts_ien & USB_SP_INT)) { /* clear suspend flag */ - usbx->intsts_bit.sp = 0; + usb_flag_clear(usbx, USB_SP_FLAG); /* usb suspend interrupt handler */ usbd_suspend_handler(udev); @@ -98,7 +98,7 @@ void usbd_irq_handler(usbd_core_type *udev) usbd_wakeup_handler(udev); /* clear wakeup flag */ - usbx->intsts_bit.wk = 0; + usb_flag_clear(usbx, USB_WK_FLAG); } } diff --git a/middlewares/usbd_drivers/src/usbd_sdr.c b/middlewares/usbd_drivers/src/usbd_sdr.c index 53f9f24..d443f8f 100644 --- a/middlewares/usbd_drivers/src/usbd_sdr.c +++ b/middlewares/usbd_drivers/src/usbd_sdr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_sdr.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb standard device request ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at32f413_board/at32f413_board.c b/project/at32f413_board/at32f413_board.c index 35d7e90..f20c0fa 100644 --- a/project/at32f413_board/at32f413_board.c +++ b/project/at32f413_board/at32f413_board.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_board.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief set of firmware functions to manage leds and push-button. * initialize delay function. ************************************************************************** @@ -48,6 +48,86 @@ crm_periph_clock_type led_gpio_crm_clk[LED_NUM] = {LED2_GPIO_CRM_CLK, LED3_GPIO_ static __IO uint32_t fac_us; static __IO uint32_t fac_ms; +/* support printf function, usemicrolib is unnecessary */ +#if (__ARMCC_VERSION > 6000000) + __asm (".global __use_no_semihosting\n\t"); + void _sys_exit(int x) + { + x = x; + } + /* __use_no_semihosting was requested, but _ttywrch was */ + void _ttywrch(int ch) + { + ch = ch; + } + FILE __stdout; +#else + #ifdef __CC_ARM + #pragma import(__use_no_semihosting) + struct __FILE + { + int handle; + }; + FILE __stdout; + void _sys_exit(int x) + { + x = x; + } + /* __use_no_semihosting was requested, but _ttywrch was */ + void _ttywrch(int ch) + { + ch = ch; + } + #endif +#endif + +#if defined (__GNUC__) && !defined (__clang__) + #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) +#else + #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) +#endif + +/** + * @brief retargets the c library printf function to the usart. + * @param none + * @retval none + */ +PUTCHAR_PROTOTYPE +{ + while(usart_flag_get(PRINT_UART, USART_TDBE_FLAG) == RESET); + usart_data_transmit(PRINT_UART, ch); + return ch; +} + +/** + * @brief initialize uart + * @param baudrate: uart baudrate + * @retval none + */ +void uart_print_init(uint32_t baudrate) +{ + gpio_init_type gpio_init_struct; + + /* enable the uart and gpio clock */ + crm_periph_clock_enable(PRINT_UART_CRM_CLK, TRUE); + crm_periph_clock_enable(PRINT_UART_TX_GPIO_CRM_CLK, TRUE); + + gpio_default_para_init(&gpio_init_struct); + + /* configure the uart tx pin */ + gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; + gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; + gpio_init_struct.gpio_mode = GPIO_MODE_MUX; + gpio_init_struct.gpio_pins = PRINT_UART_TX_PIN; + gpio_init_struct.gpio_pull = GPIO_PULL_NONE; + gpio_init(PRINT_UART_TX_GPIO, &gpio_init_struct); + + /* configure uart param */ + usart_init(PRINT_UART, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); + usart_transmitter_enable(PRINT_UART, TRUE); + usart_enable(PRINT_UART, TRUE); +} + /** * @brief board initialize interface init led and button * @param none @@ -290,3 +370,4 @@ void delay_sec(uint16_t sec) /** * @} */ + diff --git a/project/at32f413_board/at32f413_board.h b/project/at32f413_board/at32f413_board.h index 494e0f5..2815642 100644 --- a/project/at32f413_board/at32f413_board.h +++ b/project/at32f413_board/at32f413_board.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_board.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file for at-start board. set of firmware functions to * manage leds and push-button. initialize delay function. ************************************************************************** @@ -32,6 +32,7 @@ extern "C" { #endif +#include "stdio.h" #include "at32f413.h" /** @addtogroup AT32F413_board @@ -80,6 +81,13 @@ typedef enum #define LED4_GPIO_CRM_CLK CRM_GPIOC_PERIPH_CLOCK #endif +/**************** define print uart ******************/ +#define PRINT_UART USART1 +#define PRINT_UART_CRM_CLK CRM_USART1_PERIPH_CLOCK +#define PRINT_UART_TX_PIN GPIO_PINS_9 +#define PRINT_UART_TX_GPIO GPIOA +#define PRINT_UART_TX_GPIO_CRM_CLK CRM_GPIOA_PERIPH_CLOCK + /******************* define button *******************/ typedef enum { @@ -119,6 +127,9 @@ void delay_us(uint32_t nus); void delay_ms(uint16_t nms); void delay_sec(uint16_t sec); +/* printf uart init function */ +void uart_print_init(uint32_t baudrate); + /** * @} */ diff --git a/project/at_start_f413/examples/acc/calibration/inc/at32f413_clock.h b/project/at_start_f413/examples/acc/calibration/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/acc/calibration/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/acc/calibration/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/inc/at32f413_conf.h b/project/at_start_f413/examples/acc/calibration/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/acc/calibration/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/acc/calibration/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/inc/at32f413_int.h b/project/at_start_f413/examples/acc/calibration/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/acc/calibration/inc/at32f413_int.h +++ b/project/at_start_f413/examples/acc/calibration/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/inc/usb_conf.h b/project/at_start_f413/examples/acc/calibration/inc/usb_conf.h index bdba9a0..09eca4b 100644 --- a/project/at_start_f413/examples/acc/calibration/inc/usb_conf.h +++ b/project/at_start_f413/examples/acc/calibration/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/readme.txt b/project/at_start_f413/examples/acc/calibration/readme.txt index 437d97f..4cff378 100644 --- a/project/at_start_f413/examples/acc/calibration/readme.txt +++ b/project/at_start_f413/examples/acc/calibration/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c b/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c +++ b/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/src/at32f413_int.c b/project/at_start_f413/examples/acc/calibration/src/at32f413_int.c index 0b06018..4580dd8 100644 --- a/project/at_start_f413/examples/acc/calibration/src/at32f413_int.c +++ b/project/at_start_f413/examples/acc/calibration/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/src/main.c b/project/at_start_f413/examples/acc/calibration/src/main.c index f0f81d4..11efec6 100644 --- a/project/at_start_f413/examples/acc/calibration/src/main.c +++ b/project/at_start_f413/examples/acc/calibration/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_int.h b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/mdk_v5/combine_mode_ordinary_simult.uvoptx b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/mdk_v5/combine_mode_ordinary_simult.uvoptx deleted file mode 100644 index 6fb7e43..0000000 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/mdk_v5/combine_mode_ordinary_simult.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - combine_mode_ordinary_simult - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_adc.c - at32f413_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt index 47c8b5e..5f869ae 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_int.c b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_int.c index d614574..33ca8b5 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/main.c b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/main.c index 1bcf85d..4a536fb 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/main.c +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include /** @addtogroup AT32F413_periph_examples * @{ @@ -40,90 +39,10 @@ __IO uint32_t adc1_ordinary_valuetab[5][3]; __IO uint32_t dma1_trans_complete_flag = 0; -static void usart1_config(uint32_t baudrate); static void gpio_config(void); static void dma_config(void); static void adc_config(void); -/* suport printf function, use microlib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief usart1 configuration. - * @param none - * @retval none - */ -static void usart1_config(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief gpio configuration. * @param none @@ -231,7 +150,7 @@ int main(void) at32_led_off(LED2); at32_led_off(LED3); at32_led_off(LED4); - usart1_config(115200); + uart_print_init(115200); gpio_config(); dma_config(); adc_config(); diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_int.h b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvoptx b/project/at_start_f413/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvoptx deleted file mode 100644 index b5b2f2b..0000000 --- a/project/at_start_f413/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - current_vref_value_check - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_adc.c - at32f413_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvprojx b/project/at_start_f413/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvprojx index db3eb41..1e722b9 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvprojx +++ b/project/at_start_f413/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvprojx @@ -327,8 +327,8 @@ 0 0 0 - 1 - 1 + 3 + 3 1 1 0 diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt b/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt index f89e7b6..6d1c309 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt +++ b/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_int.c b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_int.c index df486fb..4ad4b9e 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/src/main.c b/project/at_start_f413/examples/adc/current_vref_value_check/src/main.c index 8447de8..7430354 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/src/main.c +++ b/project/at_start_f413/examples/adc/current_vref_value_check/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,8 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include - /** @addtogroup AT32F413_periph_examples * @{ @@ -39,89 +37,9 @@ __IO uint16_t adc1_ordinary_value = 0; -static void usart1_config(uint32_t baudrate); static void dma_config(void); static void adc_config(void); -/* suport printf function, usemicrolib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief usart1 configuration. - * @param none - * @retval none - */ -static void usart1_config(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief dma configuration. * @param none @@ -193,7 +111,7 @@ int main(void) at32_led_off(LED2); at32_led_off(LED3); at32_led_off(LED4); - usart1_config(115200); + uart_print_init(115200); dma_config(); adc_config(); printf("adc1_vref_check \r\n"); diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_int.h b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvoptx b/project/at_start_f413/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvoptx deleted file mode 100644 index f78ac36..0000000 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvoptx +++ /dev/null @@ -1,380 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - exint_trigger_partitioned - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_adc.c - at32f413_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c - at32f413_exint.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 14 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvprojx b/project/at_start_f413/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvprojx index 356ce6f..85d3887 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvprojx +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvprojx @@ -327,8 +327,8 @@ 0 0 0 - 1 - 1 + 3 + 3 1 1 0 diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt b/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt index 7d365dd..2ee3cd3 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_int.c b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_int.c index 47e3e2b..7495fe3 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/main.c b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/main.c index b98d13f..ac15851 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/main.c +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include /** @addtogroup AT32F413_periph_examples * @{ @@ -42,91 +41,11 @@ __IO uint16_t adc1_preempt_valuetab[3][3] = {0}; __IO uint16_t dma_trans_complete_flag = 0; __IO uint16_t preempt_trigger_count = 0; -static void usart1_config(uint32_t baudrate); static void gpio_config(void); static void exint_config(void); static void dma_config(void); static void adc_config(void); -/* suport printf function, usemicrolib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief usart1 configuration. - * @param none - * @retval none - */ -static void usart1_config(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief gpio configuration. * @param none @@ -272,7 +191,7 @@ int main(void) at32_led_off(LED2); at32_led_off(LED3); at32_led_off(LED4); - usart1_config(115200); + uart_print_init(115200); gpio_config(); exint_config(); dma_config(); diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_int.h b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvoptx b/project/at_start_f413/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvoptx deleted file mode 100644 index f58b8c9..0000000 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - internal_temperature_sensor - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_adc.c - at32f413_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvprojx b/project/at_start_f413/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvprojx index 0ded489..f695e00 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvprojx +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvprojx @@ -327,8 +327,8 @@ 0 0 0 - 1 - 1 + 3 + 3 1 1 0 diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt b/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt index e24460e..c40c8cf 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_int.c b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_int.c index 7e6fc14..11fb49f 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/main.c b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/main.c index bd3fec5..9caa370 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/main.c +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,8 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include - /** @addtogroup AT32F413_periph_examples * @{ @@ -44,89 +42,9 @@ __IO uint16_t adc1_ordinary_value = 0; -static void usart1_config(uint32_t baudrate); static void dma_config(void); static void adc_config(void); -/* suport printf function, usemicrolib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief usart1 configuration. - * @param none - * @retval none - */ -static void usart1_config(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief dma configuration. * @param none @@ -198,7 +116,7 @@ int main(void) at32_led_off(LED2); at32_led_off(LED3); at32_led_off(LED4); - usart1_config(115200); + uart_print_init(115200); dma_config(); adc_config(); printf("internal_temperature_sensor \r\n"); diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_int.h b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvoptx b/project/at_start_f413/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvoptx deleted file mode 100644 index 1565a7a..0000000 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - software_trigger_repeat - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_adc.c - at32f413_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvprojx b/project/at_start_f413/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvprojx index 42b50c8..8477cd9 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvprojx +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvprojx @@ -327,8 +327,8 @@ 0 0 0 - 1 - 1 + 3 + 3 1 1 0 diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt b/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt index 5ffa535..b263019 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_int.c b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_int.c index ea7cad8..d523918 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/src/main.c b/project/at_start_f413/examples/adc/software_trigger_repeat/src/main.c index 6798322..438eb6a 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/src/main.c +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,9 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include - - /** @addtogroup AT32F413_periph_examples * @{ @@ -41,90 +38,10 @@ __IO uint16_t adc1_ordinary_valuetab[10][3] = {0}; __IO uint16_t dma_trans_complete_flag = 0; -static void usart1_config(uint32_t baudrate); static void gpio_config(void); static void dma_config(void); static void adc_config(void); -/* suport printf function, usemicrolib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief usart1 configuration. - * @param none - * @retval none - */ -static void usart1_config(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief gpio configuration. * @param none @@ -215,7 +132,7 @@ int main(void) at32_led_off(LED2); at32_led_off(LED3); at32_led_off(LED4); - usart1_config(115200); + uart_print_init(115200); gpio_config(); dma_config(); adc_config(); diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_int.h b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvoptx b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvoptx deleted file mode 100644 index 278d483..0000000 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvoptx +++ /dev/null @@ -1,380 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - tmr_trigger_automatic_preempted - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_adc.c - at32f413_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 14 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvprojx b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvprojx index 911f1dd..c1c3c6d 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvprojx +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvprojx @@ -327,8 +327,8 @@ 0 0 0 - 1 - 1 + 3 + 3 1 1 0 diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt index b3c2a4f..5a6a7fe 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_int.c b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_int.c index 66e4a01..3c61d0a 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/main.c b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/main.c index 3e7aee4..8b426f9 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/main.c +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,9 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include - - /** @addtogroup AT32F413_periph_examples * @{ @@ -37,98 +34,17 @@ /** @addtogroup 413_ADC_tmr_trigger_automatic_preempted ADC_tmr_trigger_automatic_preempted * @{ */ - __IO uint16_t adc1_ordinary_valuetab[5][3] = {0}; __IO uint16_t adc1_preempt_valuetab[5][3] = {0}; __IO uint16_t dma_trans_complete_flag = 0; __IO uint16_t preempt_conversion_count = 0; -static void usart1_config(uint32_t baudrate); static void gpio_config(void); static void dma_config(void); static void tmr1_config(void); static void adc_config(void); -/* suport printf function, usemicrolib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief usart1 configuration. - * @param none - * @retval none - */ -static void usart1_config(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief gpio configuration. * @param none @@ -203,8 +119,8 @@ static void tmr1_config(void) crm_periph_clock_enable(CRM_TMR1_PERIPH_CLOCK, TRUE); - /* (systemclock / 24000) / 1000 = 10Hz(100ms) */ - tmr_base_init(TMR1, 1000, 24000); + /* (systemclock/(systemclock/10000))/1000 = 10Hz(100ms) */ + tmr_base_init(TMR1, 999, (crm_clocks_freq_struct.sclk_freq/10000 - 1)); tmr_cnt_dir_set(TMR1, TMR_COUNT_UP); tmr_clock_source_div_set(TMR1, TMR_CLOCK_DIV1); @@ -275,7 +191,7 @@ int main(void) at32_led_off(LED2); at32_led_off(LED3); at32_led_off(LED4); - usart1_config(115200); + uart_print_init(115200); gpio_config(); tmr1_config(); dma_config(); diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_int.h b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvoptx b/project/at_start_f413/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvoptx deleted file mode 100644 index 8b4be24..0000000 --- a/project/at_start_f413/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - voltage_monitoring - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_adc.c - at32f413_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvprojx b/project/at_start_f413/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvprojx index 7907fcb..c64c2b2 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvprojx +++ b/project/at_start_f413/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvprojx @@ -327,8 +327,8 @@ 0 0 0 - 1 - 1 + 3 + 3 1 1 0 diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt b/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt index 442e545..ba682b7 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt +++ b/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_int.c b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_int.c index cca66f3..e08886b 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/src/main.c b/project/at_start_f413/examples/adc/voltage_monitoring/src/main.c index 93ea063..715e5ef 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/src/main.c +++ b/project/at_start_f413/examples/adc/voltage_monitoring/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,8 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include - /** @addtogroup AT32F413_periph_examples * @{ @@ -40,90 +38,10 @@ __IO uint16_t adc1_ordinary_valuetab[3] = {0}; __IO uint16_t vmor_flag_index = 0; -static void usart1_config(uint32_t baudrate); static void gpio_config(void); static void dma_config(void); static void adc_config(void); -/* suport printf function, usemicrolib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief usart1 configuration. - * @param none - * @retval none - */ -static void usart1_config(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief gpio configuration. * @param none @@ -217,7 +135,7 @@ int main(void) at32_led_off(LED2); at32_led_off(LED3); at32_led_off(LED4); - usart1_config(115200); + uart_print_init(115200); gpio_config(); dma_config(); adc_config(); diff --git a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_clock.h b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_conf.h b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_int.h b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_int.h +++ b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/mdk_v5/bpr_data.uvoptx b/project/at_start_f413/examples/bpr/bpr_data/mdk_v5/bpr_data.uvoptx deleted file mode 100644 index cfe57a2..0000000 --- a/project/at_start_f413/examples/bpr/bpr_data/mdk_v5/bpr_data.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - bpr_data - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c - at32f413_bpr.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/bpr/bpr_data/readme.txt b/project/at_start_f413/examples/bpr/bpr_data/readme.txt index bd2d9cd..1c9008c 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/readme.txt +++ b/project/at_start_f413/examples/bpr/bpr_data/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c +++ b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_int.c b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_int.c index ac9172c..47d7eb9 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_int.c +++ b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/src/main.c b/project/at_start_f413/examples/bpr/bpr_data/src/main.c index a87e345..9cf6f91 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/src/main.c +++ b/project/at_start_f413/examples/bpr/bpr_data/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include "stdio.h" /** @addtogroup AT32F413_periph_examples * @{ @@ -93,83 +92,6 @@ uint8_t bpr_reg_check(void) return TRUE; } -/** - * @brief initialize print usart - * @param baudrate: uart baudrate - * @retval none - */ -void uart_init(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - -/* suport printf function, usemicrolib is unnecessary */ -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - - usart_data_transmit(USART1, ch); - - return ch; -} - /** * @brief main function. * @param none @@ -179,7 +101,7 @@ int main(void) { system_clock_config(); - uart_init(115200); + uart_print_init(115200); /* enable pwc and bpr clock */ crm_periph_clock_enable(CRM_PWC_PERIPH_CLOCK, TRUE); diff --git a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_clock.h b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_conf.h b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_int.h b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_int.h +++ b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/mdk_v5/tamper.uvoptx b/project/at_start_f413/examples/bpr/tamper/mdk_v5/tamper.uvoptx deleted file mode 100644 index 0b2cf10..0000000 --- a/project/at_start_f413/examples/bpr/tamper/mdk_v5/tamper.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - tamper - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c - at32f413_bpr.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/bpr/tamper/readme.txt b/project/at_start_f413/examples/bpr/tamper/readme.txt index 636a58c..bd1cbd9 100644 --- a/project/at_start_f413/examples/bpr/tamper/readme.txt +++ b/project/at_start_f413/examples/bpr/tamper/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c b/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c +++ b/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/src/at32f413_int.c b/project/at_start_f413/examples/bpr/tamper/src/at32f413_int.c index 46860e5..3f6b0d6 100644 --- a/project/at_start_f413/examples/bpr/tamper/src/at32f413_int.c +++ b/project/at_start_f413/examples/bpr/tamper/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/src/main.c b/project/at_start_f413/examples/bpr/tamper/src/main.c index 10b3685..1500087 100644 --- a/project/at_start_f413/examples/bpr/tamper/src/main.c +++ b/project/at_start_f413/examples/bpr/tamper/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_clock.h b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_conf.h b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_int.h b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_int.h +++ b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/mdk_v5/communication_mode.uvoptx b/project/at_start_f413/examples/can/communication_mode/mdk_v5/communication_mode.uvoptx deleted file mode 100644 index 0645e46..0000000 --- a/project/at_start_f413/examples/can/communication_mode/mdk_v5/communication_mode.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - communication_mode - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_can.c - at32f413_can.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/can/communication_mode/mdk_v5/communication_mode.uvprojx b/project/at_start_f413/examples/can/communication_mode/mdk_v5/communication_mode.uvprojx index b1654d9..dcc20f0 100644 --- a/project/at_start_f413/examples/can/communication_mode/mdk_v5/communication_mode.uvprojx +++ b/project/at_start_f413/examples/can/communication_mode/mdk_v5/communication_mode.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_can.c 1 diff --git a/project/at_start_f413/examples/can/communication_mode/readme.txt b/project/at_start_f413/examples/can/communication_mode/readme.txt index efede25..b595eb9 100644 --- a/project/at_start_f413/examples/can/communication_mode/readme.txt +++ b/project/at_start_f413/examples/can/communication_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c b/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c +++ b/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/src/at32f413_int.c b/project/at_start_f413/examples/can/communication_mode/src/at32f413_int.c index e499a76..976b593 100644 --- a/project/at_start_f413/examples/can/communication_mode/src/at32f413_int.c +++ b/project/at_start_f413/examples/can/communication_mode/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/src/main.c b/project/at_start_f413/examples/can/communication_mode/src/main.c index 5b7fd92..c181dbe 100644 --- a/project/at_start_f413/examples/can/communication_mode/src/main.c +++ b/project/at_start_f413/examples/can/communication_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/inc/at32f413_clock.h b/project/at_start_f413/examples/can/filter/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/can/filter/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/can/filter/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/inc/at32f413_conf.h b/project/at_start_f413/examples/can/filter/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/can/filter/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/can/filter/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/inc/at32f413_int.h b/project/at_start_f413/examples/can/filter/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/can/filter/inc/at32f413_int.h +++ b/project/at_start_f413/examples/can/filter/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/mdk_v5/filter.uvoptx b/project/at_start_f413/examples/can/filter/mdk_v5/filter.uvoptx deleted file mode 100644 index 16adbd9..0000000 --- a/project/at_start_f413/examples/can/filter/mdk_v5/filter.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - filter - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_can.c - at32f413_can.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/can/filter/mdk_v5/filter.uvprojx b/project/at_start_f413/examples/can/filter/mdk_v5/filter.uvprojx index 7f0610d..3d5ba8a 100644 --- a/project/at_start_f413/examples/can/filter/mdk_v5/filter.uvprojx +++ b/project/at_start_f413/examples/can/filter/mdk_v5/filter.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_can.c 1 diff --git a/project/at_start_f413/examples/can/filter/readme.txt b/project/at_start_f413/examples/can/filter/readme.txt index e4f60ff..5ffdcfc 100644 --- a/project/at_start_f413/examples/can/filter/readme.txt +++ b/project/at_start_f413/examples/can/filter/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/can/filter/src/at32f413_clock.c b/project/at_start_f413/examples/can/filter/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/can/filter/src/at32f413_clock.c +++ b/project/at_start_f413/examples/can/filter/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/src/at32f413_int.c b/project/at_start_f413/examples/can/filter/src/at32f413_int.c index 28cb6ab..3398f44 100644 --- a/project/at_start_f413/examples/can/filter/src/at32f413_int.c +++ b/project/at_start_f413/examples/can/filter/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/src/main.c b/project/at_start_f413/examples/can/filter/src/main.c index 044fc69..2e3765f 100644 --- a/project/at_start_f413/examples/can/filter/src/main.c +++ b/project/at_start_f413/examples/can/filter/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_clock.h b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_conf.h b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_int.h b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_int.h +++ b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/mdk_v5/loopback_mode.uvoptx b/project/at_start_f413/examples/can/loopback_mode/mdk_v5/loopback_mode.uvoptx deleted file mode 100644 index 08b1884..0000000 --- a/project/at_start_f413/examples/can/loopback_mode/mdk_v5/loopback_mode.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - loopback_mode - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_can.c - at32f413_can.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/can/loopback_mode/mdk_v5/loopback_mode.uvprojx b/project/at_start_f413/examples/can/loopback_mode/mdk_v5/loopback_mode.uvprojx index 2948a8b..f85f8c3 100644 --- a/project/at_start_f413/examples/can/loopback_mode/mdk_v5/loopback_mode.uvprojx +++ b/project/at_start_f413/examples/can/loopback_mode/mdk_v5/loopback_mode.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_can.c 1 diff --git a/project/at_start_f413/examples/can/loopback_mode/readme.txt b/project/at_start_f413/examples/can/loopback_mode/readme.txt index e065183..b66f3bb 100644 --- a/project/at_start_f413/examples/can/loopback_mode/readme.txt +++ b/project/at_start_f413/examples/can/loopback_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c +++ b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_int.c b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_int.c index 6f30e69..1284e85 100644 --- a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_int.c +++ b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/src/main.c b/project/at_start_f413/examples/can/loopback_mode/src/main.c index 89cfc4c..2aa6fa0 100644 --- a/project/at_start_f413/examples/can/loopback_mode/src/main.c +++ b/project/at_start_f413/examples/can/loopback_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_clock.h b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_conf.h b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_int.h b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_int.h +++ b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvoptx b/project/at_start_f413/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvoptx deleted file mode 100644 index 62f4fff..0000000 --- a/project/at_start_f413/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvoptx +++ /dev/null @@ -1,332 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - bit_band - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 10 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvprojx b/project/at_start_f413/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvprojx index 7182ebf..97f2440 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvprojx +++ b/project/at_start_f413/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_misc.c 1 diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt b/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt index a074280..c45bbae 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt +++ b/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c +++ b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_int.c b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_int.c index 9549cf0..805b81e 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_int.c +++ b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/src/main.c b/project/at_start_f413/examples/cortex_m4/bit_band/src/main.c index 068f405..49ce38d 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/src/main.c +++ b/project/at_start_f413/examples/cortex_m4/bit_band/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_clock.h b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_conf.h b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_int.h b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_int.h +++ b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/inc/julia_fpu.h b/project/at_start_f413/examples/cortex_m4/fpu/inc/julia_fpu.h index b4d6fef..79344e4 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/inc/julia_fpu.h +++ b/project/at_start_f413/examples/cortex_m4/fpu/inc/julia_fpu.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file julia_fpu.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief julia_fpu header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/mdk_v5/fpu.uvoptx b/project/at_start_f413/examples/cortex_m4/fpu/mdk_v5/fpu.uvoptx deleted file mode 100644 index 3420a7e..0000000 --- a/project/at_start_f413/examples/cortex_m4/fpu/mdk_v5/fpu.uvoptx +++ /dev/null @@ -1,485 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - fpu_enable - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - fpu_disable - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 1 - 0 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 0 - - 0 - - 1 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - -1 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\julia_fpu.c - julia_fpu.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/cortex_m4/fpu/mdk_v5/fpu.uvprojx b/project/at_start_f413/examples/cortex_m4/fpu/mdk_v5/fpu.uvprojx index b5e9f54..09daa71 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/mdk_v5/fpu.uvprojx +++ b/project/at_start_f413/examples/cortex_m4/fpu/mdk_v5/fpu.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_misc.c 1 @@ -882,6 +887,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_misc.c 1 diff --git a/project/at_start_f413/examples/cortex_m4/fpu/readme.txt b/project/at_start_f413/examples/cortex_m4/fpu/readme.txt index af88d36..8965339 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/readme.txt +++ b/project/at_start_f413/examples/cortex_m4/fpu/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c +++ b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_int.c b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_int.c index 3929445..bac2b4c 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_int.c +++ b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/julia_fpu.c b/project/at_start_f413/examples/cortex_m4/fpu/src/julia_fpu.c index c04cf9d..d89040d 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/src/julia_fpu.c +++ b/project/at_start_f413/examples/cortex_m4/fpu/src/julia_fpu.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file julia_fpu.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief julia_fpu source file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/main.c b/project/at_start_f413/examples/cortex_m4/fpu/src/main.c index 9183d27..6e81563 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/src/main.c +++ b/project/at_start_f413/examples/cortex_m4/fpu/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvoptx b/project/at_start_f413/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvoptx deleted file mode 100644 index 6dbe199..0000000 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvoptx +++ /dev/null @@ -1,332 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - systick_interrupt - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 10 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvprojx b/project/at_start_f413/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvprojx index 4a1d2f6..3fa8c52 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvprojx +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/readme.txt b/project/at_start_f413/examples/cortex_m4/systick_interrupt/readme.txt index 1b20656..6feaa10 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/readme.txt +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_int.c b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_int.c index d9f3806..9423d07 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/main.c b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/main.c index fae7fef..7ef4b83 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/main.c +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/inc/at32f413_clock.h b/project/at_start_f413/examples/crc/calculation/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/crc/calculation/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/crc/calculation/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/inc/at32f413_conf.h b/project/at_start_f413/examples/crc/calculation/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/crc/calculation/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/crc/calculation/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/inc/at32f413_int.h b/project/at_start_f413/examples/crc/calculation/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/crc/calculation/inc/at32f413_int.h +++ b/project/at_start_f413/examples/crc/calculation/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/mdk_v5/calculation.uvoptx b/project/at_start_f413/examples/crc/calculation/mdk_v5/calculation.uvoptx deleted file mode 100644 index d893b7e..0000000 --- a/project/at_start_f413/examples/crc/calculation/mdk_v5/calculation.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - calculation - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crc.c - at32f413_crc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/crc/calculation/mdk_v5/calculation.uvprojx b/project/at_start_f413/examples/crc/calculation/mdk_v5/calculation.uvprojx index a8c8587..d6d0fd2 100644 --- a/project/at_start_f413/examples/crc/calculation/mdk_v5/calculation.uvprojx +++ b/project/at_start_f413/examples/crc/calculation/mdk_v5/calculation.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_crc.c 1 diff --git a/project/at_start_f413/examples/crc/calculation/readme.txt b/project/at_start_f413/examples/crc/calculation/readme.txt index 7f9b23c..8b9e029 100644 --- a/project/at_start_f413/examples/crc/calculation/readme.txt +++ b/project/at_start_f413/examples/crc/calculation/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c b/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c +++ b/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/src/at32f413_int.c b/project/at_start_f413/examples/crc/calculation/src/at32f413_int.c index 1d86c45..0d77a25 100644 --- a/project/at_start_f413/examples/crc/calculation/src/at32f413_int.c +++ b/project/at_start_f413/examples/crc/calculation/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/src/main.c b/project/at_start_f413/examples/crc/calculation/src/main.c index 75b6394..d1ebd87 100644 --- a/project/at_start_f413/examples/crc/calculation/src/main.c +++ b/project/at_start_f413/examples/crc/calculation/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_clock.h b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_conf.h b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_int.h b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_int.h +++ b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvoptx b/project/at_start_f413/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvoptx deleted file mode 100644 index ca340ac..0000000 --- a/project/at_start_f413/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvoptx +++ /dev/null @@ -1,332 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - clock_failure_detection - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 10 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvprojx b/project/at_start_f413/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvprojx index 43cfbf9..e2410cf 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvprojx +++ b/project/at_start_f413/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c +
diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt b/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt index c78f53c..eea42a5 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt +++ b/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c +++ b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_int.c b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_int.c index fff9b9d..b90b75e 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_int.c +++ b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c b/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c index f2b2844..4b26445 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c +++ b/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_clock.h b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_conf.h b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_int.h b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_int.h +++ b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvoptx b/project/at_start_f413/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvoptx deleted file mode 100644 index 1e8ae4c..0000000 --- a/project/at_start_f413/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvoptx +++ /dev/null @@ -1,332 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - sysclk_switch - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 10 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvprojx b/project/at_start_f413/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvprojx index aca70cd..c049795 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvprojx +++ b/project/at_start_f413/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c +
diff --git a/project/at_start_f413/examples/crm/sysclk_switch/readme.txt b/project/at_start_f413/examples/crm/sysclk_switch/readme.txt index d786b36..cb845af 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/readme.txt +++ b/project/at_start_f413/examples/crm/sysclk_switch/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c +++ b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_int.c b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_int.c index e82131f..ccdc64a 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_int.c +++ b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/src/main.c b/project/at_start_f413/examples/crm/sysclk_switch/src/main.c index 9e462cf..11a43ac 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/src/main.c +++ b/project/at_start_f413/examples/crm/sysclk_switch/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_clock.h b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_conf.h b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_int.h b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_int.h +++ b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/mdk_v5/tmr1.uvoptx b/project/at_start_f413/examples/debug/tmr1/mdk_v5/tmr1.uvoptx deleted file mode 100644 index ce27d0d..0000000 --- a/project/at_start_f413/examples/debug/tmr1/mdk_v5/tmr1.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - tmr1 - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_debug.c - at32f413_debug.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/debug/tmr1/mdk_v5/tmr1.uvprojx b/project/at_start_f413/examples/debug/tmr1/mdk_v5/tmr1.uvprojx index 4d1041e..c12ced2 100644 --- a/project/at_start_f413/examples/debug/tmr1/mdk_v5/tmr1.uvprojx +++ b/project/at_start_f413/examples/debug/tmr1/mdk_v5/tmr1.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/debug/tmr1/readme.txt b/project/at_start_f413/examples/debug/tmr1/readme.txt index 33d4ad3..56ae9eb 100644 --- a/project/at_start_f413/examples/debug/tmr1/readme.txt +++ b/project/at_start_f413/examples/debug/tmr1/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c b/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c +++ b/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/src/at32f413_int.c b/project/at_start_f413/examples/debug/tmr1/src/at32f413_int.c index c89e518..d5252e2 100644 --- a/project/at_start_f413/examples/debug/tmr1/src/at32f413_int.c +++ b/project/at_start_f413/examples/debug/tmr1/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/src/main.c b/project/at_start_f413/examples/debug/tmr1/src/main.c index 8c92411..bee754c 100644 --- a/project/at_start_f413/examples/debug/tmr1/src/main.c +++ b/project/at_start_f413/examples/debug/tmr1/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_clock.h b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_conf.h b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_int.h b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_int.h +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvoptx b/project/at_start_f413/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvoptx deleted file mode 100644 index 25c8af5..0000000 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - data_to_gpio_flexible - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvprojx b/project/at_start_f413/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvprojx index c19f67b..ee2bbf3 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvprojx +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/readme.txt b/project/at_start_f413/examples/dma/data_to_gpio_flexible/readme.txt index 6df06b0..4b7a984 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/readme.txt +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_int.c b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_int.c index 960b548..55a2393 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_int.c +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c index 0eff203..ef08774 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_clock.h b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_conf.h b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_int.h b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_int.h +++ b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvoptx b/project/at_start_f413/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvoptx deleted file mode 100644 index 6279c2d..0000000 --- a/project/at_start_f413/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - flash_to_sram - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c - at32f413_flash.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvprojx b/project/at_start_f413/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvprojx index b40597d..ad090b2 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvprojx +++ b/project/at_start_f413/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_dma.c 1 diff --git a/project/at_start_f413/examples/dma/flash_to_sram/readme.txt b/project/at_start_f413/examples/dma/flash_to_sram/readme.txt index 0add0f6..d382607 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/readme.txt +++ b/project/at_start_f413/examples/dma/flash_to_sram/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c +++ b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_int.c b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_int.c index b32336e..00b749c 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_int.c +++ b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/src/main.c b/project/at_start_f413/examples/dma/flash_to_sram/src/main.c index ed30a95..c227f4f 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/src/main.c +++ b/project/at_start_f413/examples/dma/flash_to_sram/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_clock.h b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_conf.h b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_int.h b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_int.h +++ b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/mdk_v5/exint_config.uvoptx b/project/at_start_f413/examples/exint/exint_config/mdk_v5/exint_config.uvoptx deleted file mode 100644 index 9c2f3e5..0000000 --- a/project/at_start_f413/examples/exint/exint_config/mdk_v5/exint_config.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - exint_config - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c - at32f413_exint.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/exint/exint_config/mdk_v5/exint_config.uvprojx b/project/at_start_f413/examples/exint/exint_config/mdk_v5/exint_config.uvprojx index fd15e29..30818d2 100644 --- a/project/at_start_f413/examples/exint/exint_config/mdk_v5/exint_config.uvprojx +++ b/project/at_start_f413/examples/exint/exint_config/mdk_v5/exint_config.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c +
diff --git a/project/at_start_f413/examples/exint/exint_config/readme.txt b/project/at_start_f413/examples/exint/exint_config/readme.txt index 83f42c5..d361b1a 100644 --- a/project/at_start_f413/examples/exint/exint_config/readme.txt +++ b/project/at_start_f413/examples/exint/exint_config/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c b/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c +++ b/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/src/at32f413_int.c b/project/at_start_f413/examples/exint/exint_config/src/at32f413_int.c index 2fb9483..81b68d3 100644 --- a/project/at_start_f413/examples/exint/exint_config/src/at32f413_int.c +++ b/project/at_start_f413/examples/exint/exint_config/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/src/main.c b/project/at_start_f413/examples/exint/exint_config/src/main.c index e7c3fbf..9cd036c 100644 --- a/project/at_start_f413/examples/exint/exint_config/src/main.c +++ b/project/at_start_f413/examples/exint/exint_config/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_clock.h b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_conf.h b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_int.h b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_int.h +++ b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx b/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx deleted file mode 100644 index dfc8b38..0000000 --- a/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - exint_software_trigger - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c - at32f413_exint.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvprojx b/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvprojx index 08e051c..cfb187c 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvprojx +++ b/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt b/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt index 22fd94c..b43ade1 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt +++ b/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c +++ b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_int.c b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_int.c index c2698a0..05cfe11 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_int.c +++ b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/src/main.c b/project/at_start_f413/examples/exint/exint_software_trigger/src/main.c index 22be718..b27bedd 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/src/main.c +++ b/project/at_start_f413/examples/exint/exint_software_trigger/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_clock.h b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_conf.h b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_int.h b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_int.h +++ b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/inc/flash.h b/project/at_start_f413/examples/flash/flash_write_read/inc/flash.h index 9eb2981..c187535 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/inc/flash.h +++ b/project/at_start_f413/examples/flash/flash_write_read/inc/flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx b/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx deleted file mode 100644 index 8dcdc31..0000000 --- a/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - flash_write_read - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\flash.c - flash.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c - at32f413_flash.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvprojx b/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvprojx index 7a3eb08..4b4f06f 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvprojx +++ b/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_flash.c 1 diff --git a/project/at_start_f413/examples/flash/flash_write_read/readme.txt b/project/at_start_f413/examples/flash/flash_write_read/readme.txt index 8b60c27..ea2c8db 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/readme.txt +++ b/project/at_start_f413/examples/flash/flash_write_read/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c +++ b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_int.c b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_int.c index a921583..4b4cad5 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_int.c +++ b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/flash.c b/project/at_start_f413/examples/flash/flash_write_read/src/flash.c index e28a1e5..eecd432 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/src/flash.c +++ b/project/at_start_f413/examples/flash/flash_write_read/src/flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief flash program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/main.c b/project/at_start_f413/examples/flash/flash_write_read/src/main.c index 5bea382..0dd05db 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/src/main.c +++ b/project/at_start_f413/examples/flash/flash_write_read/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_clock.h b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_conf.h b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_int.h b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_int.h +++ b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/inc/operate_spim.h b/project/at_start_f413/examples/flash/operate_spim/inc/operate_spim.h index 00a4b6d..3d00de6 100644 --- a/project/at_start_f413/examples/flash/operate_spim/inc/operate_spim.h +++ b/project/at_start_f413/examples/flash/operate_spim/inc/operate_spim.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file operate_spim.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief operate_spim header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvoptx b/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvoptx deleted file mode 100644 index 415acc2..0000000 --- a/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - operate_spim - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\operate_spim.c - operate_spim.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c - at32f413_flash.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvprojx b/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvprojx index 53cc516..843dabe 100644 --- a/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvprojx +++ b/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_flash.c 1 diff --git a/project/at_start_f413/examples/flash/operate_spim/readme.txt b/project/at_start_f413/examples/flash/operate_spim/readme.txt index ea2c3e9..00aac39 100644 --- a/project/at_start_f413/examples/flash/operate_spim/readme.txt +++ b/project/at_start_f413/examples/flash/operate_spim/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c +++ b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_int.c b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_int.c index 0cbbe92..011595a 100644 --- a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_int.c +++ b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/src/main.c b/project/at_start_f413/examples/flash/operate_spim/src/main.c index 04b5d9e..6df6194 100644 --- a/project/at_start_f413/examples/flash/operate_spim/src/main.c +++ b/project/at_start_f413/examples/flash/operate_spim/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/src/operate_spim.c b/project/at_start_f413/examples/flash/operate_spim/src/operate_spim.c index e0029e5..9e52cde 100644 --- a/project/at_start_f413/examples/flash/operate_spim/src/operate_spim.c +++ b/project/at_start_f413/examples/flash/operate_spim/src/operate_spim.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file operate_spim.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief operate spim program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_clock.h b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_conf.h b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_int.h b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_int.h +++ b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/inc/run_in_spim.h b/project/at_start_f413/examples/flash/run_in_spim/inc/run_in_spim.h index eff754c..a61d20d 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/inc/run_in_spim.h +++ b/project/at_start_f413/examples/flash/run_in_spim/inc/run_in_spim.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file run_in_spim.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief run_in_spim header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx deleted file mode 100644 index aef3aee..0000000 --- a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - run_in_spim - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\run_in_spim.c - run_in_spim.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c - at32f413_flash.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx index d05fe6c..8269793 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx +++ b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx @@ -478,6 +478,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_flash.c 1 diff --git a/project/at_start_f413/examples/flash/run_in_spim/readme.txt b/project/at_start_f413/examples/flash/run_in_spim/readme.txt index 293af53..490f4dc 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/readme.txt +++ b/project/at_start_f413/examples/flash/run_in_spim/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c +++ b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_int.c b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_int.c index 238b23e..a60da3d 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_int.c +++ b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/main.c b/project/at_start_f413/examples/flash/run_in_spim/src/main.c index 96256d1..407d5f8 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/src/main.c +++ b/project/at_start_f413/examples/flash/run_in_spim/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/run_in_spim.c b/project/at_start_f413/examples/flash/run_in_spim/src/run_in_spim.c index 005262d..cc46b05 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/src/run_in_spim.c +++ b/project/at_start_f413/examples/flash/run_in_spim/src/run_in_spim.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file run_in_spim.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief run in spim program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_clock.h b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_conf.h b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_int.h b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_int.h +++ b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx b/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx deleted file mode 100644 index 322d52a..0000000 --- a/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx +++ /dev/null @@ -1,332 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - led_toggle - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 10 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvprojx b/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvprojx index fefd639..b8bce86 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvprojx +++ b/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvprojx @@ -417,6 +417,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_gpio.c 1 diff --git a/project/at_start_f413/examples/gpio/led_toggle/readme.txt b/project/at_start_f413/examples/gpio/led_toggle/readme.txt index 6b63193..9dc3168 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/readme.txt +++ b/project/at_start_f413/examples/gpio/led_toggle/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c +++ b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_int.c b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_int.c index 981f535..d04f40d 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_int.c +++ b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/src/main.c b/project/at_start_f413/examples/gpio/led_toggle/src/main.c index 30ebfba..bdb1999 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/src/main.c +++ b/project/at_start_f413/examples/gpio/led_toggle/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_clock.h b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_conf.h b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_int.h b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_int.h +++ b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx b/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx deleted file mode 100644 index 0423d65..0000000 --- a/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx +++ /dev/null @@ -1,332 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - swjtag_remap - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 10 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvprojx b/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvprojx index 3ed2b48..7f20807 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvprojx +++ b/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvprojx @@ -417,6 +417,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_gpio.c 1 diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt b/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt index bfde011..f398d72 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt +++ b/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c +++ b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_int.c b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_int.c index 8464b6b..633c8c3 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_int.c +++ b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/src/main.c b/project/at_start_f413/examples/gpio/swjtag_remap/src/main.c index a9e347d..2088523 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/src/main.c +++ b/project/at_start_f413/examples/gpio/swjtag_remap/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_clock.h b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_conf.h b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_int.h b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx b/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx deleted file mode 100644 index 809d2f0..0000000 --- a/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - communication_dma - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c - i2c_application.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c - at32f413_i2c.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvprojx b/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvprojx index a5f1902..c1970c5 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvprojx +++ b/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvprojx @@ -442,6 +442,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c +
diff --git a/project/at_start_f413/examples/i2c/communication_dma/readme.txt b/project/at_start_f413/examples/i2c/communication_dma/readme.txt index ea321a8..d1d6aca 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/readme.txt +++ b/project/at_start_f413/examples/i2c/communication_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communicationdma/readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_int.c b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_int.c index c2c502a..2d79258 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/src/main.c b/project/at_start_f413/examples/i2c/communication_dma/src/main.c index 75f0168..9b75543 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/src/main.c +++ b/project/at_start_f413/examples/i2c/communication_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_clock.h b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_conf.h b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_int.h b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx b/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx deleted file mode 100644 index a51e1d4..0000000 --- a/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - communication_int - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c - i2c_application.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c - at32f413_i2c.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvprojx b/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvprojx index 8424567..af4b556 100644 --- a/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvprojx +++ b/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvprojx @@ -437,6 +437,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_dma.c 1 diff --git a/project/at_start_f413/examples/i2c/communication_int/readme.txt b/project/at_start_f413/examples/i2c/communication_int/readme.txt index ade42b1..87909c9 100644 --- a/project/at_start_f413/examples/i2c/communication_int/readme.txt +++ b/project/at_start_f413/examples/i2c/communication_int/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communicationint/readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_int.c b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_int.c index f210561..9d67ec6 100644 --- a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/src/main.c b/project/at_start_f413/examples/i2c/communication_int/src/main.c index 1df1093..6b5bbbf 100644 --- a/project/at_start_f413/examples/i2c/communication_int/src/main.c +++ b/project/at_start_f413/examples/i2c/communication_int/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_clock.h b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_conf.h b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_int.h b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx b/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx deleted file mode 100644 index 9f56b3a..0000000 --- a/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - communication_poll - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c - i2c_application.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c - at32f413_i2c.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvprojx b/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvprojx index dd7be26..15fa7e1 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvprojx +++ b/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvprojx @@ -442,6 +442,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c +
diff --git a/project/at_start_f413/examples/i2c/communication_poll/readme.txt b/project/at_start_f413/examples/i2c/communication_poll/readme.txt index b9ee8b6..ba25a3f 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/readme.txt +++ b/project/at_start_f413/examples/i2c/communication_poll/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communication_poll/readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_int.c b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_int.c index 26d9bdf..4718dd3 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/src/main.c b/project/at_start_f413/examples/i2c/communication_poll/src/main.c index e58a2a3..318d708 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/src/main.c +++ b/project/at_start_f413/examples/i2c/communication_poll/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_clock.h b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_conf.h b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_int.h b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx b/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx deleted file mode 100644 index 60b4c22..0000000 --- a/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - eeprom - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c - i2c_application.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c - at32f413_i2c.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvprojx b/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvprojx index 2c6e532..032e7ec 100644 --- a/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvprojx +++ b/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvprojx @@ -442,6 +442,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c +
diff --git a/project/at_start_f413/examples/i2c/eeprom/readme.txt b/project/at_start_f413/examples/i2c/eeprom/readme.txt index 4c645e9..c75a358 100644 --- a/project/at_start_f413/examples/i2c/eeprom/readme.txt +++ b/project/at_start_f413/examples/i2c/eeprom/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file eeprom/readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_int.c b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_int.c index 61752aa..411d869 100644 --- a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/src/main.c b/project/at_start_f413/examples/i2c/eeprom/src/main.c index 45f47bd..9435e5e 100644 --- a/project/at_start_f413/examples/i2c/eeprom/src/main.c +++ b/project/at_start_f413/examples/i2c/eeprom/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_clock.h b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_conf.h b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_int.h b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx b/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx deleted file mode 100644 index 2037725..0000000 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - halfduplex_dma - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvprojx b/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvprojx index 9ffe3aa..bddb961 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvprojx +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_dma.c 1 diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt b/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt index 6663922..d60c785 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_int.c b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_int.c index 479c421..eb86be8 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/src/main.c b/project/at_start_f413/examples/i2s/halfduplex_dma/src/main.c index 1990e00..85be895 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/src/main.c +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx b/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx deleted file mode 100644 index bfb3bb7..0000000 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - halfduplex_interrupt - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx b/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx index ea3830e..e85001d 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_spi.c 1 diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt b/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt index 63233f8..db9c299 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_int.c b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_int.c index 8358b9f..a01b033 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/main.c b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/main.c index 715c0af..40d946e 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/main.c +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_int.h b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx deleted file mode 100644 index b52734b..0000000 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - spii2s_switch_halfduplex_polling - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvprojx b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvprojx index d5e226c..2a5c665 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvprojx +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_spi.c 1 diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt index 78da95b..2c8b6cc 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_int.c b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_int.c index 1fef1b4..c84f7b7 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c index 525d0dd..9b6f326 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvoptx b/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvoptx deleted file mode 100644 index 6dcd944..0000000 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvoptx +++ /dev/null @@ -1,380 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - deepsleep_rtc - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c - at32f413_exint.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c - at32f413_bpr.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_rtc.c - at32f413_rtc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 14 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvprojx b/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvprojx index c5bc759..45cb85c 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvprojx +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_pwc.c 1 diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt b/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt index 48e0648..68a7f65 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_int.c b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_int.c index 3123513..8c37c21 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/main.c b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/main.c index d77727a..b660727 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/main.c +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx b/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx deleted file mode 100644 index 92e4d27..0000000 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - power_voltage_monitor - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c - at32f413_exint.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvprojx b/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvprojx index 1e6b396..eaa48bd 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvprojx +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_pwc.c 1 diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt b/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt index bea833d..0bd388b 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_int.c b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_int.c index bebb9ef..0c28515 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/main.c b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/main.c index cde1c01..2f8c83a 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/main.c +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx b/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx deleted file mode 100644 index 33c66e8..0000000 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - sleep_tmr2 - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvprojx b/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvprojx index 705965d..34d11c3 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvprojx +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_pwc.c 1 diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt b/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt index e29fb93..0d07257 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_int.c b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_int.c index 327b0b7..8fdc823 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/src/main.c b/project/at_start_f413/examples/pwc/sleep_tmr2/src/main.c index f8815d7..697c4bb 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/src/main.c +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvoptx b/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvoptx deleted file mode 100644 index 1b6b285..0000000 --- a/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - sleep_usart1 - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvprojx b/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvprojx index 3a83b25..0a67b54 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvprojx +++ b/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvprojx @@ -327,8 +327,8 @@ 0 0 0 - 1 - 1 + 3 + 3 1 1 0 diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt b/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt index 9f6b8a6..a2f6c1c 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt +++ b/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_int.c b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_int.c index aca9e36..0925b2f 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/src/main.c b/project/at_start_f413/examples/pwc/sleep_usart1/src/main.c index 9f83724..e81ff1e 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/src/main.c +++ b/project/at_start_f413/examples/pwc/sleep_usart1/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,8 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include - /** @addtogroup AT32F413_periph_examples * @{ @@ -36,57 +34,6 @@ /** @addtogroup 413_PWC_sleep_usart1 PWC_sleep_usart1 * @{ */ - - -/* suport printf function, usemicrolib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} /** * @brief usart1 configuration. diff --git a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvoptx b/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvoptx deleted file mode 100644 index bcb392a..0000000 --- a/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvoptx +++ /dev/null @@ -1,368 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - standby_rtc - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c - at32f413_bpr.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_rtc.c - at32f413_rtc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 13 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvprojx b/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvprojx index 636634a..1a6a991 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvprojx +++ b/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_pwc.c 1 diff --git a/project/at_start_f413/examples/pwc/standby_rtc/readme.txt b/project/at_start_f413/examples/pwc/standby_rtc/readme.txt index d8ae00e..36b9a74 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/readme.txt +++ b/project/at_start_f413/examples/pwc/standby_rtc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_int.c b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_int.c index 0b4cc48..abf8298 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/src/main.c b/project/at_start_f413/examples/pwc/standby_rtc/src/main.c index b8888fe..5d03e87 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/src/main.c +++ b/project/at_start_f413/examples/pwc/standby_rtc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx b/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx deleted file mode 100644 index 74914d9..0000000 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - standby_wakeup_pin - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvprojx b/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvprojx index 33eafdd..7da4eca 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvprojx +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_pwc.c 1 diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt b/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt index 2ea19d8..aa05617 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_int.c b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_int.c index a6890fd..9d934e7 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c index 38369ce..3d20b81 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -80,7 +80,7 @@ int main(void) for(index = 0; index < 0xFFFFFF; index++); /* enable wakeup pin - pa0 */ - pwc_wakeup_pin_enable(TRUE); + pwc_wakeup_pin_enable(PWC_WAKEUP_PIN_1, TRUE); /* enter standby mode */ pwc_standby_mode_enter(); diff --git a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_clock.h b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_conf.h b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_int.h b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_int.h +++ b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/inc/rtc.h b/project/at_start_f413/examples/rtc/calendar/inc/rtc.h index 2c3afbd..b965e34 100644 --- a/project/at_start_f413/examples/rtc/calendar/inc/rtc.h +++ b/project/at_start_f413/examples/rtc/calendar/inc/rtc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file rtc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief this file provides template for calendar api. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/mdk_v5/calendar.uvoptx b/project/at_start_f413/examples/rtc/calendar/mdk_v5/calendar.uvoptx deleted file mode 100644 index 473d2f6..0000000 --- a/project/at_start_f413/examples/rtc/calendar/mdk_v5/calendar.uvoptx +++ /dev/null @@ -1,392 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - calendar - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\src\rtc.c - rtc.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_rtc.c - at32f413_rtc.c - 0 - 0 - - - 3 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c - at32f413_bpr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 13 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 14 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 15 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/rtc/calendar/readme.txt b/project/at_start_f413/examples/rtc/calendar/readme.txt index c658f76..45b8159 100644 --- a/project/at_start_f413/examples/rtc/calendar/readme.txt +++ b/project/at_start_f413/examples/rtc/calendar/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c b/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c +++ b/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/src/at32f413_int.c b/project/at_start_f413/examples/rtc/calendar/src/at32f413_int.c index ec7e81e..ed0bf5b 100644 --- a/project/at_start_f413/examples/rtc/calendar/src/at32f413_int.c +++ b/project/at_start_f413/examples/rtc/calendar/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/src/main.c b/project/at_start_f413/examples/rtc/calendar/src/main.c index 440fc2c..6ae50cd 100644 --- a/project/at_start_f413/examples/rtc/calendar/src/main.c +++ b/project/at_start_f413/examples/rtc/calendar/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include "stdio.h" #include "rtc.h" /** @addtogroup AT32F413_periph_examples @@ -39,77 +38,6 @@ char const weekday_table[7][10] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; -/* suport printf function, usemicrolib is unnecessary */ -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief initialize uart1 - * @param baudrate: uart baudrate - * @retval none - */ -void uart_print_init(uint32_t baud_rate) -{ - gpio_init_type gpio_initstructure; - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_initstructure.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_initstructure.gpio_pull = GPIO_PULL_NONE; - gpio_initstructure.gpio_mode = GPIO_MODE_MUX; - gpio_initstructure.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_initstructure.gpio_pins = GPIO_PINS_9; - gpio_init(GPIOA, &gpio_initstructure); - - usart_init(USART1, baud_rate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_parity_selection_config(USART1, USART_PARITY_NONE); - usart_transmitter_enable(USART1, TRUE); - usart_interrupt_enable(USART1, USART_RDBF_INT, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief init alarm. * @param none diff --git a/project/at_start_f413/examples/rtc/calendar/src/rtc.c b/project/at_start_f413/examples/rtc/calendar/src/rtc.c index 2357e13..43c1628 100644 --- a/project/at_start_f413/examples/rtc/calendar/src/rtc.c +++ b/project/at_start_f413/examples/rtc/calendar/src/rtc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file rtc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief this file provides template for calendar api. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_clock.h b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_conf.h b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_int.h b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_int.h +++ b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/mdk_v5/lick_calibration.uvoptx b/project/at_start_f413/examples/rtc/lick_calibration/mdk_v5/lick_calibration.uvoptx deleted file mode 100644 index 98a01f2..0000000 --- a/project/at_start_f413/examples/rtc/lick_calibration/mdk_v5/lick_calibration.uvoptx +++ /dev/null @@ -1,392 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - lick_calibration - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c - at32f413_pwc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_rtc.c - at32f413_rtc.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c - at32f413_bpr.c - 0 - 0 - - - 3 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 13 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 14 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 15 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/rtc/lick_calibration/readme.txt b/project/at_start_f413/examples/rtc/lick_calibration/readme.txt index d9c4b65..7ca7003 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/readme.txt +++ b/project/at_start_f413/examples/rtc/lick_calibration/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c +++ b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_int.c b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_int.c index 78f502a..62255bd 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_int.c +++ b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/src/main.c b/project/at_start_f413/examples/rtc/lick_calibration/src/main.c index d3f34c7..0bdcab9 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/src/main.c +++ b/project/at_start_f413/examples/rtc/lick_calibration/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include "stdio.h" /** @addtogroup AT32F413_periph_examples * @{ @@ -41,77 +40,6 @@ __IO uint32_t periodvalue = 0; __IO uint32_t lickfreq = 0; __IO uint32_t operationcomplete = 0; -/* suport printf function, usemicrolib is unnecessary */ -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief timer2 configuration. - * @param none - * @retval none - */ -void uart_print_init(uint32_t baud_rate) -{ - gpio_init_type gpio_initstructure; - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_initstructure.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_initstructure.gpio_pull = GPIO_PULL_NONE; - gpio_initstructure.gpio_mode = GPIO_MODE_MUX; - gpio_initstructure.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_initstructure.gpio_pins = GPIO_PINS_9; - gpio_init(GPIOA, &gpio_initstructure); - - usart_init(USART1, baud_rate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_parity_selection_config(USART1, USART_PARITY_NONE); - usart_transmitter_enable(USART1, TRUE); - usart_interrupt_enable(USART1, USART_RDBF_INT, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief configures the nested vectored interrupt controller. * @param none diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32_sdio.h b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32_sdio.h index f61225e..18b63ed 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32_sdio.h +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief this file contains all the functions prototypes for the sd/mmc * card at32_sdio driver firmware library. ************************************************************************** diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_clock.h b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_conf.h b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_int.h b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_int.h +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/mdk_v5/sd_mmc_card.uvoptx b/project/at_start_f413/examples/sdio/sd_mmc_card/mdk_v5/sd_mmc_card.uvoptx deleted file mode 100644 index 3d855f8..0000000 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/mdk_v5/sd_mmc_card.uvoptx +++ /dev/null @@ -1,380 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - sd_mmc_card - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\at32_sdio.c - at32_sdio.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_sdio.c - at32f413_sdio.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 14 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt b/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt index 86cb592..fcd320e 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c index f2fe0f6..8d7cc6c 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief this file provides a set of functions needed to manage the * sdio/mmc card memory. ************************************************************************** diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_int.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_int.c index 408af61..1a91d52 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_int.c +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/main.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/main.c index 26d8bee..5a62490 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/main.c +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -24,7 +24,6 @@ ************************************************************************** */ -#include #include #include #include "at32_sdio.h" @@ -54,81 +53,6 @@ uint8_t buffer_compare(uint8_t* pbuffer1, uint8_t* pbuffer2, uint16_t buffer_len static void sd_test_error(void); static void nvic_configuration(void); -/* suport printf function, usemicrolib is unnecessary */ -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief initialize uart1 - * @param baudrate: uart baudrate - * @retval none - */ -void uart_print_init(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief sd card single block read/write test. * @param none diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32_sdio.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32_sdio.h index 750744a..abab4d0 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32_sdio.h +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief this file contains all the functions prototypes for the sd/mmc * card at32_sdio driver firmware library. ************************************************************************** diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_clock.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_conf.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_int.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_int.h +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/mdk_v5/sdio_fatfs.uvoptx b/project/at_start_f413/examples/sdio/sdio_fatfs/mdk_v5/sdio_fatfs.uvoptx deleted file mode 100644 index acf0288..0000000 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/mdk_v5/sdio_fatfs.uvoptx +++ /dev/null @@ -1,436 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - sdio_fatfs - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\at32_sdio.c - at32_sdio.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - 1 - 5 - 1 - 0 - 0 - 0 - ..\src\diskio.c - diskio.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_sdio.c - at32f413_sdio.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 13 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 14 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - fatfs - 0 - 0 - 0 - 0 - - 5 - 15 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\middlewares\3rd_party\fatfs\source\ff.c - ff.c - 0 - 0 - - - 5 - 16 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\middlewares\3rd_party\fatfs\source\ffsystem.c - ffsystem.c - 0 - 0 - - - 5 - 17 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\middlewares\3rd_party\fatfs\source\ffunicode.c - ffunicode.c - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 6 - 18 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt b/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt index 7fa41c8..e17e985 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c index c62299d..836638e 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief this file provides a set of functions needed to manage the * sdio/mmc card memory. ************************************************************************** diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_int.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_int.c index bd64c7a..1f64ae6 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_int.c +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/main.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/main.c index 4325bcd..70ede8b 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/main.c +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -24,7 +24,6 @@ ************************************************************************** */ -#include #include #include #include "at32_sdio.h" @@ -48,81 +47,6 @@ uint8_t buffer_compare(uint8_t* pbuffer1, uint8_t* pbuffer2, uint16_t buffer_len static void sd_test_error(void); static void nvic_configuration(void); -/* suport printf function, usemicrolib is unnecessary */ -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief initialize uart1 - * @param baudrate: uart baudrate - * @retval none - */ -void uart_print_init(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief compares two buffers. * @param pbuffer1, pbuffer2: buffers to be compared. diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_int.h b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx b/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx deleted file mode 100644 index a8d534b..0000000 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - crc_transfer_polling - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvprojx b/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvprojx index 284db12..6614d4d 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvprojx +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_spi.c 1 diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt b/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt index eff3d81..4699c4f 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_int.c b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_int.c index bb5995f..04b3a16 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/src/main.c b/project/at_start_f413/examples/spi/crc_transfer_polling/src/main.c index 7e2ae2e..0295cbb 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/src/main.c +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include /** @addtogroup AT32F413_periph_examples * @{ diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_int.h b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx b/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx deleted file mode 100644 index bb0b76b..0000000 --- a/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - fullduplex_polling - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvprojx b/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvprojx index f0c97b9..a4c6495 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvprojx +++ b/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_spi.c 1 diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt b/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt index b4ff636..ce2075e 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt +++ b/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_int.c b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_int.c index defd4e4..b6ac956 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/src/main.c b/project/at_start_f413/examples/spi/fullduplex_polling/src/main.c index 2dae04b..b7e9727 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/src/main.c +++ b/project/at_start_f413/examples/spi/fullduplex_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include /** @addtogroup AT32F413_periph_examples * @{ diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx b/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx deleted file mode 100644 index bfb3bb7..0000000 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - halfduplex_interrupt - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx b/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx index ea3830e..e85001d 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_spi.c 1 diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt b/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt index d07814f..5a4678e 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_int.c b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_int.c index 0c0de3b..19e3e03 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/main.c b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/main.c index c92a3c0..66cbf0e 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/main.c +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include /** @addtogroup AT32F413_periph_examples * @{ @@ -45,7 +44,7 @@ uint8_t spi1_tx_buffer[BUFFER_SIZE] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20}; uint8_t spi2_rx_buffer[BUFFER_SIZE]; -uint32_t tx_index = 0, rx_index = 0; +volatile uint32_t tx_index = 0, rx_index = 0; volatile error_status transfer_status = ERROR; static void gpio_config(void); diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_int.h b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx deleted file mode 100644 index 1f4b36d..0000000 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - halfduplex_transceiver_switch - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvprojx b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvprojx index baec1e2..1cf127e 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvprojx +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_spi.c 1 diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt index eb8873c..9b532cd 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_int.c b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_int.c index 8b271d3..0282a65 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/main.c b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/main.c index 510b354..563e374 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/main.c +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include /** @addtogroup AT32F413_periph_examples * @{ @@ -49,7 +48,7 @@ uint8_t spi2_tx_buffer[BUFFER_SIZE] = {0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70}; uint8_t spi1_rx_buffer[BUFFER_SIZE], spi2_rx_buffer[BUFFER_SIZE]; -uint32_t tx_index = 0, rx_index = 0; +volatile uint32_t tx_index = 0, rx_index = 0; volatile error_status transfer_status1 = ERROR, transfer_status2 = ERROR; static void gpio_config(void); diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_int.h b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx b/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx deleted file mode 100644 index 5a968b5..0000000 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - only_receive_mode_polling - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvprojx b/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvprojx index d3dca81..b293513 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvprojx +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_spi.c 1 diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt b/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt index a2aabb8..3650634 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_int.c b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_int.c index da5085b..067e612 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/main.c b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/main.c index b913fc6..80c8ae7 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/main.c +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include /** @addtogroup AT32F413_periph_examples * @{ diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_int.h b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx deleted file mode 100644 index d3d51c5..0000000 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - use_jtagpin_hardwarecs_dma - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvprojx b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvprojx index 8f1187c..a3215c2 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvprojx +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_dma.c 1 diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt index 9cdd906..57c6092 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_int.c b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_int.c index e483269..26e9a94 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c index 5f1d6b8..b2506e0 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include /** @addtogroup AT32F413_periph_examples * @{ diff --git a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_int.h b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/inc/spi_flash.h b/project/at_start_f413/examples/spi/w25q_flash/inc/spi_flash.h index 21daa81..d5b5200 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/inc/spi_flash.h +++ b/project/at_start_f413/examples/spi/w25q_flash/inc/spi_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file spi_flash.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of spi_flash ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/mdk_v5/w25q_flash.uvoptx b/project/at_start_f413/examples/spi/w25q_flash/mdk_v5/w25q_flash.uvoptx deleted file mode 100644 index 55ff205..0000000 --- a/project/at_start_f413/examples/spi/w25q_flash/mdk_v5/w25q_flash.uvoptx +++ /dev/null @@ -1,380 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - w25q_flash - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\spi_flash.c - spi_flash.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c - at32f413_spi.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c - at32f413_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 14 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/spi/w25q_flash/readme.txt b/project/at_start_f413/examples/spi/w25q_flash/readme.txt index 94f715c..774d3f1 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/readme.txt +++ b/project/at_start_f413/examples/spi/w25q_flash/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_int.c b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_int.c index 56f3318..303deb9 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/main.c b/project/at_start_f413/examples/spi/w25q_flash/src/main.c index 2e3e795..4d44647 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/src/main.c +++ b/project/at_start_f413/examples/spi/w25q_flash/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include #include "spi_flash.h" /** @addtogroup AT32F413_periph_examples @@ -44,89 +43,9 @@ uint8_t tx_buffer[BUF_SIZE]; uint8_t rx_buffer[BUF_SIZE]; volatile error_status transfer_status = ERROR; -static void usart1_config(uint32_t baudrate); void tx_data_fill(void); error_status buffer_compare(uint8_t* pbuffer1, uint8_t* pbuffer2, uint16_t buffer_length); -/* suport printf function, usemicrolib is unnecessary */ - -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls - -__io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - -/** - * @brief usart1 configuration. - * @param none - * @retval none - */ -static void usart1_config(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief transfer data fill. * @param none @@ -174,7 +93,7 @@ int main(void) system_clock_config(); at32_board_init(); tx_data_fill(); - usart1_config(115200); + uart_print_init(115200); spiflash_init(); flash_id_index = spiflash_read_id(); if(flash_id_index != W25Q128) diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/spi_flash.c b/project/at_start_f413/examples/spi/w25q_flash/src/spi_flash.c index b58dc5a..a64e1bc 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/src/spi_flash.c +++ b/project/at_start_f413/examples/spi/w25q_flash/src/spi_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file spi_flash.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief spi_flash source code ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/extend_sram.ewp b/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/extend_sram.ewp index d05167d..77ed152 100644 --- a/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/extend_sram.ewp +++ b/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/extend_sram.ewp @@ -49,16 +49,16 @@
readme diff --git a/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/extend_sram.ewt b/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/extend_sram.ewt index 492a914..4137a1b 100644 --- a/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/extend_sram.ewt +++ b/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/extend_sram.ewt @@ -2393,6 +2393,9 @@ $PROJ_DIR$\..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + $PROJ_DIR$\..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + $PROJ_DIR$\..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c diff --git a/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/startup_at32f413_ext_ram.s b/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/startup_at32f413_ext_ram.s index 74e60ac..45794fa 100644 --- a/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/startup_at32f413_ext_ram.s +++ b/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/startup_at32f413_ext_ram.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f413.s -;* @version v2.0.0 -;* @date 2021-11-26 +;* @version v2.0.2 +;* @date 2021-12-31 ;* @brief at32f413 startup file for IAR Systems ;************************************************************************** ; diff --git a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_clock.h b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_conf.h b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_int.h b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_int.h +++ b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvoptx b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvoptx deleted file mode 100644 index 7e7d56e..0000000 --- a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvoptx +++ /dev/null @@ -1,626 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - set_sram_64k - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - set_sram_32k - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 1 - 0 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 0 - - 0 - - 1 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - -1 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - set_sram_16k - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 1 - 0 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 0 - - 0 - - 1 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - -1 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c - at32f413_flash.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - .\startup_at32f413_ext_ram.s - startup_at32f413_ext_ram.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvprojx b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvprojx index c697d00..ed720bd 100644 --- a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvprojx +++ b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvprojx @@ -417,6 +417,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_flash.c 1 @@ -872,6 +877,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_flash.c 1 @@ -1327,6 +1337,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_flash.c 1 diff --git a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/startup_at32f413_ext_ram.s b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/startup_at32f413_ext_ram.s index 303ffdf..52e6821 100644 --- a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/startup_at32f413_ext_ram.s +++ b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/startup_at32f413_ext_ram.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f403a_407.s -;* @version v2.0.0 -;* @date 2021-11-26 +;* @version v2.0.2 +;* @date 2021-12-31 ;* @brief at32f403a_407 startup file for keil ;************************************************************************** ; diff --git a/project/at_start_f413/examples/sram/extend_sram/readme.txt b/project/at_start_f413/examples/sram/extend_sram/readme.txt index 20ef313..a3a029f 100644 --- a/project/at_start_f413/examples/sram/extend_sram/readme.txt +++ b/project/at_start_f413/examples/sram/extend_sram/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c +++ b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_int.c b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_int.c index 7830be2..7c057c7 100644 --- a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_int.c +++ b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/src/main.c b/project/at_start_f413/examples/sram/extend_sram/src/main.c index 1ec201b..afa9773 100644 --- a/project/at_start_f413/examples/sram/extend_sram/src/main.c +++ b/project/at_start_f413/examples/sram/extend_sram/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx b/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx deleted file mode 100644 index 74ee150..0000000 --- a/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - 6_steps - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx b/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx index 3627981..17dff39 100644 --- a/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx +++ b/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/6_steps/readme.txt b/project/at_start_f413/examples/tmr/6_steps/readme.txt index 1e57cd8..ac9791b 100644 --- a/project/at_start_f413/examples/tmr/6_steps/readme.txt +++ b/project/at_start_f413/examples/tmr/6_steps/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_int.c b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_int.c index dde35a7..bd62167 100644 --- a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/src/main.c b/project/at_start_f413/examples/tmr/6_steps/src/main.c index 3a0da98..759bd77 100644 --- a/project/at_start_f413/examples/tmr/6_steps/src/main.c +++ b/project/at_start_f413/examples/tmr/6_steps/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx b/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx deleted file mode 100644 index 110e1b0..0000000 --- a/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - 7_pwm_output - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvprojx b/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvprojx index 9dfbc1e..b8093df 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvprojx +++ b/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt b/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt index c56c7d2..cba1b52 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt +++ b/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_int.c b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_int.c index 6141e3b..7b1765c 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/src/main.c b/project/at_start_f413/examples/tmr/7_pwm_output/src/main.c index 68d0cf9..353d939 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/src/main.c +++ b/project/at_start_f413/examples/tmr/7_pwm_output/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx b/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx deleted file mode 100644 index 6532832..0000000 --- a/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - cascade_synchro - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvprojx b/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvprojx index 3579cd5..9f1a0d5 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvprojx +++ b/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/readme.txt b/project/at_start_f413/examples/tmr/cascade_synchro/readme.txt index 28ac543..e7ae5cd 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/readme.txt +++ b/project/at_start_f413/examples/tmr/cascade_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_int.c b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_int.c index 5b5b047..3c3ed73 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/src/main.c b/project/at_start_f413/examples/tmr/cascade_synchro/src/main.c index bebbd67..052bc60 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/src/main.c +++ b/project/at_start_f413/examples/tmr/cascade_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx b/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx deleted file mode 100644 index 5f16684..0000000 --- a/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx +++ /dev/null @@ -1,344 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - complementary_signals - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 11 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvprojx b/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvprojx index 0ec9454..21541c1 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvprojx +++ b/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/complementary_signals/readme.txt b/project/at_start_f413/examples/tmr/complementary_signals/readme.txt index 8e71c19..3ed835b 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/readme.txt +++ b/project/at_start_f413/examples/tmr/complementary_signals/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_int.c b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_int.c index ae4a635..c23b7a9 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/src/main.c b/project/at_start_f413/examples/tmr/complementary_signals/src/main.c index 8077af6..44fc34d 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/src/main.c +++ b/project/at_start_f413/examples/tmr/complementary_signals/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/dma/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/dma/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/dma/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvoptx b/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvoptx deleted file mode 100644 index 63ec52c..0000000 --- a/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - dma - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvprojx b/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvprojx index e2d3d6b..03538d1 100644 --- a/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvprojx +++ b/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/dma/readme.txt b/project/at_start_f413/examples/tmr/dma/readme.txt index 4cb4e1d..ef7325d 100644 --- a/project/at_start_f413/examples/tmr/dma/readme.txt +++ b/project/at_start_f413/examples/tmr/dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/src/at32f413_int.c b/project/at_start_f413/examples/tmr/dma/src/at32f413_int.c index 1f7a509..6d88393 100644 --- a/project/at_start_f413/examples/tmr/dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/src/main.c b/project/at_start_f413/examples/tmr/dma/src/main.c index 6ebd255..1864eed 100644 --- a/project/at_start_f413/examples/tmr/dma/src/main.c +++ b/project/at_start_f413/examples/tmr/dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx b/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx deleted file mode 100644 index 81f8aec..0000000 --- a/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx +++ /dev/null @@ -1,356 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - dma_burst - 0x4 - ARM-ADS - - 12000000 - - 0 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 0 - 0 - 1 - - 0 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) - - - - - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - user - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\src\at32f413_clock.c - at32f413_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f413_int.c - at32f413_int.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\src\main.c - main.c - 0 - 0 - - - - - bsp - 0 - 0 - 0 - 0 - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\..\..\..\at32f413_board\at32f413_board.c - at32f413_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c - at32f413_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c - at32f413_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c - at32f413_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c - at32f413_tmr.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c - at32f413_dma.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c - system_at32f413.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s - startup_at32f413.s - 0 - 0 - - - - - readme - 0 - 0 - 0 - 0 - - 5 - 12 - 5 - 0 - 0 - 0 - ..\readme.txt - readme.txt - 0 - 0 - - - -
diff --git a/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvprojx b/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvprojx index eded9ff..020a48a 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvprojx +++ b/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c
+ + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/dma_burst/readme.txt b/project/at_start_f413/examples/tmr/dma_burst/readme.txt index 7dd0a88..dfdb600 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/readme.txt +++ b/project/at_start_f413/examples/tmr/dma_burst/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_int.c b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_int.c index 42afbd0..72f8a1c 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/src/main.c b/project/at_start_f413/examples/tmr/dma_burst/src/main.c index 7130dc5..6e65706 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/src/main.c +++ b/project/at_start_f413/examples/tmr/dma_burst/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvoptx b/project/at_start_f413/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvoptx index d860b5d..4ae94a4 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvoptx +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c at32f413_tmr.c 0 @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvprojx b/project/at_start_f413/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvprojx index 5df38a9..babecc9 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvprojx +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt b/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt index 07c094b..20d072e 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_int.c b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_int.c index 33ad115..10a6901 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/src/main.c b/project/at_start_f413/examples/tmr/encoder_tmr2/src/main.c index 31e45f4..3c9b365 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/src/main.c +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/mdk_v5/external_clock.uvoptx b/project/at_start_f413/examples/tmr/external_clock/mdk_v5/external_clock.uvoptx index 4478fbd..7ac2104 100644 --- a/project/at_start_f413/examples/tmr/external_clock/mdk_v5/external_clock.uvoptx +++ b/project/at_start_f413/examples/tmr/external_clock/mdk_v5/external_clock.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c at32f413_tmr.c 0 @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/external_clock/mdk_v5/external_clock.uvprojx b/project/at_start_f413/examples/tmr/external_clock/mdk_v5/external_clock.uvprojx index fe37c6d..7398478 100644 --- a/project/at_start_f413/examples/tmr/external_clock/mdk_v5/external_clock.uvprojx +++ b/project/at_start_f413/examples/tmr/external_clock/mdk_v5/external_clock.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/external_clock/readme.txt b/project/at_start_f413/examples/tmr/external_clock/readme.txt index a1dbc16..8a1c192 100644 --- a/project/at_start_f413/examples/tmr/external_clock/readme.txt +++ b/project/at_start_f413/examples/tmr/external_clock/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_int.c b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_int.c index 67267b6..4b62492 100644 --- a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/src/main.c b/project/at_start_f413/examples/tmr/external_clock/src/main.c index 2ed9613..424f288 100644 --- a/project/at_start_f413/examples/tmr/external_clock/src/main.c +++ b/project/at_start_f413/examples/tmr/external_clock/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvoptx b/project/at_start_f413/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvoptx index fd0374b..87e02f3 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvoptx +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c at32f413_tmr.c 0 @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvprojx b/project/at_start_f413/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvprojx index c9c90c6..447af8f 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvprojx +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/readme.txt b/project/at_start_f413/examples/tmr/hall_xor_tmr2/readme.txt index 971e707..4aea776 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/readme.txt +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/readme.txt @@ -1,13 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, pa8 output 4.95 khz + this demo is based on the at-start board, in this demo, pa8 output 47 khz waveforms, pa8 toggled each pa3, pa6, pa7 edge. pin connection: - pa0 <---> pa3 diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_int.c b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_int.c index 9109fe4..62ea888 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/main.c b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/main.c index 20c6f43..1d7da08 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/main.c +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -117,17 +117,17 @@ int main(void) { /* generate hall signal */ gpio_bits_set(GPIOA, GPIO_PINS_3); - delay_us(100); + delay_us(10); gpio_bits_set(GPIOA, GPIO_PINS_6); - delay_us(100); + delay_us(10); gpio_bits_set(GPIOA, GPIO_PINS_7); - delay_us(100); + delay_us(10); gpio_bits_reset(GPIOA, GPIO_PINS_3); - delay_us(100); + delay_us(10); gpio_bits_reset(GPIOA, GPIO_PINS_6); - delay_us(100); + delay_us(10); gpio_bits_reset(GPIOA, GPIO_PINS_7); - delay_us(100); + delay_us(10); } } diff --git a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/mdk_v5/hang_mode.uvoptx b/project/at_start_f413/examples/tmr/hang_mode/mdk_v5/hang_mode.uvoptx index 8eacb35..c59c251 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/mdk_v5/hang_mode.uvoptx +++ b/project/at_start_f413/examples/tmr/hang_mode/mdk_v5/hang_mode.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c at32f413_tmr.c 0 @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/hang_mode/mdk_v5/hang_mode.uvprojx b/project/at_start_f413/examples/tmr/hang_mode/mdk_v5/hang_mode.uvprojx index 373201b..84f617d 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/mdk_v5/hang_mode.uvprojx +++ b/project/at_start_f413/examples/tmr/hang_mode/mdk_v5/hang_mode.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/hang_mode/readme.txt b/project/at_start_f413/examples/tmr/hang_mode/readme.txt index 9df587f..0684caf 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/readme.txt +++ b/project/at_start_f413/examples/tmr/hang_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_int.c b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_int.c index b0a5a37..0c32084 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/src/main.c b/project/at_start_f413/examples/tmr/hang_mode/src/main.c index b0e859d..857fcec 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/src/main.c +++ b/project/at_start_f413/examples/tmr/hang_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/readme.txt b/project/at_start_f413/examples/tmr/input_capture/readme.txt index b3c2e28..7e1626e 100644 --- a/project/at_start_f413/examples/tmr/input_capture/readme.txt +++ b/project/at_start_f413/examples/tmr/input_capture/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_int.c b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_int.c index fa36134..1de33ed 100644 --- a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/src/main.c b/project/at_start_f413/examples/tmr/input_capture/src/main.c index 5ea6d39..4420b65 100644 --- a/project/at_start_f413/examples/tmr/input_capture/src/main.c +++ b/project/at_start_f413/examples/tmr/input_capture/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include "stdio.h" /** @addtogroup AT32F413_periph_examples * @{ @@ -46,77 +45,6 @@ __IO uint16_t capturenumber = 0; __IO uint16_t ch3readvalue1 = 0, ch3readvalue2 = 0; __IO uint32_t capture = 0; -/** - * @brief initialize print usart - * @param baudrate: uart baudrate - * @retval none - */ -void uart_init(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart clock */ - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - - /* set default parameter */ - gpio_default_para_init(&gpio_init_struct); - - /* configure uart tx gpio */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - /* configure uart rx gpio */ - gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; - gpio_init_struct.gpio_pins = GPIO_PINS_10; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure usart */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_parity_selection_config(USART1, USART_PARITY_NONE); - usart_transmitter_enable(USART1, TRUE); - usart_receiver_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - -/* suport printf function, usemicrolib is unnecessary */ -#ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - - FILE __stdout; - - void _sys_exit(int x) - { - x = x; - } -#endif - -#ifdef __GNUC__ - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls __io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - /** * @brief this function handles tmr3 trigger exception. * @param none @@ -166,7 +94,7 @@ int main(void) at32_board_init(); - uart_init(115200); + uart_print_init(115200); /* get system clock */ crm_clocks_freq_get(&crm_clocks_freq_struct); diff --git a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/mdk_v5/oc_high.uvoptx b/project/at_start_f413/examples/tmr/oc_high/mdk_v5/oc_high.uvoptx index 08fcd1d..e60cd05 100644 --- a/project/at_start_f413/examples/tmr/oc_high/mdk_v5/oc_high.uvoptx +++ b/project/at_start_f413/examples/tmr/oc_high/mdk_v5/oc_high.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 +
@@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/oc_high/mdk_v5/oc_high.uvprojx b/project/at_start_f413/examples/tmr/oc_high/mdk_v5/oc_high.uvprojx index 997fe89..d82b88c 100644 --- a/project/at_start_f413/examples/tmr/oc_high/mdk_v5/oc_high.uvprojx +++ b/project/at_start_f413/examples/tmr/oc_high/mdk_v5/oc_high.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/oc_high/readme.txt b/project/at_start_f413/examples/tmr/oc_high/readme.txt index 31f5842..36a062a 100644 --- a/project/at_start_f413/examples/tmr/oc_high/readme.txt +++ b/project/at_start_f413/examples/tmr/oc_high/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_int.c b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_int.c index ed1647e..9481ec3 100644 --- a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_int.c @@ -1,17 +1,17 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * 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 + * 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, @@ -30,7 +30,7 @@ /** @addtogroup AT32F413_periph_examples * @{ */ - + /** @addtogroup 413_TMR_oc_high * @{ */ @@ -139,26 +139,26 @@ void SysTick_Handler(void) */ void TMR2_GLOBAL_IRQHandler(void) { - if(tmr_flag_get(TMR2, TMR_C1_INT) != RESET) + if(tmr_flag_get(TMR2, TMR_C1_FLAG) != RESET) { /* clear tmr2 channel1 interrupt pending bit */ - tmr_flag_clear(TMR2, TMR_C1_INT); + tmr_flag_clear(TMR2, TMR_C1_FLAG); /* pc.06 turnoff after 1000 ms */ gpio_bits_reset(GPIOC, GPIO_PINS_6); } - else if(tmr_flag_get(TMR2, TMR_C2_INT) != RESET) + else if(tmr_flag_get(TMR2, TMR_C2_FLAG) != RESET) { /* clear tmr2 channel2 interrupt pending bit */ - tmr_flag_clear(TMR2, TMR_C2_INT); + tmr_flag_clear(TMR2, TMR_C2_FLAG); /* pc.07 turnoff after 500 ms */ gpio_bits_reset(GPIOC, GPIO_PINS_7); } - else if(tmr_flag_get(TMR2, TMR_C3_INT) != RESET) + else if(tmr_flag_get(TMR2, TMR_C3_FLAG) != RESET) { /* clear tmr2 channel3 interrupt pending bit */ - tmr_flag_clear(TMR2, TMR_C3_INT); + tmr_flag_clear(TMR2, TMR_C3_FLAG); /* pc.08 turnoff after 250 ms */ gpio_bits_reset(GPIOC, GPIO_PINS_8); @@ -166,7 +166,7 @@ void TMR2_GLOBAL_IRQHandler(void) else { /* clear tmr2 channel4 interrupt pending bit */ - tmr_flag_clear(TMR2, TMR_C4_INT); + tmr_flag_clear(TMR2, TMR_C4_FLAG); /* pc.09 turnoff after 125 ms */ gpio_bits_reset(GPIOC, GPIO_PINS_9); @@ -175,8 +175,8 @@ void TMR2_GLOBAL_IRQHandler(void) /** * @} - */ + */ /** * @} - */ + */ diff --git a/project/at_start_f413/examples/tmr/oc_high/src/main.c b/project/at_start_f413/examples/tmr/oc_high/src/main.c index 05711ed..c5993d7 100644 --- a/project/at_start_f413/examples/tmr/oc_high/src/main.c +++ b/project/at_start_f413/examples/tmr/oc_high/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/mdk_v5/oc_low.uvoptx b/project/at_start_f413/examples/tmr/oc_low/mdk_v5/oc_low.uvoptx index d77379e..30f75b7 100644 --- a/project/at_start_f413/examples/tmr/oc_low/mdk_v5/oc_low.uvoptx +++ b/project/at_start_f413/examples/tmr/oc_low/mdk_v5/oc_low.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/oc_low/mdk_v5/oc_low.uvprojx b/project/at_start_f413/examples/tmr/oc_low/mdk_v5/oc_low.uvprojx index e5580bd..efefdec 100644 --- a/project/at_start_f413/examples/tmr/oc_low/mdk_v5/oc_low.uvprojx +++ b/project/at_start_f413/examples/tmr/oc_low/mdk_v5/oc_low.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/oc_low/readme.txt b/project/at_start_f413/examples/tmr/oc_low/readme.txt index 5be2d6c..eb58d26 100644 --- a/project/at_start_f413/examples/tmr/oc_low/readme.txt +++ b/project/at_start_f413/examples/tmr/oc_low/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_int.c b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_int.c index 515f683..cb6049f 100644 --- a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_int.c @@ -1,17 +1,17 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * 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 + * 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, @@ -30,7 +30,7 @@ /** @addtogroup AT32F413_periph_examples * @{ */ - + /** @addtogroup 413_TMR_oc_low * @{ */ @@ -139,26 +139,26 @@ void SysTick_Handler(void) */ void TMR2_GLOBAL_IRQHandler(void) { - if(tmr_flag_get(TMR2, TMR_C1_INT) != RESET) + if(tmr_flag_get(TMR2, TMR_C1_FLAG) != RESET) { /* clear tmr2 channel1 interrupt pending bit */ - tmr_flag_clear(TMR2, TMR_C1_INT); + tmr_flag_clear(TMR2, TMR_C1_FLAG); /* pc.06 turnoff after 1000 ms */ gpio_bits_reset(GPIOC, GPIO_PINS_6); } - else if(tmr_flag_get(TMR2, TMR_C2_INT) != RESET) + else if(tmr_flag_get(TMR2, TMR_C2_FLAG) != RESET) { /* clear tmr2 channel2 interrupt pending bit */ - tmr_flag_clear(TMR2, TMR_C2_INT); + tmr_flag_clear(TMR2, TMR_C2_FLAG); /* pc.07 turnoff after 500 ms */ gpio_bits_reset(GPIOC, GPIO_PINS_7); } - else if(tmr_flag_get(TMR2, TMR_C3_INT) != RESET) + else if(tmr_flag_get(TMR2, TMR_C3_FLAG) != RESET) { /* clear tmr2 channel3 interrupt pending bit */ - tmr_flag_clear(TMR2, TMR_C3_INT); + tmr_flag_clear(TMR2, TMR_C3_FLAG); /* pc.08 turnoff after 250 ms */ gpio_bits_reset(GPIOC, GPIO_PINS_8); @@ -166,7 +166,7 @@ void TMR2_GLOBAL_IRQHandler(void) else { /* clear tmr2 channel4 interrupt pending bit */ - tmr_flag_clear(TMR2, TMR_C4_INT); + tmr_flag_clear(TMR2, TMR_C4_FLAG); /* pc.09 turnoff after 125 ms */ gpio_bits_reset(GPIOC, GPIO_PINS_9); @@ -175,8 +175,8 @@ void TMR2_GLOBAL_IRQHandler(void) /** * @} - */ + */ /** * @} - */ + */ diff --git a/project/at_start_f413/examples/tmr/oc_low/src/main.c b/project/at_start_f413/examples/tmr/oc_low/src/main.c index 6edca20..5b628d9 100644 --- a/project/at_start_f413/examples/tmr/oc_low/src/main.c +++ b/project/at_start_f413/examples/tmr/oc_low/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvoptx b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvoptx index c5cdbb6..bef1002 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvoptx +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvprojx b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvprojx index 4d94173..88d6d62 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvprojx +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/readme.txt b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/readme.txt index 417a559..efa17f6 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/readme.txt +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_int.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_int.c index 9524190..01b3d8d 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer @@ -147,33 +147,33 @@ void SysTick_Handler(void) void TMR3_GLOBAL_IRQHandler(void) { /* TMR3_CH1 toggling with frequency = 183.1 Hz */ - if(tmr_flag_get(TMR3, TMR_C1_INT) != RESET) + if(tmr_flag_get(TMR3, TMR_C1_FLAG) != RESET) { - tmr_flag_clear(TMR3, TMR_C1_INT ); + tmr_flag_clear(TMR3, TMR_C1_FLAG ); capture = tmr_channel_value_get(TMR3, TMR_SELECT_CHANNEL_1); tmr_channel_value_set(TMR3, TMR_SELECT_CHANNEL_1, capture + ch1_val); } /* TMR3_CH2 toggling with frequency = 366.2 Hz */ - if(tmr_flag_get(TMR3, TMR_C2_INT) != RESET) + if(tmr_flag_get(TMR3, TMR_C2_FLAG) != RESET) { - tmr_flag_clear(TMR3, TMR_C2_INT); + tmr_flag_clear(TMR3, TMR_C2_FLAG); capture = tmr_channel_value_get(TMR3, TMR_SELECT_CHANNEL_2); tmr_channel_value_set(TMR3, TMR_SELECT_CHANNEL_2, capture + ch2_val); } /* TMR3_CH3 toggling with frequency = 732.4 Hz */ - if(tmr_flag_get(TMR3, TMR_C3_INT) != RESET) + if(tmr_flag_get(TMR3, TMR_C3_FLAG) != RESET) { - tmr_flag_clear(TMR3, TMR_C3_INT); + tmr_flag_clear(TMR3, TMR_C3_FLAG); capture = tmr_channel_value_get(TMR3, TMR_SELECT_CHANNEL_3); tmr_channel_value_set(TMR3, TMR_SELECT_CHANNEL_3, capture + ch3_val); } /* TMR3_CH4 toggling with frequency = 1464.8 Hz */ - if(tmr_flag_get(TMR3, TMR_C4_INT) != RESET) + if(tmr_flag_get(TMR3, TMR_C4_FLAG) != RESET) { - tmr_flag_clear(TMR3, TMR_C4_INT); + tmr_flag_clear(TMR3, TMR_C4_FLAG); capture = tmr_channel_value_get(TMR3, TMR_SELECT_CHANNEL_4); tmr_channel_value_set(TMR3, TMR_SELECT_CHANNEL_4, capture + ch4_val); } diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/main.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/main.c index 2c28891..65208ac 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/main.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvoptx b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvoptx index d359abe..f9647a2 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvoptx +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvprojx b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvprojx index 7e51057..42eb298 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvprojx +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/readme.txt b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/readme.txt index 97ea51a..1f83279 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/readme.txt +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_int.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_int.c index 290ddaa..daf7a2a 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer @@ -145,17 +145,17 @@ void SysTick_Handler(void) void TMR1_BRK_TMR9_IRQHandler(void) { /* TMR9_CH1 toggling with frequency = 366.2 Hz */ - if(tmr_flag_get(TMR9, TMR_C1_INT) != RESET) + if(tmr_flag_get(TMR9, TMR_C1_FLAG) != RESET) { - tmr_flag_clear(TMR9, TMR_C1_INT ); + tmr_flag_clear(TMR9, TMR_C1_FLAG ); capture = tmr_channel_value_get(TMR9, TMR_SELECT_CHANNEL_1); tmr_channel_value_set(TMR9, TMR_SELECT_CHANNEL_1, capture + ch1_val); } /* TMR9_CH2 toggling with frequency = 732.4 Hz */ - if(tmr_flag_get(TMR9, TMR_C2_INT) != RESET) + if(tmr_flag_get(TMR9, TMR_C2_FLAG) != RESET) { - tmr_flag_clear(TMR9, TMR_C2_INT); + tmr_flag_clear(TMR9, TMR_C2_FLAG); capture = tmr_channel_value_get(TMR9, TMR_SELECT_CHANNEL_2); tmr_channel_value_set(TMR9, TMR_SELECT_CHANNEL_2, capture + ch2_val); } diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/main.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/main.c index 46a01e3..ddcef3e 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/main.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/mdk_v5/one_cycle.uvoptx b/project/at_start_f413/examples/tmr/one_cycle/mdk_v5/one_cycle.uvoptx index 9ee2336..7e93099 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/mdk_v5/one_cycle.uvoptx +++ b/project/at_start_f413/examples/tmr/one_cycle/mdk_v5/one_cycle.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/one_cycle/mdk_v5/one_cycle.uvprojx b/project/at_start_f413/examples/tmr/one_cycle/mdk_v5/one_cycle.uvprojx index c5d13ad..b545114 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/mdk_v5/one_cycle.uvprojx +++ b/project/at_start_f413/examples/tmr/one_cycle/mdk_v5/one_cycle.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/one_cycle/readme.txt b/project/at_start_f413/examples/tmr/one_cycle/readme.txt index 75d5081..04133cc 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/readme.txt +++ b/project/at_start_f413/examples/tmr/one_cycle/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_int.c b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_int.c index c29c2b8..f587593 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/src/main.c b/project/at_start_f413/examples/tmr/one_cycle/src/main.c index f8774bb..c635a41 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/src/main.c +++ b/project/at_start_f413/examples/tmr/one_cycle/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvoptx b/project/at_start_f413/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvoptx index b68b7c9..df77986 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvoptx +++ b/project/at_start_f413/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvprojx b/project/at_start_f413/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvprojx index 1f9673b..ecf459c 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvprojx +++ b/project/at_start_f413/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/readme.txt b/project/at_start_f413/examples/tmr/parallel_synchro/readme.txt index ed40b8d..848d57f 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/readme.txt +++ b/project/at_start_f413/examples/tmr/parallel_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_int.c b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_int.c index 30bf548..51e1f5a 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/src/main.c b/project/at_start_f413/examples/tmr/parallel_synchro/src/main.c index 20e18f4..0290e0a 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/src/main.c +++ b/project/at_start_f413/examples/tmr/parallel_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/readme.txt b/project/at_start_f413/examples/tmr/pwm_input/readme.txt index 7db2111..3c3fc5e 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_input/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_int.c index 544dfa3..effb75b 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer @@ -145,7 +145,7 @@ void SysTick_Handler(void) void TMR3_GLOBAL_IRQHandler(void) { /* clear tmr3 channel interrupt pending bit */ - tmr_flag_clear(TMR3, TMR_C2_INT); + tmr_flag_clear(TMR3, TMR_C2_FLAG); /* get the input channel data value */ ic2value = tmr_channel_value_get(TMR3, TMR_SELECT_CHANNEL_2); diff --git a/project/at_start_f413/examples/tmr/pwm_input/src/main.c b/project/at_start_f413/examples/tmr/pwm_input/src/main.c index 393e34b..49cf008 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_input/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include "stdio.h" /** @addtogroup AT32F413_periph_examples * @{ @@ -43,7 +42,6 @@ __IO uint32_t frequency = 0; void crm_configuration(void); void gpio_configuration(void); -void uart_init(uint32_t baudrate); /** * @brief configure the tmr3 pins. @@ -78,77 +76,6 @@ void crm_configuration(void) crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); } -/** - * @brief initialize print usart - * @param baudrate: uart baudrate - * @retval none - */ -void uart_init(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart clock */ - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - - /* set default parameter */ - gpio_default_para_init(&gpio_init_struct); - - /* configure uart tx gpio */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - /* configure uart rx gpio */ - gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; - gpio_init_struct.gpio_pins = GPIO_PINS_10; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure usart */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_parity_selection_config(USART1, USART_PARITY_NONE); - usart_transmitter_enable(USART1, TRUE); - usart_receiver_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - -/* suport printf function, usemicrolib is unnecessary */ -#ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - - FILE __stdout; - - void _sys_exit(int x) - { - x = x; - } -#endif - -#ifdef __GNUC__ - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls __io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - /** * @brief main function. * @param none @@ -168,7 +95,7 @@ int main(void) /* gpio configuration */ gpio_configuration(); - uart_init(115200); + uart_print_init(115200); tmr_input_default_para_init(&tmr_ic_init_structure); tmr_ic_init_structure.input_filter_value = 0; diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/readme.txt b/project/at_start_f413/examples/tmr/pwm_input_dma/readme.txt index fe4a8c9..e9a1d58 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_int.c index 80645e9..0c29638 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/src/main.c b/project/at_start_f413/examples/tmr/pwm_input_dma/src/main.c index 98deea9..c6298f8 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -55,7 +55,6 @@ float duty_result; void crm_configuration(void); void gpio_configuration(void); -void uart_init(uint32_t baudrate); void DMA1_Channel2_IRQHandler(void) { @@ -113,77 +112,6 @@ void crm_configuration(void) crm_periph_clock_enable(CRM_DMA1_PERIPH_CLOCK, TRUE); } -/** - * @brief initialize print usart - * @param baudrate: uart baudrate - * @retval none - */ -void uart_init(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart clock */ - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - - /* set default parameter */ - gpio_default_para_init(&gpio_init_struct); - - /* configure uart tx gpio */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - /* configure uart rx gpio */ - gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; - gpio_init_struct.gpio_pins = GPIO_PINS_10; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure usart */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_parity_selection_config(USART1, USART_PARITY_NONE); - usart_transmitter_enable(USART1, TRUE); - usart_receiver_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - -/* suport printf function, usemicrolib is unnecessary */ -#ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - - FILE __stdout; - - void _sys_exit(int x) - { - x = x; - } -#endif - -#ifdef __GNUC__ - /* with gcc/raisonance, small printf (option ld linker->libraries->small printf set to 'yes') calls __io_putchar() */ - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif /* __gnuc__ */ - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - /** * @brief main function. * @param none @@ -203,7 +131,7 @@ int main(void) /* gpio configuration */ gpio_configuration(); - uart_init(115200); + uart_print_init(115200); dma_reset(DMA1_CHANNEL2); dma_default_para_init(&dma_init_structure); diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvoptx b/project/at_start_f413/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvoptx index d56c2a9..042f990 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvoptx +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvprojx b/project/at_start_f413/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvprojx index 3e03bc3..9fdea94 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvprojx +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/readme.txt b/project/at_start_f413/examples/tmr/pwm_output_simulate/readme.txt index 785980f..08e1f05 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_int.c index bb203b6..2c94e60 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer @@ -141,27 +141,27 @@ void SysTick_Handler(void) void TMR2_GLOBAL_IRQHandler(void) { - if(tmr_flag_get(TMR2, TMR_C1_INT) != RESET) + if(tmr_flag_get(TMR2, TMR_C1_FLAG) != RESET) { - tmr_flag_clear(TMR2, TMR_C1_INT ); + tmr_flag_clear(TMR2, TMR_C1_FLAG ); /* Pin PC.06 toggling with frequency = 73.24 Hz */ gpio_bits_write(GPIOC, GPIO_PINS_6, (confirm_state)(1 - gpio_output_data_bit_read(GPIOC, GPIO_PINS_6))); capture = tmr_channel_value_get(TMR2, TMR_SELECT_CHANNEL_1); tmr_channel_value_set(TMR2, TMR_SELECT_CHANNEL_1, capture + ch1_val); } - else if(tmr_flag_get(TMR2, TMR_C2_INT) != RESET) + else if(tmr_flag_get(TMR2, TMR_C2_FLAG) != RESET) { - tmr_flag_clear(TMR2, TMR_C2_INT); + tmr_flag_clear(TMR2, TMR_C2_FLAG); /* Pin PC.06 toggling with frequency = 73.24 Hz */ gpio_bits_write(GPIOC, GPIO_PINS_7, (confirm_state)(1 - gpio_output_data_bit_read(GPIOC, GPIO_PINS_7))); capture = tmr_channel_value_get(TMR2, TMR_SELECT_CHANNEL_2); tmr_channel_value_set(TMR2, TMR_SELECT_CHANNEL_2, capture + ch2_val); } - else if(tmr_flag_get(TMR2, TMR_C3_INT) != RESET) + else if(tmr_flag_get(TMR2, TMR_C3_FLAG) != RESET) { - tmr_flag_clear(TMR2, TMR_C3_INT); + tmr_flag_clear(TMR2, TMR_C3_FLAG); /* Pin PC.06 toggling with frequency = 73.24 Hz */ gpio_bits_write(GPIOC, GPIO_PINS_8, (confirm_state)(1 - gpio_output_data_bit_read(GPIOC, GPIO_PINS_8))); @@ -170,7 +170,7 @@ void TMR2_GLOBAL_IRQHandler(void) } else { - tmr_flag_clear(TMR2, TMR_C4_INT); + tmr_flag_clear(TMR2, TMR_C4_FLAG); /* Pin PC.06 toggling with frequency = 73.24 Hz */ gpio_bits_write(GPIOC, GPIO_PINS_9, (confirm_state)(1 - gpio_output_data_bit_read(GPIOC, GPIO_PINS_9))); diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/main.c b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/main.c index 853a31b..03129f2 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvoptx b/project/at_start_f413/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvoptx index 96180e0..f7e8828 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvoptx +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvprojx b/project/at_start_f413/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvprojx index 7b5c0ee..60b44aa 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvprojx +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt b/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt index 45c72bf..39286d7 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_int.c index 2670cf1..a9ee659 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/main.c b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/main.c index 0015b8c..61abc7e 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvoptx b/project/at_start_f413/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvoptx index 6958ae0..4f19da2 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvoptx +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvprojx b/project/at_start_f413/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvprojx index a7b5742..e359f1e 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvprojx +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt b/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt index d4aabc4..18bc5f4 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_int.c index 38e9d99..552f45c 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/main.c b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/main.c index 925b8f9..75e2c80 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/mdk_v5/timer_base.uvoptx b/project/at_start_f413/examples/tmr/timer_base/mdk_v5/timer_base.uvoptx index b822290..4ce6fc2 100644 --- a/project/at_start_f413/examples/tmr/timer_base/mdk_v5/timer_base.uvoptx +++ b/project/at_start_f413/examples/tmr/timer_base/mdk_v5/timer_base.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c at32f413_tmr.c 0 @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/timer_base/mdk_v5/timer_base.uvprojx b/project/at_start_f413/examples/tmr/timer_base/mdk_v5/timer_base.uvprojx index d19953c..39a321e 100644 --- a/project/at_start_f413/examples/tmr/timer_base/mdk_v5/timer_base.uvprojx +++ b/project/at_start_f413/examples/tmr/timer_base/mdk_v5/timer_base.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_tmr.c 1 diff --git a/project/at_start_f413/examples/tmr/timer_base/readme.txt b/project/at_start_f413/examples/tmr/timer_base/readme.txt index 5ed19db..329482d 100644 --- a/project/at_start_f413/examples/tmr/timer_base/readme.txt +++ b/project/at_start_f413/examples/tmr/timer_base/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_int.c b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_int.c index eb9b470..b4e0903 100644 --- a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/src/main.c b/project/at_start_f413/examples/tmr/timer_base/src/main.c index 9054969..6534859 100644 --- a/project/at_start_f413/examples/tmr/timer_base/src/main.c +++ b/project/at_start_f413/examples/tmr/timer_base/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvoptx b/project/at_start_f413/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvoptx index f28dcb0..6d5d53a 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvoptx +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvprojx b/project/at_start_f413/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvprojx index 6dbffc9..132c114 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvprojx +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/readme.txt b/project/at_start_f413/examples/tmr/tmr1_synchro/readme.txt index 11608ff..fbc5841 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/readme.txt +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_int.c b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_int.c index 768074b..019199d 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/src/main.c b/project/at_start_f413/examples/tmr/tmr1_synchro/src/main.c index b41427f..7971db6 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/src/main.c +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvoptx b/project/at_start_f413/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvoptx index 0558706..74692e1 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvoptx +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvprojx b/project/at_start_f413/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvprojx index fe19b60..19cb950 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvprojx +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt b/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt index 9700fa7..c39d775 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_int.c b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_int.c index 545a9bb..bb5ae90 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/src/main.c b/project/at_start_f413/examples/tmr/tmr2_32bit/src/main.c index 9a30c8d..d8de007 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/src/main.c +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_int.h b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/readme.txt b/project/at_start_f413/examples/usart/half_duplex/readme.txt index 2f94d32..0dae5b5 100644 --- a/project/at_start_f413/examples/usart/half_duplex/readme.txt +++ b/project/at_start_f413/examples/usart/half_duplex/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_int.c b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_int.c index e22918b..798f4ec 100644 --- a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/src/main.c b/project/at_start_f413/examples/usart/half_duplex/src/main.c index 107cbea..03ebaf0 100644 --- a/project/at_start_f413/examples/usart/half_duplex/src/main.c +++ b/project/at_start_f413/examples/usart/half_duplex/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_int.h b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/readme.txt b/project/at_start_f413/examples/usart/hw_flow_control/readme.txt index a091f71..959440a 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/readme.txt +++ b/project/at_start_f413/examples/usart/hw_flow_control/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_int.c b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_int.c index 5257100..6348c48 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/src/main.c b/project/at_start_f413/examples/usart/hw_flow_control/src/main.c index 19c561e..3be56f6 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/src/main.c +++ b/project/at_start_f413/examples/usart/hw_flow_control/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_int.h b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/readme.txt b/project/at_start_f413/examples/usart/idle_detection/readme.txt index 698ae6b..7b0b42c 100644 --- a/project/at_start_f413/examples/usart/idle_detection/readme.txt +++ b/project/at_start_f413/examples/usart/idle_detection/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_int.c b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_int.c index 975d8ff..24538b5 100644 --- a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/src/main.c b/project/at_start_f413/examples/usart/idle_detection/src/main.c index 3a0304e..a3accaf 100644 --- a/project/at_start_f413/examples/usart/idle_detection/src/main.c +++ b/project/at_start_f413/examples/usart/idle_detection/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/readme.txt b/project/at_start_f413/examples/usart/interrupt/readme.txt index 2fa4cff..a000a36 100644 --- a/project/at_start_f413/examples/usart/interrupt/readme.txt +++ b/project/at_start_f413/examples/usart/interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/src/at32f413_int.c b/project/at_start_f413/examples/usart/interrupt/src/at32f413_int.c index 02e07ea..79fbacb 100644 --- a/project/at_start_f413/examples/usart/interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/src/main.c b/project/at_start_f413/examples/usart/interrupt/src/main.c index e5e71bc..1466fe5 100644 --- a/project/at_start_f413/examples/usart/interrupt/src/main.c +++ b/project/at_start_f413/examples/usart/interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -43,10 +43,10 @@ uint8_t usart2_tx_buffer[] = "usart transfer by interrupt: usart2 -> usart3 usin uint8_t usart3_tx_buffer[] = "usart transfer by interrupt: usart3 -> usart2 using interrupt"; uint8_t usart2_rx_buffer[USART3_TX_BUFFER_SIZE]; uint8_t usart3_rx_buffer[USART2_TX_BUFFER_SIZE]; -uint8_t usart2_tx_counter = 0x00; -uint8_t usart3_tx_counter = 0x00; -uint8_t usart2_rx_counter = 0x00; -uint8_t usart3_rx_counter = 0x00; +volatile uint8_t usart2_tx_counter = 0x00; +volatile uint8_t usart3_tx_counter = 0x00; +volatile uint8_t usart2_rx_counter = 0x00; +volatile uint8_t usart3_rx_counter = 0x00; uint8_t usart2_tx_buffer_size = USART2_TX_BUFFER_SIZE; uint8_t usart3_tx_buffer_size = USART3_TX_BUFFER_SIZE; diff --git a/project/at_start_f413/examples/usart/irda/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/irda/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/irda/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/irda/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/irda/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/irda/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/irda/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/inc/at32f413_int.h b/project/at_start_f413/examples/usart/irda/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/irda/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/irda/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/readme.txt b/project/at_start_f413/examples/usart/irda/readme.txt index 766cba0..7d902b9 100644 --- a/project/at_start_f413/examples/usart/irda/readme.txt +++ b/project/at_start_f413/examples/usart/irda/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c b/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/src/at32f413_int.c b/project/at_start_f413/examples/usart/irda/src/at32f413_int.c index a0a3864..aa53df3 100644 --- a/project/at_start_f413/examples/usart/irda/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/irda/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/src/main.c b/project/at_start_f413/examples/usart/irda/src/main.c index d5ba70e..82970f8 100644 --- a/project/at_start_f413/examples/usart/irda/src/main.c +++ b/project/at_start_f413/examples/usart/irda/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/polling/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/polling/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/inc/at32f413_int.h b/project/at_start_f413/examples/usart/polling/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/readme.txt b/project/at_start_f413/examples/usart/polling/readme.txt index 7cb961b..3048cce 100644 --- a/project/at_start_f413/examples/usart/polling/readme.txt +++ b/project/at_start_f413/examples/usart/polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c b/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/src/at32f413_int.c b/project/at_start_f413/examples/usart/polling/src/at32f413_int.c index 87c61c4..2f8cc22 100644 --- a/project/at_start_f413/examples/usart/polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/src/main.c b/project/at_start_f413/examples/usart/polling/src/main.c index 8d104c8..1bbf416 100644 --- a/project/at_start_f413/examples/usart/polling/src/main.c +++ b/project/at_start_f413/examples/usart/polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/printf/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/printf/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/printf/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/printf/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/printf/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/printf/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/inc/at32f413_int.h b/project/at_start_f413/examples/usart/printf/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/printf/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/printf/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/readme.txt b/project/at_start_f413/examples/usart/printf/readme.txt index 5619ca9..351b514 100644 --- a/project/at_start_f413/examples/usart/printf/readme.txt +++ b/project/at_start_f413/examples/usart/printf/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c b/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/src/at32f413_int.c b/project/at_start_f413/examples/usart/printf/src/at32f413_int.c index fc2265c..af70af4 100644 --- a/project/at_start_f413/examples/usart/printf/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/printf/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/src/main.c b/project/at_start_f413/examples/usart/printf/src/main.c index 9c03b70..b2cb424 100644 --- a/project/at_start_f413/examples/usart/printf/src/main.c +++ b/project/at_start_f413/examples/usart/printf/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,7 +26,6 @@ #include "at32f413_board.h" #include "at32f413_clock.h" -#include "stdio.h" /** @addtogroup AT32F413_periph_examples * @{ @@ -36,83 +35,8 @@ * @{ */ -/* suport printf function, usemicrolib is unnecessary */ -#if (__ARMCC_VERSION > 6000000) - __asm (".global __use_no_semihosting\n\t"); - void _sys_exit(int x) - { - x = x; - } - /* __use_no_semihosting was requested, but _ttywrch was */ - void _ttywrch(int ch) - { - ch = ch; - } - FILE __stdout; -#else - #ifdef __CC_ARM - #pragma import(__use_no_semihosting) - struct __FILE - { - int handle; - }; - FILE __stdout; - void _sys_exit(int x) - { - x = x; - } - #endif -#endif - -#if defined ( __GNUC__ ) && !defined (__clang__) - #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#else - #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#endif - -/** - * @brief retargets the c library printf function to the usart. - * @param none - * @retval none - */ -PUTCHAR_PROTOTYPE -{ - while(usart_flag_get(USART1, USART_TDBE_FLAG) == RESET); - usart_data_transmit(USART1, ch); - return ch; -} - __IO uint32_t time_cnt = 0; -/** - * @brief initialize uart - * @param baudrate: uart baudrate - * @retval none - */ -void uart_print_init(uint32_t baudrate) -{ - gpio_init_type gpio_init_struct; - - /* enable the uart1 and gpio clock */ - crm_periph_clock_enable(CRM_USART1_PERIPH_CLOCK, TRUE); - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); - - gpio_default_para_init(&gpio_init_struct); - - /* configure the uart1 tx pin */ - gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_mode = GPIO_MODE_MUX; - gpio_init_struct.gpio_pins = GPIO_PINS_9; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; - gpio_init(GPIOA, &gpio_init_struct); - - /* configure uart param */ - usart_init(USART1, baudrate, USART_DATA_8BITS, USART_STOP_1_BIT); - usart_transmitter_enable(USART1, TRUE); - usart_enable(USART1, TRUE); -} - /** * @brief main function. * @param none diff --git a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_int.h b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/readme.txt b/project/at_start_f413/examples/usart/receiver_mute/readme.txt index a46dbc2..70caa19 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/readme.txt +++ b/project/at_start_f413/examples/usart/receiver_mute/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_int.c b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_int.c index 9e71ab5..1fa4d19 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/src/main.c b/project/at_start_f413/examples/usart/receiver_mute/src/main.c index dc2d693..75b0cae 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/src/main.c +++ b/project/at_start_f413/examples/usart/receiver_mute/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_int.h b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/inc/smartcard_config.h b/project/at_start_f413/examples/usart/smartcard/inc/smartcard_config.h index fe0dba5..0a7e06f 100644 --- a/project/at_start_f413/examples/usart/smartcard/inc/smartcard_config.h +++ b/project/at_start_f413/examples/usart/smartcard/inc/smartcard_config.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file smartcard_config.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/readme.txt b/project/at_start_f413/examples/usart/smartcard/readme.txt index 80574d8..0bea84d 100644 --- a/project/at_start_f413/examples/usart/smartcard/readme.txt +++ b/project/at_start_f413/examples/usart/smartcard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c b/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/src/at32f413_int.c b/project/at_start_f413/examples/usart/smartcard/src/at32f413_int.c index 4725b98..8762fca 100644 --- a/project/at_start_f413/examples/usart/smartcard/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/smartcard/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/src/main.c b/project/at_start_f413/examples/usart/smartcard/src/main.c index 93fe0d1..a94daf5 100644 --- a/project/at_start_f413/examples/usart/smartcard/src/main.c +++ b/project/at_start_f413/examples/usart/smartcard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -160,8 +160,8 @@ void usart_configuration(void) /* clear sc exint line pending bit */ exint_flag_clear(SC_OFF_EXINT); - /* sc_usart clock set to 4.28mhz (apbclk = 120 mhz / 28) */ - usart_irda_smartcard_division_set(SC_USART, 14); + /* sc_usart clock set to 4mhz (apbclk = 96 mhz / 24) */ + usart_irda_smartcard_division_set(SC_USART, 12); /* sc_usart guard time set to 2 bit */ usart_smartcard_guard_time_set(SC_USART, 0x2); diff --git a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_int.h b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/readme.txt b/project/at_start_f413/examples/usart/synchronous/readme.txt index 3bdf265..ac9a484 100644 --- a/project/at_start_f413/examples/usart/synchronous/readme.txt +++ b/project/at_start_f413/examples/usart/synchronous/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c b/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/src/at32f413_int.c b/project/at_start_f413/examples/usart/synchronous/src/at32f413_int.c index eebb657..1f54617 100644 --- a/project/at_start_f413/examples/usart/synchronous/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/synchronous/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/src/main.c b/project/at_start_f413/examples/usart/synchronous/src/main.c index a1e3b3e..d8ddbcb 100644 --- a/project/at_start_f413/examples/usart/synchronous/src/main.c +++ b/project/at_start_f413/examples/usart/synchronous/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt index 0840e16..a080485 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_int.c b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_int.c index 9d002f8..4c4ca4a 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c index 1cca188..017a4cb 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -43,10 +43,10 @@ uint8_t usart2_tx_buffer[] = "usart transfer by dma interrupt: usart2 -> usart3 uint8_t usart3_tx_buffer[] = "usart transfer by dma interrupt: usart3 -> usart2 using dma"; uint8_t usart2_rx_buffer[USART3_TX_BUFFER_SIZE]; uint8_t usart3_rx_buffer[USART2_TX_BUFFER_SIZE]; -uint8_t usart2_tx_dma_status = 0; -uint8_t usart2_rx_dma_status = 0; -uint8_t usart3_tx_dma_status = 0; -uint8_t usart3_rx_dma_status = 0; +volatile uint8_t usart2_tx_dma_status = 0; +volatile uint8_t usart2_rx_dma_status = 0; +volatile uint8_t usart3_tx_dma_status = 0; +volatile uint8_t usart3_rx_dma_status = 0; /** * @brief config usart diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_int.h b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt b/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt index 7a1a64f..74c8ecb 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_int.c b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_int.c index ef36df8..06d4cdb 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/main.c b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/main.c index c327268..f136a63 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/main.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/audio_codec.h b/project/at_start_f413/examples/usb_device/audio/inc/audio_codec.h index 2ce9a3a..40030f1 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/audio_codec.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/audio_codec.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief audio codec header file ************************************************************************** * Copyright notice & Disclaimer @@ -124,10 +124,38 @@ extern "C" { /** @defgroup USB_device_audio_codec_exported_functions * @{ */ +#define MIC_BUFFER_SIZE 1024 +#define SPK_BUFFER_SIZE 4096 +#define DMA_BUFFER_SIZE 288 + typedef struct { uint32_t audio_freq; uint32_t audio_bitw; + //spk part + uint16_t spk_buffer[SPK_BUFFER_SIZE]; + uint16_t *spk_roff; + uint16_t *spk_woff; + uint16_t *spk_rend; + uint32_t spk_freq; + uint32_t spk_wtotal; + uint32_t spk_rtotal; + uint16_t spk_threshold; + uint16_t spk_calc; + uint8_t spk_stage; + + //mic part + uint16_t mic_buffer[MIC_BUFFER_SIZE]; + uint16_t *mic_roff; + uint16_t *mic_woff; + uint16_t *mic_wend; + uint32_t mic_wtotal; + uint32_t mic_rtotal; + uint32_t mic_delta; + uint16_t mic_calc; + uint16_t mic_adj_count; + uint8_t mic_adj_stage; + uint8_t mic_stage; uint8_t mic_mute; uint8_t spk_mute; @@ -141,22 +169,15 @@ typedef struct uint32_t spk_enable; uint32_t mic_enable; - uint16_t spk_buffer[768]; - uint16_t mic_buffer[768]; - uint32_t mic_hf_status; - - uint32_t feedback_counter; - - uint32_t r_pos; - uint32_t w_pos; - uint16_t spk_tx_fifo[SPK_TX_FIFO_SIZE]; - }audio_codec_type; error_status audio_codec_init(void); error_status audio_codec_loop(void); void audio_codec_modify_freq(uint32_t freq); +/** + * @brief audio codec interface + */ void audio_codec_spk_fifo_write(uint8_t *data, uint32_t len); uint32_t audio_codec_mic_get_data(uint8_t *buffer); uint8_t audio_codec_spk_feedback(uint8_t *feedback); diff --git a/project/at_start_f413/examples/usb_device/audio/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/audio/inc/usb_conf.h index b553838..a9786c1 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/readme.txt b/project/at_start_f413/examples/usb_device/audio/readme.txt index be52b09..4923ab8 100644 --- a/project/at_start_f413/examples/usb_device/audio/readme.txt +++ b/project/at_start_f413/examples/usb_device/audio/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/audio/src/at32f413_int.c index 74c2706..a0718e6 100644 --- a/project/at_start_f413/examples/usb_device/audio/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/audio/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/src/audio_codec.c b/project/at_start_f413/examples/usb_device/audio/src/audio_codec.c index fd229e5..652ae8e 100644 --- a/project/at_start_f413/examples/usb_device/audio/src/audio_codec.c +++ b/project/at_start_f413/examples/usb_device/audio/src/audio_codec.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief audio codec function ************************************************************************** * Copyright notice & Disclaimer @@ -28,6 +28,7 @@ #include "audio_codec.h" #include "i2c_application.h" #include "audio_conf.h" +#include /** @addtogroup AT32F413_periph_examples * @{ @@ -103,6 +104,8 @@ uint16_t reg_addr_data[] = i2c_handle_type hi2cx; audio_codec_type audio_codec; +uint16_t spk_dma_buffer[DMA_BUFFER_SIZE]; +uint16_t mic_dma_buffer[DMA_BUFFER_SIZE]; void memset16_buffer(uint16_t *buffer, uint32_t set, uint32_t len); void codec_i2s_reset(void); @@ -152,15 +155,9 @@ void audio_codec_spk_alt_setting(uint32_t alt_seting) { if(alt_seting == 0) { - memset16_buffer(audio_codec.spk_tx_fifo, 0, SPK_TX_FIFO_SIZE); - audio_codec.r_pos = 0; - audio_codec.w_pos = 0; - audio_codec.spk_enable = 0; } else { - audio_codec.spk_enable = 1; - audio_codec.feedback_counter = 0; } } @@ -173,11 +170,9 @@ void audio_codec_mic_alt_setting(uint32_t alt_seting) { if(alt_seting == 0) { - audio_codec.mic_enable = 0; } else { - audio_codec.mic_enable = 1; } } @@ -232,10 +227,8 @@ void audio_codec_set_spk_volume(uint16_t volume) */ uint8_t audio_codec_spk_feedback(uint8_t *feedback) { - uint32_t feedback_cnt = (audio_codec.feedback_counter) << 1; - float fd_fval = (float) feedback_cnt / (float)1024.0 * (float)16384/*2^14*/; - uint32_t feedback_value = (uint32_t)fd_fval; - audio_codec.feedback_counter = 0; + uint32_t feedback_value = (audio_codec.spk_freq); + feedback_value = ((feedback_value/1000)<<14)|((feedback_value%1000)<<4); feedback[0] = (uint8_t)(feedback_value); feedback[1] = (uint8_t)(feedback_value >> 8); feedback[2] = (uint8_t)(feedback_value >> 16); @@ -250,14 +243,35 @@ uint8_t audio_codec_spk_feedback(uint8_t *feedback) */ void audio_codec_spk_fifo_write(uint8_t *data, uint32_t len) { - uint32_t ulen = len / 2; + uint16_t ulen = len / 2, i; + uint16_t *u16data = (uint16_t *)data; - if(audio_codec.w_pos + ulen > SPK_TX_FIFO_SIZE) + switch(audio_codec.spk_stage) { - audio_codec.w_pos = 0; + case 0: + audio_codec.spk_woff = audio_codec.spk_roff = audio_codec.spk_buffer; + audio_codec.spk_wtotal = audio_codec.spk_rtotal = 0; + audio_codec.spk_stage = 1; + audio_codec.spk_threshold = SPK_BUFFER_SIZE/2; + break; + case 1: + if( audio_codec.spk_wtotal >= SPK_BUFFER_SIZE/2 ) + { + audio_codec.spk_stage = 2; + } + break; + case 2: + break; } - copy_buff(audio_codec.spk_tx_fifo + audio_codec.w_pos, (uint16_t *)data, ulen); - audio_codec.w_pos += ulen; + for( i = 0; i < ulen; ++i ) + { + *audio_codec.spk_woff++ = *u16data++; + if( audio_codec.spk_woff >= audio_codec.spk_rend ) + { + audio_codec.spk_woff = audio_codec.spk_buffer; + } + } + audio_codec.spk_wtotal += ulen; } /** @@ -267,9 +281,57 @@ void audio_codec_spk_fifo_write(uint8_t *data, uint32_t len) */ uint32_t audio_codec_mic_get_data(uint8_t *buffer) { - copy_buff((uint16_t *)buffer, audio_codec.mic_buffer + audio_codec.mic_hf_status, audio_codec.mic_rx_size); + //copy_buff((uint16_t *)buffer, audio_codec.mic_buffer + audio_codec.mic_hf_status, audio_codec.mic_rx_size); + uint16_t len = audio_codec.mic_rx_size << 1; + uint16_t i; + uint16_t* u16buf = (uint16_t*)buffer; + switch(audio_codec.mic_stage) + { + case 0: + audio_codec.mic_stage = 1; + memset( buffer, 0, len ); + return len; + case 1: + if( audio_codec.mic_wtotal - audio_codec.mic_rtotal >= MIC_BUFFER_SIZE/2 ) + { + audio_codec.mic_stage = 2; + } + return len; + } + switch( audio_codec.mic_adj_stage ) + { + case 0: + break; + case 1: + if( audio_codec.mic_adj_count >= 4 ){ + len += 4; + audio_codec.mic_adj_count -= 4; + } + break; + case 2: + if( audio_codec.mic_adj_count >= 4 ){ + len -= 4; + audio_codec.mic_adj_count -= 4; + } + break; + } - return audio_codec.mic_rx_size << 1; + for( i = 0; i < len/2; ++i ) + { + *u16buf++ = *audio_codec.mic_roff++; + if( audio_codec.mic_roff >= audio_codec.mic_wend ) + { + audio_codec.mic_roff = audio_codec.mic_buffer; + } + } + if( audio_codec.mic_wtotal <= audio_codec.mic_rtotal ) + { //should not happen + while(1); + } + + audio_codec.mic_rtotal += len/2; + audio_codec.mic_delta += len/2; + return len; } /** @@ -440,14 +502,27 @@ void codec_i2s_init(audio_codec_type *param) crm_periph_clock_enable(CRM_SPI1_PERIPH_CLOCK, TRUE); crm_periph_clock_enable(CRM_SPI2_PERIPH_CLOCK, TRUE); - param->feedback_counter = 0; + param->spk_freq = param->audio_freq; param->spk_tx_size = (param->audio_freq / 1000) * (param->audio_bitw / 8) * AUDIO_SPK_CHANEL_NUM / 2; param->mic_rx_size = (param->audio_freq / 1000) * (param->audio_bitw / 8) * AUDIO_MIC_CHANEL_NUM / 2; - param->r_pos = 0; - param->w_pos = 0; + memset(param->spk_buffer, 0, SPK_BUFFER_SIZE*sizeof(uint16_t)); + memset(param->mic_buffer, 0, MIC_BUFFER_SIZE*sizeof(uint16_t)); + param->mic_wend = param->mic_woff = param->mic_roff = param->mic_buffer; + param->spk_rend = param->spk_woff = param->spk_roff = param->spk_buffer; + + while(param->mic_wend < param->mic_buffer+MIC_BUFFER_SIZE) + { + param->mic_wend += param->mic_rx_size; + } + param->mic_wend -= param->mic_rx_size; + while(param->spk_rend < param->spk_buffer+SPK_BUFFER_SIZE) + { + param->spk_rend += param->spk_tx_size; + } + param->spk_rend -= param->spk_tx_size; if(param->audio_bitw == 16) { format = I2S_DATA_16BIT_CHANNEL_16BIT; @@ -500,11 +575,10 @@ void codec_i2s_init(audio_codec_type *param) dma_reset(DMA1_CHANNEL4); /* dma1 channel3: speaker i2s1 tx */ - audio_codec.r_pos = 0; dma_default_para_init(&dma_init_struct); dma_init_struct.buffer_size = param->spk_tx_size << 1; dma_init_struct.direction = DMA_DIR_MEMORY_TO_PERIPHERAL; - dma_init_struct.memory_base_addr = (uint32_t)param->spk_buffer; + dma_init_struct.memory_base_addr = (uint32_t)spk_dma_buffer; dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_HALFWORD; dma_init_struct.memory_inc_enable = TRUE; dma_init_struct.peripheral_base_addr = (uint32_t)I2S1_DT_ADDRESS; @@ -518,11 +592,10 @@ void codec_i2s_init(audio_codec_type *param) nvic_irq_enable(DMA1_Channel3_IRQn, 1, 0); /* dma1 channel4: microphone i2s2 rx */ - audio_codec.mic_hf_status = 0; dma_default_para_init(&dma_init_struct); dma_init_struct.buffer_size = param->mic_rx_size << 1; dma_init_struct.direction = DMA_DIR_PERIPHERAL_TO_MEMORY; - dma_init_struct.memory_base_addr = (uint32_t)param->mic_buffer; + dma_init_struct.memory_base_addr = (uint32_t)mic_dma_buffer; dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_HALFWORD; dma_init_struct.memory_inc_enable = TRUE; dma_init_struct.peripheral_base_addr = (uint32_t)I2S2_DT_ADDRESS; @@ -576,22 +649,70 @@ void codec_i2s_init(audio_codec_type *param) void DMA1_Channel3_IRQHandler(void) { uint16_t half_size = audio_codec.spk_tx_size; - audio_codec.feedback_counter += audio_codec.spk_tx_size; - if((audio_codec.r_pos + half_size) > SPK_TX_FIFO_SIZE) - { - audio_codec.r_pos = 0; - } + uint16_t *pdst; + if(dma_flag_get(DMA1_HDT3_FLAG) == SET) { - copy_buff(audio_codec.spk_buffer, audio_codec.spk_tx_fifo + audio_codec.r_pos, half_size); + //copy_buff(audio_codec.spk_buffer, audio_codec.spk_tx_fifo + audio_codec.r_pos, half_size); + pdst = spk_dma_buffer; dma_flag_clear(DMA1_HDT3_FLAG); } else if(dma_flag_get(DMA1_FDT3_FLAG) == SET) { - copy_buff(&audio_codec.spk_buffer[half_size], audio_codec.spk_tx_fifo + audio_codec.r_pos, half_size); + //copy_buff(&audio_codec.spk_buffer[half_size], audio_codec.spk_tx_fifo + audio_codec.r_pos, half_size); + pdst = spk_dma_buffer + half_size; dma_flag_clear(DMA1_FDT3_FLAG); } - audio_codec.r_pos += half_size; + + switch( audio_codec.spk_stage ) + { + case 0: + case 1: + memset( pdst, 0, half_size << 1); + break; + case 2: + if( audio_codec.spk_wtotal >= audio_codec.spk_rtotal + SPK_BUFFER_SIZE ) + { + while(1);//should not happen; + } + if( audio_codec.spk_rtotal >= audio_codec.spk_wtotal ) + { + audio_codec.spk_stage = 0; + audio_codec.spk_woff = audio_codec.spk_roff = audio_codec.spk_buffer; + audio_codec.spk_rtotal = audio_codec.spk_wtotal = 0; + } + else + { + memcpy( pdst, audio_codec.spk_roff, half_size << 1 ); + audio_codec.spk_roff += half_size; + audio_codec.spk_rtotal += half_size; + if( audio_codec.spk_roff >= audio_codec.spk_rend ) + { + audio_codec.spk_roff = audio_codec.spk_buffer; + } + if( ++audio_codec.spk_calc == 256 ) + { + uint16_t delta = audio_codec.spk_wtotal - audio_codec.spk_rtotal; + audio_codec.spk_calc = 0; + if( delta < audio_codec.spk_threshold - half_size ) + { + audio_codec.spk_threshold -= half_size; + audio_codec.spk_freq += audio_codec.audio_freq/1024; + } + else if( delta > audio_codec.spk_threshold + half_size ) + { + audio_codec.spk_threshold += half_size; + audio_codec.spk_freq -= audio_codec.audio_freq/1024; + } + if(audio_codec.spk_rtotal > 0x20000000) + { + audio_codec.spk_rtotal -= 0x10000000; + audio_codec.spk_wtotal -= 0x10000000; + } + } + } + break; + } } @@ -602,16 +723,67 @@ void DMA1_Channel3_IRQHandler(void) */ void DMA1_Channel4_IRQHandler(void) { + uint16_t *psrc; + uint16_t len = audio_codec.mic_rx_size << 1; + if(dma_flag_get(DMA1_HDT4_FLAG) == SET) { dma_flag_clear(DMA1_HDT4_FLAG); - audio_codec.mic_hf_status = 0; + psrc = mic_dma_buffer; } else if(dma_flag_get(DMA1_FDT4_FLAG) == SET) { - audio_codec.mic_hf_status = audio_codec.mic_rx_size; + psrc = mic_dma_buffer + audio_codec.mic_rx_size; dma_flag_clear(DMA1_FDT4_FLAG); } + if( audio_codec.mic_stage ) + { + memcpy( audio_codec.mic_woff, psrc, len ); + audio_codec.mic_woff += len/2; + audio_codec.mic_wtotal += len/2; + if( audio_codec.mic_woff >= audio_codec.mic_wend ) + { + audio_codec.mic_woff = audio_codec.mic_buffer; + } + if( audio_codec.mic_stage == 2 ) + { + if( 1024 == ++audio_codec.mic_calc ) + { + uint32_t size_estimate = 1024*audio_codec.mic_rx_size; + audio_codec.mic_calc = 0; + if( audio_codec.mic_delta > size_estimate ) + { + audio_codec.mic_adj_count = audio_codec.mic_delta - size_estimate; + audio_codec.mic_adj_stage = 2; + } + else if( audio_codec.mic_delta < size_estimate ) + { + audio_codec.mic_adj_count = size_estimate - audio_codec.mic_delta; + audio_codec.mic_adj_stage = 1; + } + else + { + audio_codec.mic_adj_count = 0; + audio_codec.mic_adj_stage = 0; + } + audio_codec.mic_delta = 0; + if( audio_codec.mic_rtotal >= 0x80000000 ) + { + audio_codec.mic_rtotal -= 0x80000000; + audio_codec.mic_wtotal -= 0x80000000; + } + } + if( audio_codec.mic_wtotal >= audio_codec.mic_rtotal + MIC_BUFFER_SIZE ) + { + audio_codec.mic_delta = audio_codec.mic_wtotal = audio_codec.mic_rtotal = 0; + audio_codec.mic_woff = audio_codec.mic_roff = audio_codec.mic_buffer; + audio_codec.mic_stage = 0; + audio_codec.mic_adj_stage = 0; + audio_codec.mic_adj_count = 0; + audio_codec.mic_calc = 0; + } + } + } } /** diff --git a/project/at_start_f413/examples/usb_device/audio/src/main.c b/project/at_start_f413/examples/usb_device/audio/src/main.c index 948eac3..2b6b017 100644 --- a/project/at_start_f413/examples/usb_device/audio/src/main.c +++ b/project/at_start_f413/examples/usb_device/audio/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_clock.h new file mode 100644 index 0000000..fd22786 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_clock.h @@ -0,0 +1,46 @@ +/** + ************************************************************************** + * @file at32f413_clock.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief header file of clock 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. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F413_CLOCK_H +#define __AT32F413_CLOCK_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f413.h" + +/* exported functions ------------------------------------------------------- */ +void system_clock_config(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F413_CLOCK_H */ + diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_conf.h new file mode 100644 index 0000000..5c513f2 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_conf.h @@ -0,0 +1,158 @@ +/** + ************************************************************************** + * @file at32f413_conf.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief at32f413 config header file + ************************************************************************** + * 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. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F413_CONF_H +#define __AT32F413_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief in the following line adjust the value of high speed exernal crystal (hext) + * used in your application + * + * tip: to avoid modifying this file each time you need to use different hext, you + * can define the hext value in your toolchain compiler preprocessor. + * + */ +#if !defined HEXT_VALUE +#define HEXT_VALUE ((uint32_t)8000000) /*!< value of the high speed exernal crystal in hz */ +#endif + +/** + * @brief in the following line adjust the high speed exernal crystal (hext) startup + * timeout value + */ +#define HEXT_STARTUP_TIMEOUT ((uint16_t)0x3000) /*!< time out for hext start up */ +#define HICK_VALUE ((uint32_t)8000000) /*!< value of the high speed internal clock in hz */ + +/* module define -------------------------------------------------------------*/ +#define CRM_MODULE_ENABLED +#define TMR_MODULE_ENABLED +#define RTC_MODULE_ENABLED +#define BPR_MODULE_ENABLED +#define GPIO_MODULE_ENABLED +#define I2C_MODULE_ENABLED +#define USART_MODULE_ENABLED +#define PWC_MODULE_ENABLED +#define CAN_MODULE_ENABLED +#define ADC_MODULE_ENABLED +#define SPI_MODULE_ENABLED +#define DMA_MODULE_ENABLED +#define DEBUG_MODULE_ENABLED +#define FLASH_MODULE_ENABLED +#define CRC_MODULE_ENABLED +#define WWDT_MODULE_ENABLED +#define WDT_MODULE_ENABLED +#define EXINT_MODULE_ENABLED +#define SDIO_MODULE_ENABLED +#define USB_MODULE_ENABLED +#define ACC_MODULE_ENABLED +#define MISC_MODULE_ENABLED + +/* includes ------------------------------------------------------------------*/ +#ifdef CRM_MODULE_ENABLED +#include "at32f413_crm.h" +#endif +#ifdef TMR_MODULE_ENABLED +#include "at32f413_tmr.h" +#endif +#ifdef RTC_MODULE_ENABLED +#include "at32f413_rtc.h" +#endif +#ifdef BPR_MODULE_ENABLED +#include "at32f413_bpr.h" +#endif +#ifdef GPIO_MODULE_ENABLED +#include "at32f413_gpio.h" +#endif +#ifdef I2C_MODULE_ENABLED +#include "at32f413_i2c.h" +#endif +#ifdef USART_MODULE_ENABLED +#include "at32f413_usart.h" +#endif +#ifdef PWC_MODULE_ENABLED +#include "at32f413_pwc.h" +#endif +#ifdef CAN_MODULE_ENABLED +#include "at32f413_can.h" +#endif +#ifdef ADC_MODULE_ENABLED +#include "at32f413_adc.h" +#endif +#ifdef SPI_MODULE_ENABLED +#include "at32f413_spi.h" +#endif +#ifdef DMA_MODULE_ENABLED +#include "at32f413_dma.h" +#endif +#ifdef DEBUG_MODULE_ENABLED +#include "at32f413_debug.h" +#endif +#ifdef FLASH_MODULE_ENABLED +#include "at32f413_flash.h" +#endif +#ifdef CRC_MODULE_ENABLED +#include "at32f413_crc.h" +#endif +#ifdef WWDT_MODULE_ENABLED +#include "at32f413_wwdt.h" +#endif +#ifdef WDT_MODULE_ENABLED +#include "at32f413_wdt.h" +#endif +#ifdef EXINT_MODULE_ENABLED +#include "at32f413_exint.h" +#endif +#ifdef SDIO_MODULE_ENABLED +#include "at32f413_sdio.h" +#endif +#ifdef ACC_MODULE_ENABLED +#include "at32f413_acc.h" +#endif +#ifdef MISC_MODULE_ENABLED +#include "at32f413_misc.h" +#endif +#ifdef USB_MODULE_ENABLED +#include "at32f413_usb.h" +#endif + +/** + * @} + */ + + /** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_int.h new file mode 100644 index 0000000..badfcc8 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_int.h @@ -0,0 +1,58 @@ +/** + ************************************************************************** + * @file at32f413_int.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief header file of main interrupt service routines. + ************************************************************************** + * 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. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F413_INT_H +#define __AT32F413_INT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f413.h" + +/* exported types ------------------------------------------------------------*/ +/* exported constants --------------------------------------------------------*/ +/* exported macro ------------------------------------------------------------*/ +/* exported functions ------------------------------------------------------- */ + +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/audio_codec.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/audio_codec.h new file mode 100644 index 0000000..fe2eec4 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/audio_codec.h @@ -0,0 +1,212 @@ +/** + ************************************************************************** + * @file audio_codec.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief audio codec header file + ************************************************************************** + * 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. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AUDIO_CODEC_H +#define __AUDIO_CODEC_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** @addtogroup AT32F413_periph_examples + * @{ + */ + +/** @addtogroup 413_USB_device_audio_hid + * @{ + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f413.h" + +/** @defgroup USB_device_audio_hid_codec_reg_definition + * @{ + */ +#define WM8988_R0_LEFT_INPUT_VOLUME 0x00 /*Left channel PGA control*/ +#define WM8988_R1_RIGHT_INPUT_VOLUME 0x01 /*Right channel PGA control*/ +#define WM8988_R2_LOUT1_VOLUME 0x02 +#define WM8988_R3_ROUT1_VOLUME 0x03 +#define WM8988_R4_RESERVED 0x04 +#define WM8988_R5_ADC_DAC_CONTROL 0x05 +#define WM8988_R6_RESERVED 0x06 +#define WM8988_R7_AUDIO_INTERFACE 0x07 +#define WM8988_R8_SAMPLE_RATE 0x08 +#define WM8988_R9_RESERVED 0x09 +#define WM8988_R10_LEFT_DAC_VOLUME 0x0A +#define WM8988_R11_RIGHT_DAC_VOLUME 0x0B +#define WM8988_R12_BASS_CONTROL 0x0C +#define WM8988_R13_TREBLE_CONTROL 0x0D +#define WM8988_R14_ +#define WM8988_R15_RESET 0x0F +#define WM8988_R16_3D_CONTROL 0x10 +#define WM8988_R17_ALC1 0x11 +#define WM8988_R18_ALC2 0x12 +#define WM8988_R19_ALC3 0x13 +#define WM8988_R20_NOISE_GATE 0x14 +#define WM8988_R21_LEFT_ADC_VOLUME 0x15 +#define WM8988_R22_RIGHT_ADC_VOLUME 0x16 +#define WM8988_R23_ADDITIONAL_1_CONTROL 0x17 +#define WM8988_R24_ADDITIONAL_2_CONTROL 0x18 +#define WM8988_R25_PWR_1_MGMT 0x19 +#define WM8988_R26_PWR_2_MGMT 0x1A +#define WM8988_R27_ADDITIONAL_3_CONTROL 0x1B + +#define WM8988_R31_ADC_INPUT_MODE 0x1F +#define WM8988_R32_ADC_L_SIGNAL_PATH 0x20 +#define WM8988_R33_ADC_R_SIGNAL_PATH 0x21 +#define WM8988_R34_LEFT_OUT_MIX_1 0x22 +#define WM8988_R35_LEFT_OUT_MIX_2 0x23 +#define WM8988_R36_RIGHT_OUT_MIX_1 0x24 +#define WM8988_R37_RIGHT_OUT_MIX_2 0x25 +#define WM8988_R38_RESERVED +#define WM8988_R39_RESERVED +#define WM8988_R40_LOUT2_VOLUME 0x28 +#define WM8988_R41_ROUT2_VOLUME 0x29 +#define WM8988_R42_RESERVED +#define WM8988_R43_LOW_POWER_PALYBACK 0x43 + +#define WM8988_I2C_ADDR_CSB_LOW 0x34 +#define WM8988_I2C_ADDR_CSB_HIGH 0x36 + +/** + * @} + */ + +/** @defgroup USB_device_audio_hid_codec_pin_definition + * @{ + */ +#define I2S1_WS_PIN GPIO_PINS_4 +#define I2S1_CK_PIN GPIO_PINS_5 +#define I2S1_SD_PIN GPIO_PINS_7 + +#define I2S1_GPIO GPIOA +#define I2S1_GPIO_CRM_CLK CRM_GPIOA_PERIPH_CLOCK +#define I2S1_DT_ADDRESS (&(SPI1->dt)) + +/*I2S2 Pin*/ +#define I2S2_WS_PIN GPIO_PINS_12 +#define I2S2_CK_PIN GPIO_PINS_13 +#define I2S2_SD_PIN GPIO_PINS_15 + + +#define I2S2_GPIO GPIOB +#define I2S2_GPIO_CRM_CLK CRM_GPIOB_PERIPH_CLOCK +#define I2S2_DT_ADDRESS (&(SPI2->dt)) + +#define SPK_TX_FIFO_SIZE (1024 * 4) + +/** + * @} + */ + +/** @defgroup USB_device_audio_hid_codec_exported_functions + * @{ + */ +#define MIC_BUFFER_SIZE 1024 +#define SPK_BUFFER_SIZE 4096 +#define DMA_BUFFER_SIZE 288 + +typedef struct +{ + uint32_t audio_freq; + uint32_t audio_bitw; + //spk part + uint16_t spk_buffer[SPK_BUFFER_SIZE]; + uint16_t *spk_roff; + uint16_t *spk_woff; + uint16_t *spk_rend; + uint32_t spk_freq; + uint32_t spk_wtotal; + uint32_t spk_rtotal; + uint16_t spk_threshold; + uint16_t spk_calc; + uint8_t spk_stage; + + //mic part + uint16_t mic_buffer[MIC_BUFFER_SIZE]; + uint16_t *mic_roff; + uint16_t *mic_woff; + uint16_t *mic_wend; + uint32_t mic_wtotal; + uint32_t mic_rtotal; + uint32_t mic_delta; + uint16_t mic_calc; + uint16_t mic_adj_count; + uint8_t mic_adj_stage; + uint8_t mic_stage; + + uint8_t mic_mute; + uint8_t spk_mute; + + uint16_t mic_volume; + uint16_t spk_volume; + + uint32_t spk_tx_size; + uint32_t mic_rx_size; + + uint32_t spk_enable; + uint32_t mic_enable; + +}audio_codec_type; + +error_status audio_codec_init(void); +error_status audio_codec_loop(void); +void audio_codec_modify_freq(uint32_t freq); + +/** + * @brief audio codec interface + */ +void audio_codec_spk_fifo_write(uint8_t *data, uint32_t len); +uint32_t audio_codec_mic_get_data(uint8_t *buffer); +uint8_t audio_codec_spk_feedback(uint8_t *feedback); +void audio_codec_spk_alt_setting(uint32_t alt_seting); +void audio_codec_mic_alt_setting(uint32_t alt_seting); +void audio_codec_set_mic_mute(uint8_t mute); +void audio_codec_set_spk_mute(uint8_t mute); +void audio_codec_set_mic_volume(uint16_t volume); +void audio_codec_set_spk_volume(uint16_t volume); +void audio_codec_set_mic_freq(uint32_t freq); +void audio_codec_set_spk_freq(uint32_t freq); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/usb_conf.h new file mode 100644 index 0000000..49b8811 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/usb_conf.h @@ -0,0 +1,115 @@ +/** + ************************************************************************** + * @file usb_conf.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief usb config header file + ************************************************************************** + * 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. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __USB_CONF_H +#define __USB_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "at32f413.h" +#include "at32f413_board.h" +#include "stdio.h" + +/** @addtogroup AT32F413_periph_examples + * @{ + */ + +/** @addtogroup 413_USB_device_audio_hid + * @{ + */ + +/** + * @brief usb endpoint max num define + */ +#ifndef USB_EPT_MAX_NUM +#define USB_EPT_MAX_NUM 8 /*!< usb device support endpoint number */ +#endif + +/** + * @brief usb buffer extend to 768-1280 bytes + */ +#define USB_BUFFER_SIZE_EX /*!< usb enable extend buffer */ + + +/** + * @brief auto malloc usb endpoint buffer + */ +#define USB_EPT_AUTO_MALLOC_BUFFER /*!< usb auto malloc endpoint tx and rx buffer */ + + +#ifndef USB_EPT_AUTO_MALLOC_BUFFER +/** + * @brief user custom endpoint buffer + * EPTn_TX_ADDR, EPTn_RX_ADDR must less than usb buffer size + */ + +/* ept0 tx start address 0x40, size 0x40, + so rx start address is 0x40 + 0x40 = 0x80 */ +#define EPT0_TX_ADDR 0x40 /*!< usb endpoint 0 tx buffer address offset */ +#define EPT0_RX_ADDR 0x80 /*!< usb endpoint 0 rx buffer address offset */ + +#define EPT1_TX_ADDR 0xC0 /*!< usb endpoint 1 tx buffer address offset */ +#define EPT1_RX_ADDR 0x100 /*!< usb endpoint 1 rx buffer address offset */ + +#define EPT2_TX_ADDR 0x140 /*!< usb endpoint 2 tx buffer address offset */ +#define EPT2_RX_ADDR 0x180 /*!< usb endpoint 2 rx buffer address offset */ + +#define EPT3_TX_ADDR 0x00 /*!< usb endpoint 3 tx buffer address offset */ +#define EPT3_RX_ADDR 0x00 /*!< usb endpoint 3 rx buffer address offset */ + +#define EPT4_TX_ADDR 0x00 /*!< usb endpoint 4 tx buffer address offset */ +#define EPT4_RX_ADDR 0x00 /*!< usb endpoint 4 rx buffer address offset */ + +#define EPT5_TX_ADDR 0x00 /*!< usb endpoint 5 tx buffer address offset */ +#define EPT5_RX_ADDR 0x00 /*!< usb endpoint 5 rx buffer address offset */ + +#define EPT6_TX_ADDR 0x00 /*!< usb endpoint 6 tx buffer address offset */ +#define EPT6_RX_ADDR 0x00 /*!< usb endpoint 6 rx buffer address offset */ + +#define EPT7_TX_ADDR 0x00 /*!< usb endpoint 7 tx buffer address offset */ +#define EPT7_RX_ADDR 0x00 /*!< usb endpoint 7 rx buffer address offset */ + +#endif + +void usb_delay_ms(uint32_t ms); +void usb_delay_us(uint32_t us); + +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/project/at_start_f413/examples/acc/calibration/mdk_v5/calibration.uvoptx b/project/at_start_f413/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvoptx similarity index 82% rename from project/at_start_f413/examples/acc/calibration/mdk_v5/calibration.uvoptx rename to project/at_start_f413/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvoptx index 4decc2c..0e26ca8 100644 --- a/project/at_start_f413/examples/acc/calibration/mdk_v5/calibration.uvoptx +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvoptx @@ -22,7 +22,7 @@ - calibration + composite_audio_hid 0x4 ARM-ADS @@ -211,6 +211,30 @@ 0 0 + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\audio_codec.c + audio_codec.c + 0 + 0 + + + 1 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c + i2c_application.c + 0 + 0 + @@ -221,7 +245,7 @@ 0 2 - 4 + 6 1 0 0 @@ -241,19 +265,7 @@ 0 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f413_acc.c - at32f413_acc.c - 0 - 0 - - - 3 - 6 + 7 1 0 0 @@ -265,7 +277,19 @@ 3 - 7 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 9 1 0 0 @@ -277,7 +301,19 @@ 3 - 8 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c + at32f413_i2c.c + 0 + 0 + + + 3 + 11 1 0 0 @@ -289,7 +325,31 @@ 3 - 9 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + 3 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + 3 + 14 1 0 0 @@ -301,7 +361,7 @@ 3 - 10 + 15 1 0 0 @@ -311,6 +371,18 @@ 0 0 + + 3 + 16 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_acc.c + at32f413_acc.c + 0 + 0 + @@ -321,7 +393,7 @@ 0 4 - 11 + 17 1 0 0 @@ -333,7 +405,7 @@ 4 - 12 + 18 2 0 0 @@ -353,7 +425,7 @@ 0 5 - 13 + 19 1 0 0 @@ -365,7 +437,7 @@ 5 - 14 + 20 1 0 0 @@ -377,7 +449,7 @@ 5 - 15 + 21 1 0 0 @@ -397,25 +469,25 @@ 0 6 - 16 + 22 1 0 0 0 - ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_class.c - cdc_class.c + ..\..\..\..\..\..\middlewares\usbd_class\audio_hid\audio_hid_class.c + audio_hid_class.c 0 0 6 - 17 + 23 1 0 0 0 - ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_desc.c - cdc_desc.c + ..\..\..\..\..\..\middlewares\usbd_class\audio_hid\audio_hid_desc.c + audio_hid_desc.c 0 0 @@ -429,7 +501,7 @@ 0 7 - 18 + 24 5 0 0 diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvprojx b/project/at_start_f413/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvprojx new file mode 100644 index 0000000..c22e920 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvprojx @@ -0,0 +1,562 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + composite_audio_hid + 0x4 + ARM-ADS + 5060960::V5.06 update 7 (build 960)::.\ARMCC + 0 + + + -AT32F413RCT7 + ArteryTek + ArteryTek.AT32F413_DFP.2.0.0 + IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) + 0 + $$Device:-AT32F413RCT7$Device\Include\at32f40x.h + + + + + + + + + + $$Device:-AT32F413RCT7$SVD\AT32F413xx_v2.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\objects\ + composite_audio_hid + 1 + 0 + 1 + 1 + 1 + .\listings\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 0 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4096 + + 1 + BIN\UL2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 1 + 0x8000000 + 0x40000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x40000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x38000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + + + AT32F413RCT7,USE_STDPERIPH_DRIVER,AT_START_F413_V1 + + ..\inc;..\..\..\..\..\at32f413_board;..\..\..\..\..\..\libraries\drivers\inc;..\..\..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\..\..\libraries\cmsis\cm4\device_support;..\..\..\..\..\..\middlewares\usbd_drivers\inc;..\..\..\..\..\..\middlewares\usbd_class\audio_hid;..\..\..\..\..\..\middlewares\i2c_application_library + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + + user + + + at32f413_clock.c + 1 + ..\src\at32f413_clock.c + + + at32f413_int.c + 1 + ..\src\at32f413_int.c + + + main.c + 1 + ..\src\main.c + + + audio_codec.c + 1 + ..\src\audio_codec.c + + + i2c_application.c + 1 + ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c + + + + + bsp + + + at32f413_board.c + 1 + ..\..\..\..\..\at32f413_board\at32f413_board.c + + + + + firmware + + + at32f413_crm.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + + at32f413_dma.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + + + at32f413_gpio.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + + + at32f413_i2c.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c + + + at32f413_misc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + + + at32f413_spi.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + + + at32f413_tmr.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + + + at32f413_usb.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usb.c + + + at32f413_acc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_acc.c + + + + + cmsis + + + system_at32f413.c + 1 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + + + startup_at32f413.s + 2 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + + + + + usbd_drivers + + + usbd_core.c + 1 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_core.c + + + usbd_int.c + 1 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_int.c + + + usbd_sdr.c + 1 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_sdr.c + + + + + usbd_class + + + audio_hid_class.c + 1 + ..\..\..\..\..\..\middlewares\usbd_class\audio_hid\audio_hid_class.c + + + audio_hid_desc.c + 1 + ..\..\..\..\..\..\middlewares\usbd_class\audio_hid\audio_hid_desc.c + + + + + readme + + + readme.txt + 5 + ..\readme.txt + + + + + + + + + + + + + + + + + <Project Info> + + + + + + 0 + 1 + + + + +
diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt b/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt new file mode 100644 index 0000000..0bdb177 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt @@ -0,0 +1,16 @@ +/** + ************************************************************************** + * @file readme.txt + * @version v2.0.2 + * @date 2021-12-31 + * @brief readme + ************************************************************************** + */ + + this demo is based on the at-start board, in this demo, show how to build + a composite device device of usb audio class protocol and hid protocol. the codec use wm8988 + the demo support: + 1. microphone and speaker + 2. frequency 16k and 48k + 3. bit width 16bit, + 4. speaker feedback \ No newline at end of file diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c new file mode 100644 index 0000000..244a26d --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c @@ -0,0 +1,96 @@ +/** + ************************************************************************** + * @file at32f413_clock.c + * @version v2.0.2 + * @date 2021-12-31 + * @brief system clock config 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. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f413_clock.h" + +/** + * @brief system clock config program + * @note the system clock is configured as follow: + * - system clock = hext / 2 * pll_mult + * - system clock source = pll (hext) + * - hext = 8000000 + * - sclk = 192000000 + * - ahbdiv = 1 + * - ahbclk = 192000000 + * - apb2div = 2 + * - apb2clk = 96000000 + * - apb1div = 2 + * - apb1clk = 96000000 + * - pll_mult = 48 + * - pll_range = GT72MHZ (greater than 72 mhz) + * @param none + * @retval none + */ +void system_clock_config(void) +{ + /* reset crm */ + crm_reset(); + + crm_clock_source_enable(CRM_CLOCK_SOURCE_HEXT, TRUE); + + /* wait till hext is ready */ + while(crm_hext_stable_wait() == ERROR) + { + } + + /* config pll clock resource */ + crm_pll_config(CRM_PLL_SOURCE_HEXT_DIV, CRM_PLL_MULT_48, CRM_PLL_OUTPUT_RANGE_GT72MHZ); + + /* enable pll */ + crm_clock_source_enable(CRM_CLOCK_SOURCE_PLL, TRUE); + + /* wait till pll is ready */ + while(crm_flag_get(CRM_PLL_STABLE_FLAG) != SET) + { + } + + /* config ahbclk */ + crm_ahb_div_set(CRM_AHB_DIV_1); + + /* config apb2clk */ + crm_apb2_div_set(CRM_APB2_DIV_2); + + /* config apb1clk */ + crm_apb1_div_set(CRM_APB1_DIV_2); + + /* enable auto step mode */ + crm_auto_step_mode_enable(TRUE); + + /* select pll as system clock source */ + crm_sysclk_switch(CRM_SCLK_PLL); + + /* wait till pll is used as system clock source */ + while(crm_sysclk_switch_status_get() != CRM_SCLK_PLL) + { + } + + /* disable auto step mode */ + crm_auto_step_mode_enable(FALSE); + + /* update system_core_clock global variable */ + system_core_clock_update(); +} diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_int.c new file mode 100644 index 0000000..053174a --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_int.c @@ -0,0 +1,143 @@ +/** + ************************************************************************** + * @file at32f413_int.c + * @version v2.0.2 + * @date 2021-12-31 + * @brief main interrupt service routines. + ************************************************************************** + * 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. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f413_int.h" + +/** @addtogroup AT32F413_periph_examples + * @{ + */ + +/** @addtogroup 413_USB_device_audio_hid + * @{ + */ + +/** + * @brief this function handles nmi exception. + * @param none + * @retval none + */ +void NMI_Handler(void) +{ +} + +/** + * @brief this function handles hard fault exception. + * @param none + * @retval none + */ +void HardFault_Handler(void) +{ + /* go to infinite loop when hard fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles memory manage exception. + * @param none + * @retval none + */ +void MemManage_Handler(void) +{ + /* go to infinite loop when memory manage exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles bus fault exception. + * @param none + * @retval none + */ +void BusFault_Handler(void) +{ + /* go to infinite loop when bus fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles usage fault exception. + * @param none + * @retval none + */ +void UsageFault_Handler(void) +{ + /* go to infinite loop when usage fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles svcall exception. + * @param none + * @retval none + */ +void SVC_Handler(void) +{ +} + +/** + * @brief this function handles debug monitor exception. + * @param none + * @retval none + */ +void DebugMon_Handler(void) +{ +} + +/** + * @brief this function handles pendsv_handler exception. + * @param none + * @retval none + */ +void PendSV_Handler(void) +{ +} + +/** + * @brief this function handles systick handler. + * @param none + * @retval none + */ +void SysTick_Handler(void) +{ +} + +/** + * @} + */ + +/** + * @} + */ + + diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/audio_codec.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/audio_codec.c new file mode 100644 index 0000000..56823d1 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/audio_codec.c @@ -0,0 +1,957 @@ +/** + ************************************************************************** + * @file audio_codec.c + * @version v2.0.2 + * @date 2021-12-31 + * @brief audio codec function + ************************************************************************** + * 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. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "audio_codec.h" +#include "i2c_application.h" +#include "audio_conf.h" +#include + +/** @addtogroup AT32F413_periph_examples + * @{ + */ + +/** @addtogroup 413_USB_device_audio_hid + * @{ + */ + +#define I2C_TIMEOUT 0xFFFFFFFF + +#define I2Cx_SPEED 200000 +#define I2Cx_ADDRESS 0x00 + +#define I2Cx_PORT I2C1 +#define I2Cx_CLK CRM_I2C1_PERIPH_CLOCK + +#define I2Cx_SCL_PIN GPIO_PINS_8 +#define I2Cx_SCL_GPIO_PORT GPIOB +#define I2Cx_SCL_GPIO_CLK CRM_GPIOB_PERIPH_CLOCK + +#define I2Cx_SDA_PIN GPIO_PINS_9 +#define I2Cx_SDA_GPIO_PORT GPIOB +#define I2Cx_SDA_GPIO_CLK CRM_GPIOB_PERIPH_CLOCK + +/** + * @brief wm8988 freq + */ +#define WM8988_REG_FREQ48K ((WM8988_R8_SAMPLE_RATE << 9) | 0x0081) +#define WM8988_REG_FREQ16K ((WM8988_R8_SAMPLE_RATE << 9) | 0x0095) + +/** + * @brief wm8988 bit width + */ +#define WM8988_REG_BITW16 ((WM8988_R7_AUDIO_INTERFACE << 9) | 0x0042) + +/** + * @brief wm8988 register default value + */ +uint16_t reg_addr_data[] = +{ + (WM8988_R0_LEFT_INPUT_VOLUME << 9) | 0x012F, /*Left Input Channel Volume*/ + (WM8988_R1_RIGHT_INPUT_VOLUME << 9) | 0x012F, /*Right Input Channel Volume*/ + (WM8988_R2_LOUT1_VOLUME << 9) | 0x0179, /*Left Output Channel Volume*/ + (WM8988_R3_ROUT1_VOLUME << 9) | 0x0179, /*Right Output Channel Volume*/ + (WM8988_R5_ADC_DAC_CONTROL << 9) | 0x0006, /*De-emphasis Control and Digital soft mute*/ + (WM8988_REG_BITW16), + (WM8988_REG_FREQ16K), + (WM8988_R10_LEFT_DAC_VOLUME << 9) | 0x01FF, /*Left Digital DAC Volume Control*/ + (WM8988_R11_RIGHT_DAC_VOLUME << 9) | 0x01FF, /*Right Digital DAC Volume Control*/ + (WM8988_R12_BASS_CONTROL << 9) | 0x000F, /*Bass Control*/ + (WM8988_R13_TREBLE_CONTROL << 9) | 0x000F, /*Treble Control*/ + (WM8988_R16_3D_CONTROL << 9) | 0x0000, /*3D stereo Enhancment*/ + (WM8988_R21_LEFT_ADC_VOLUME << 9) | 0x01C3, /*Left ADC Digital Volume*/ + (WM8988_R22_RIGHT_ADC_VOLUME << 9) | 0x01C3, /*Right ADC Digital Volume*/ + (WM8988_R23_ADDITIONAL_1_CONTROL << 9) | 0x00C2, /*Additional Control 1*/ + (WM8988_R24_ADDITIONAL_2_CONTROL << 9) | 0x0000, /*Additional Control 2*/ + (WM8988_R27_ADDITIONAL_3_CONTROL << 9) | 0x0000, /*Additional Control 3*/ + (WM8988_R31_ADC_INPUT_MODE << 9) | 0x0000, /*ADC input mode*/ + (WM8988_R32_ADC_L_SIGNAL_PATH << 9) | 0x0000, /*ADC Signal Path Control left*/ + (WM8988_R33_ADC_R_SIGNAL_PATH << 9) | 0x0000, /*ADC Signal Path Control right*/ + (WM8988_R34_LEFT_OUT_MIX_1 << 9) | 0x0152, /*Left DAC mixer Control*/ + (WM8988_R35_LEFT_OUT_MIX_2 << 9) | 0x0050, /*Left DAC mixer Control*/ + (WM8988_R36_RIGHT_OUT_MIX_1 << 9) | 0x0052, /*Right DAC mixer Control*/ + (WM8988_R37_RIGHT_OUT_MIX_2 << 9) | 0x0150, /*Right DAC mixer Control*/ + (WM8988_R40_LOUT2_VOLUME << 9) | 0x01FF, /*Output left channel volume*/ + (WM8988_R41_ROUT2_VOLUME << 9) | 0x01FF, /*Output left channel volume*/ + (WM8988_R43_LOW_POWER_PALYBACK << 9) | 0x0008, /*Output left channel volume*/ + (WM8988_R25_PWR_1_MGMT << 9) | 0x017C, /*Power Management1*/ + (WM8988_R26_PWR_2_MGMT << 9) | 0x01F8, /*Power Management2*/ +}; + +i2c_handle_type hi2cx; + +audio_codec_type audio_codec; +uint16_t spk_dma_buffer[DMA_BUFFER_SIZE]; +uint16_t mic_dma_buffer[DMA_BUFFER_SIZE]; + +void memset16_buffer(uint16_t *buffer, uint32_t set, uint32_t len); +void codec_i2s_reset(void); +void codec_i2s_init(audio_codec_type *param); +void mclk_tmr1_init(void); +void copy_buff(uint16_t *dest, uint16_t *src, uint32_t len); + +/** + * @brief audio codec set microphone freq + * @param freq: freq (wm8988 microphone and speaker must same freq) + * @retval none + */ +void audio_codec_set_mic_freq(uint32_t freq) +{ + if(audio_codec.audio_freq != freq) + { + audio_codec.audio_freq = freq; + codec_i2s_reset(); + audio_codec_modify_freq(freq); + codec_i2s_init(&audio_codec); + } +} + +/** + * @brief audio codec set speaker freq + * @param freq: freq(wm8988 microphone and speaker must same freq) + * @retval none + */ +void audio_codec_set_spk_freq(uint32_t freq) +{ + if(audio_codec.audio_freq != freq) + { + audio_codec.audio_freq = freq; + codec_i2s_reset(); + audio_codec_modify_freq(freq); + codec_i2s_init(&audio_codec); + } +} + + +/** + * @brief audio codec speaker alt setting config + * @param none + * @retval none + */ +void audio_codec_spk_alt_setting(uint32_t alt_seting) +{ + if(alt_seting == 0) + { + } + else + { + } +} + +/** + * @brief audio codec microphone alt setting config + * @param none + * @retval none + */ +void audio_codec_mic_alt_setting(uint32_t alt_seting) +{ + if(alt_seting == 0) + { + } + else + { + } +} + +/** + * @brief audio codec set microphone mute + * @param mute: mute state + * @retval none + */ +void audio_codec_set_mic_mute(uint8_t mute) +{ + audio_codec.mic_mute = mute; +} + + +/** + * @brief audio codec set speaker mute + * @param mute: mute state + * @retval none + */ +void audio_codec_set_spk_mute(uint8_t mute) +{ + audio_codec.spk_mute = mute; +} + + +/** + * @brief audio codec set microphone volume + * @param volume: the new volume + * @retval none + */ +void audio_codec_set_mic_volume(uint16_t volume) +{ + /* wm8988 adc have 256 steps */ + audio_codec.mic_volume = volume; +} + +/** + * @brief audio codec set speaker volume + * @param volume: the new volume + * @retval none + */ +void audio_codec_set_spk_volume(uint16_t volume) +{ + /* wm8988 dac have 80 steps */ + audio_codec.spk_volume = (volume * 0x50) / 0x64 + 0x30 - 1; +} + +/** + * @brief codec speaker feedback + * @param feedback: data buffer + * @retval feedback len + */ +uint8_t audio_codec_spk_feedback(uint8_t *feedback) +{ + uint32_t feedback_value = (audio_codec.spk_freq); + feedback_value = ((feedback_value/1000)<<14)|((feedback_value%1000)<<4); + feedback[0] = (uint8_t)(feedback_value); + feedback[1] = (uint8_t)(feedback_value >> 8); + feedback[2] = (uint8_t)(feedback_value >> 16); + return 3; +} + +/** + * @brief codec speaker write fifo + * @param data: data buffer + * @param len: data length + * @retval none + */ +void audio_codec_spk_fifo_write(uint8_t *data, uint32_t len) +{ + uint16_t ulen = len / 2, i; + uint16_t *u16data = (uint16_t *)data; + + switch(audio_codec.spk_stage) + { + case 0: + audio_codec.spk_woff = audio_codec.spk_roff = audio_codec.spk_buffer; + audio_codec.spk_wtotal = audio_codec.spk_rtotal = 0; + audio_codec.spk_stage = 1; + audio_codec.spk_threshold = SPK_BUFFER_SIZE/2; + break; + case 1: + if( audio_codec.spk_wtotal >= SPK_BUFFER_SIZE/2 ) + { + audio_codec.spk_stage = 2; + } + break; + case 2: + break; + } + for( i = 0; i < ulen; ++i ) + { + *audio_codec.spk_woff++ = *u16data++; + if( audio_codec.spk_woff >= audio_codec.spk_rend ) + { + audio_codec.spk_woff = audio_codec.spk_buffer; + } + } + audio_codec.spk_wtotal += ulen; +} + +/** + * @brief codec microphone get data + * @param data: data buffer + * @retval data len + */ +uint32_t audio_codec_mic_get_data(uint8_t *buffer) +{ + //copy_buff((uint16_t *)buffer, audio_codec.mic_buffer + audio_codec.mic_hf_status, audio_codec.mic_rx_size); + uint16_t len = audio_codec.mic_rx_size << 1; + uint16_t i; + uint16_t* u16buf = (uint16_t*)buffer; + switch(audio_codec.mic_stage) + { + case 0: + audio_codec.mic_stage = 1; + memset( buffer, 0, len ); + return len; + case 1: + if( audio_codec.mic_wtotal - audio_codec.mic_rtotal >= MIC_BUFFER_SIZE/2 ) + { + audio_codec.mic_stage = 2; + } + return len; + } + switch( audio_codec.mic_adj_stage ) + { + case 0: + break; + case 1: + if( audio_codec.mic_adj_count >= 4 ){ + len += 4; + audio_codec.mic_adj_count -= 4; + } + break; + case 2: + if( audio_codec.mic_adj_count >= 4 ){ + len -= 4; + audio_codec.mic_adj_count -= 4; + } + break; + } + + for( i = 0; i < len/2; ++i ) + { + *u16buf++ = *audio_codec.mic_roff++; + if( audio_codec.mic_roff >= audio_codec.mic_wend ) + { + audio_codec.mic_roff = audio_codec.mic_buffer; + } + } + if( audio_codec.mic_wtotal <= audio_codec.mic_rtotal ) + { //should not happen + while(1); + } + + audio_codec.mic_rtotal += len/2; + audio_codec.mic_delta += len/2; + return len; +} + +/** + * @brief audio codec modify freq + * @param freq: freq (wm8988 microphone and speaker must as same freq) + * @retval none + */ +void audio_codec_modify_freq(uint32_t freq) +{ + uint16_t codec_cmd; + uint8_t i2c_cmd[2]; + if(freq == AUDIO_FREQ_16K) + { + codec_cmd = WM8988_REG_FREQ16K; + } + else if(freq == AUDIO_FREQ_48K) + { + codec_cmd = WM8988_REG_FREQ48K; + } + i2c_cmd[0] = (uint8_t)(codec_cmd >> 8); + i2c_cmd[1] = (uint8_t)codec_cmd & 0xFF; + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + while(1); + } +} + +/** + * @brief buffer memset + * @param buffer: buffer + * @param set: memset data + * @param len: data length + * @retval none + */ +void memset16_buffer(uint16_t *buffer, uint32_t set, uint32_t len) +{ + uint32_t i_index = 0; + for(i_index = 0; i_index < len; i_index ++) + { + buffer[i_index] = (uint16_t)set; + } +} + +/** + * @brief copy buffer + * @param dest: dest data buffer + * @param src: src data buffer + * @param len: data length + * @retval none + */ +void copy_buff(uint16_t *dest, uint16_t *src, uint32_t len) +{ + uint16_t i_index; + for(i_index = 0; i_index < len; i_index ++) + { + dest[i_index] = src[i_index]; + } +} + +/** + * @brief initializes peripherals used by the i2c. + * @param none + * @retval none + */ +void i2c_lowlevel_init(i2c_handle_type* hi2c) +{ + gpio_init_type gpio_initstructure; + + if(hi2c->i2cx == I2Cx_PORT) + { + /* i2c periph clock enable */ + crm_periph_clock_enable(I2Cx_CLK, TRUE); + crm_periph_clock_enable(CRM_IOMUX_PERIPH_CLOCK, TRUE); + gpio_pin_remap_config(I2C1_MUX, TRUE); + crm_periph_clock_enable(I2Cx_SCL_GPIO_CLK, TRUE); + crm_periph_clock_enable(I2Cx_SDA_GPIO_CLK, TRUE); + + /* gpio configuration */ + gpio_initstructure.gpio_out_type = GPIO_OUTPUT_OPEN_DRAIN; + gpio_initstructure.gpio_pull = GPIO_PULL_UP; + gpio_initstructure.gpio_mode = GPIO_MODE_MUX; + gpio_initstructure.gpio_drive_strength = GPIO_DRIVE_STRENGTH_MODERATE; + + /* configure i2c pins: scl */ + gpio_initstructure.gpio_pins = I2Cx_SCL_PIN; + gpio_init(I2Cx_SCL_GPIO_PORT, &gpio_initstructure); + + /* configure i2c pins: sda */ + gpio_initstructure.gpio_pins = I2Cx_SDA_PIN; + gpio_init(I2Cx_SDA_GPIO_PORT, &gpio_initstructure); + + i2c_init(hi2c->i2cx, I2C_FSMODE_DUTY_2_1, I2Cx_SPEED); + + i2c_own_address1_set(hi2c->i2cx, I2C_ADDRESS_MODE_7BIT, I2Cx_ADDRESS); + } +} + +/** + * @brief mclk clock conifg + * @param none + * @retval none + */ +void mclk_tmr1_init(void) +{ + gpio_init_type gpio_init_struct; + tmr_output_config_type tmr_oc_init_structure; + uint16_t prescaler_value = (uint16_t)(system_core_clock / 24000000) - 1; + + crm_periph_clock_enable(CRM_TMR1_PERIPH_CLOCK, TRUE); + crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); + crm_periph_clock_enable(CRM_IOMUX_PERIPH_CLOCK, TRUE); + + gpio_default_para_init(&gpio_init_struct); + + + gpio_init_struct.gpio_pins = GPIO_PINS_8; + gpio_init_struct.gpio_mode = GPIO_MODE_MUX; + gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_MODERATE; + gpio_init(GPIOA, &gpio_init_struct); + + tmr_base_init(TMR1, 1, prescaler_value); + tmr_cnt_dir_set(TMR1, TMR_COUNT_UP); + tmr_clock_source_div_set(TMR1, TMR_CLOCK_DIV1); + + tmr_output_default_para_init(&tmr_oc_init_structure); + tmr_oc_init_structure.oc_mode = TMR_OUTPUT_CONTROL_PWM_MODE_A; + tmr_oc_init_structure.oc_idle_state = FALSE; + tmr_oc_init_structure.oc_polarity = TMR_OUTPUT_ACTIVE_HIGH; + tmr_oc_init_structure.oc_output_state = TRUE; + tmr_output_channel_config(TMR1, TMR_SELECT_CHANNEL_1, &tmr_oc_init_structure); + tmr_channel_value_set(TMR1, TMR_SELECT_CHANNEL_1, 1); + tmr_output_channel_buffer_enable(TMR1, TMR_SELECT_CHANNEL_1, TRUE); + + /* tmr enable counter */ + tmr_counter_enable(TMR1, TRUE); + tmr_output_enable(TMR1, TRUE); +} + + +/** + * @brief audio codec i2s reset + * @param none + * @retval none + */ +void codec_i2s_reset(void) +{ + i2s_enable(SPI1, FALSE); + i2s_enable(SPI2, FALSE); + dma_channel_enable(DMA1_CHANNEL3, FALSE); + dma_channel_enable(DMA1_CHANNEL4, FALSE); +} + +/** + * @brief audio codec i2s init + * @param freq: audio sampling freq + * @param bitw_format: bit width + * @retval error status + */ +void codec_i2s_init(audio_codec_type *param) +{ + gpio_init_type gpio_init_struct; + dma_init_type dma_init_struct; + i2s_init_type i2s_init_struct; + i2s_data_channel_format_type format = I2S_DATA_16BIT_CHANNEL_16BIT; + + crm_periph_clock_enable(I2S1_GPIO_CRM_CLK, TRUE); + crm_periph_clock_enable(I2S2_GPIO_CRM_CLK, TRUE); + crm_periph_clock_enable(CRM_DMA1_PERIPH_CLOCK, TRUE); + crm_periph_clock_enable(CRM_SPI1_PERIPH_CLOCK, TRUE); + crm_periph_clock_enable(CRM_SPI2_PERIPH_CLOCK, TRUE); + + param->spk_freq = param->audio_freq; + + param->spk_tx_size = (param->audio_freq / 1000) * (param->audio_bitw / 8) * AUDIO_SPK_CHANEL_NUM / 2; + param->mic_rx_size = (param->audio_freq / 1000) * (param->audio_bitw / 8) * AUDIO_MIC_CHANEL_NUM / 2; + + memset(param->spk_buffer, 0, SPK_BUFFER_SIZE*sizeof(uint16_t)); + memset(param->mic_buffer, 0, MIC_BUFFER_SIZE*sizeof(uint16_t)); + + param->mic_wend = param->mic_woff = param->mic_roff = param->mic_buffer; + param->spk_rend = param->spk_woff = param->spk_roff = param->spk_buffer; + + while(param->mic_wend < param->mic_buffer+MIC_BUFFER_SIZE) + { + param->mic_wend += param->mic_rx_size; + } + param->mic_wend -= param->mic_rx_size; + while(param->spk_rend < param->spk_buffer+SPK_BUFFER_SIZE) + { + param->spk_rend += param->spk_tx_size; + } + param->spk_rend -= param->spk_tx_size; + if(param->audio_bitw == 16) + { + format = I2S_DATA_16BIT_CHANNEL_16BIT; + } + else + { + format = I2S_DATA_24BIT_CHANNEL_32BIT; + } + + gpio_default_para_init(&gpio_init_struct); + + /* i2s1 ws pins */ + gpio_init_struct.gpio_pull = GPIO_PULL_UP; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init_struct.gpio_pins = I2S1_WS_PIN; + gpio_init(I2S1_GPIO, &gpio_init_struct); + + /* i2s1 ck pins */ + gpio_init_struct.gpio_pull = GPIO_PULL_DOWN; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init_struct.gpio_pins = I2S1_CK_PIN; + gpio_init(I2S1_GPIO, &gpio_init_struct); + + /* i2s1 sd pins slave tx */ + gpio_init_struct.gpio_pull = GPIO_PULL_UP; + gpio_init_struct.gpio_mode = GPIO_MODE_MUX; + gpio_init_struct.gpio_pins = I2S1_SD_PIN; + gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_MODERATE; + gpio_init(I2S1_GPIO, &gpio_init_struct); + + /* i2s2 ws pins */ + gpio_init_struct.gpio_pull = GPIO_PULL_UP; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init_struct.gpio_pins = I2S2_WS_PIN; + gpio_init(I2S2_GPIO, &gpio_init_struct); + + /* i2s2 ck pins */ + gpio_init_struct.gpio_pull = GPIO_PULL_DOWN; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init_struct.gpio_pins = I2S2_CK_PIN; + gpio_init(I2S2_GPIO, &gpio_init_struct); + + /* i2s2 sd pins slave rx */ + gpio_init_struct.gpio_pull = GPIO_PULL_UP; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init_struct.gpio_pins = I2S2_SD_PIN; + gpio_init(I2S2_GPIO, &gpio_init_struct); + + /* dma config */ + dma_reset(DMA1_CHANNEL3); + dma_reset(DMA1_CHANNEL4); + + /* dma1 channel3: speaker i2s1 tx */ + dma_default_para_init(&dma_init_struct); + dma_init_struct.buffer_size = param->spk_tx_size << 1; + dma_init_struct.direction = DMA_DIR_MEMORY_TO_PERIPHERAL; + dma_init_struct.memory_base_addr = (uint32_t)spk_dma_buffer; + dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_HALFWORD; + dma_init_struct.memory_inc_enable = TRUE; + dma_init_struct.peripheral_base_addr = (uint32_t)I2S1_DT_ADDRESS; + dma_init_struct.peripheral_data_width = DMA_PERIPHERAL_DATA_WIDTH_HALFWORD; + dma_init_struct.peripheral_inc_enable = FALSE; + dma_init_struct.priority = DMA_PRIORITY_HIGH; + dma_init_struct.loop_mode_enable = TRUE; + dma_init(DMA1_CHANNEL3, &dma_init_struct); + dma_interrupt_enable(DMA1_CHANNEL3, DMA_FDT_INT, TRUE); + dma_interrupt_enable(DMA1_CHANNEL3, DMA_HDT_INT, TRUE); + nvic_irq_enable(DMA1_Channel3_IRQn, 1, 0); + + /* dma1 channel4: microphone i2s2 rx */ + dma_default_para_init(&dma_init_struct); + dma_init_struct.buffer_size = param->mic_rx_size << 1; + dma_init_struct.direction = DMA_DIR_PERIPHERAL_TO_MEMORY; + dma_init_struct.memory_base_addr = (uint32_t)mic_dma_buffer; + dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_HALFWORD; + dma_init_struct.memory_inc_enable = TRUE; + dma_init_struct.peripheral_base_addr = (uint32_t)I2S2_DT_ADDRESS; + dma_init_struct.peripheral_data_width = DMA_PERIPHERAL_DATA_WIDTH_HALFWORD; + dma_init_struct.peripheral_inc_enable = FALSE; + dma_init_struct.priority = DMA_PRIORITY_HIGH; + dma_init_struct.loop_mode_enable = TRUE; + dma_init(DMA1_CHANNEL4, &dma_init_struct); + dma_interrupt_enable(DMA1_CHANNEL4, DMA_FDT_INT, TRUE); + dma_interrupt_enable(DMA1_CHANNEL4, DMA_HDT_INT, TRUE); + nvic_irq_enable(DMA1_Channel4_IRQn, 2, 0); + + /* i2s1 tx init */ + spi_i2s_reset(SPI1); + i2s_default_para_init(&i2s_init_struct); + i2s_init_struct.audio_protocol = I2S_AUDIO_PROTOCOL_PHILLIPS; + i2s_init_struct.data_channel_format = format; + i2s_init_struct.mclk_output_enable = FALSE; + i2s_init_struct.audio_sampling_freq = (i2s_audio_sampling_freq_type)param->audio_freq; + i2s_init_struct.clock_polarity = I2S_CLOCK_POLARITY_LOW; + i2s_init_struct.operation_mode = I2S_MODE_SLAVE_TX; + i2s_init(SPI1, &i2s_init_struct); + + /* i2s2 rx init */ + spi_i2s_reset(SPI2); + i2s_default_para_init(&i2s_init_struct); + i2s_init_struct.audio_protocol = I2S_AUDIO_PROTOCOL_PHILLIPS; + i2s_init_struct.data_channel_format = format; + i2s_init_struct.mclk_output_enable = FALSE; + i2s_init_struct.audio_sampling_freq = (i2s_audio_sampling_freq_type)param->audio_freq; + i2s_init_struct.clock_polarity = I2S_CLOCK_POLARITY_LOW; + i2s_init_struct.operation_mode = I2S_MODE_SLAVE_RX; + i2s_init(SPI2, &i2s_init_struct); + + + spi_i2s_dma_transmitter_enable(SPI1, TRUE); + spi_i2s_dma_receiver_enable(SPI2, TRUE); + i2s_enable(SPI1, TRUE); + i2s_enable(SPI2, TRUE); + + dma_channel_enable(DMA1_CHANNEL3, TRUE); + dma_channel_enable(DMA1_CHANNEL4, TRUE); + +} + +/** + * @brief this function handles dma1 channel3 interrupt. + * @param none + * @retval none + */ +void DMA1_Channel3_IRQHandler(void) +{ + uint16_t half_size = audio_codec.spk_tx_size; + uint16_t *pdst; + + if(dma_flag_get(DMA1_HDT3_FLAG) == SET) + { + //copy_buff(audio_codec.spk_buffer, audio_codec.spk_tx_fifo + audio_codec.r_pos, half_size); + pdst = spk_dma_buffer; + dma_flag_clear(DMA1_HDT3_FLAG); + } + else if(dma_flag_get(DMA1_FDT3_FLAG) == SET) + { + //copy_buff(&audio_codec.spk_buffer[half_size], audio_codec.spk_tx_fifo + audio_codec.r_pos, half_size); + pdst = spk_dma_buffer + half_size; + dma_flag_clear(DMA1_FDT3_FLAG); + } + + switch( audio_codec.spk_stage ) + { + case 0: + case 1: + memset( pdst, 0, half_size << 1); + break; + case 2: + if( audio_codec.spk_wtotal >= audio_codec.spk_rtotal + SPK_BUFFER_SIZE ) + { + while(1);//should not happen; + } + if( audio_codec.spk_rtotal >= audio_codec.spk_wtotal ) + { + audio_codec.spk_stage = 0; + audio_codec.spk_woff = audio_codec.spk_roff = audio_codec.spk_buffer; + audio_codec.spk_rtotal = audio_codec.spk_wtotal = 0; + } + else + { + memcpy( pdst, audio_codec.spk_roff, half_size << 1 ); + audio_codec.spk_roff += half_size; + audio_codec.spk_rtotal += half_size; + if( audio_codec.spk_roff >= audio_codec.spk_rend ) + { + audio_codec.spk_roff = audio_codec.spk_buffer; + } + if( ++audio_codec.spk_calc == 256 ) + { + uint16_t delta = audio_codec.spk_wtotal - audio_codec.spk_rtotal; + audio_codec.spk_calc = 0; + if( delta < audio_codec.spk_threshold - half_size ) + { + audio_codec.spk_threshold -= half_size; + audio_codec.spk_freq += audio_codec.audio_freq/1024; + } + else if( delta > audio_codec.spk_threshold + half_size ) + { + audio_codec.spk_threshold += half_size; + audio_codec.spk_freq -= audio_codec.audio_freq/1024; + } + if(audio_codec.spk_rtotal > 0x20000000) + { + audio_codec.spk_rtotal -= 0x10000000; + audio_codec.spk_wtotal -= 0x10000000; + } + } + } + break; + } + +} + +/** + * @brief this function handles dma1 channel4 interrupt. + * @param none + * @retval none + */ +void DMA1_Channel4_IRQHandler(void) +{ + uint16_t *psrc; + uint16_t len = audio_codec.mic_rx_size << 1; + + if(dma_flag_get(DMA1_HDT4_FLAG) == SET) + { + dma_flag_clear(DMA1_HDT4_FLAG); + psrc = mic_dma_buffer; + } + else if(dma_flag_get(DMA1_FDT4_FLAG) == SET) + { + psrc = mic_dma_buffer + audio_codec.mic_rx_size; + dma_flag_clear(DMA1_FDT4_FLAG); + } + if( audio_codec.mic_stage ) + { + memcpy( audio_codec.mic_woff, psrc, len ); + audio_codec.mic_woff += len/2; + audio_codec.mic_wtotal += len/2; + if( audio_codec.mic_woff >= audio_codec.mic_wend ) + { + audio_codec.mic_woff = audio_codec.mic_buffer; + } + if( audio_codec.mic_stage == 2 ) + { + if( 1024 == ++audio_codec.mic_calc ) + { + uint32_t size_estimate = 1024*audio_codec.mic_rx_size; + audio_codec.mic_calc = 0; + if( audio_codec.mic_delta > size_estimate ) + { + audio_codec.mic_adj_count = audio_codec.mic_delta - size_estimate; + audio_codec.mic_adj_stage = 2; + } + else if( audio_codec.mic_delta < size_estimate ) + { + audio_codec.mic_adj_count = size_estimate - audio_codec.mic_delta; + audio_codec.mic_adj_stage = 1; + } + else + { + audio_codec.mic_adj_count = 0; + audio_codec.mic_adj_stage = 0; + } + audio_codec.mic_delta = 0; + if( audio_codec.mic_rtotal >= 0x80000000 ) + { + audio_codec.mic_rtotal -= 0x80000000; + audio_codec.mic_wtotal -= 0x80000000; + } + } + if( audio_codec.mic_wtotal >= audio_codec.mic_rtotal + MIC_BUFFER_SIZE ) + { + audio_codec.mic_delta = audio_codec.mic_wtotal = audio_codec.mic_rtotal = 0; + audio_codec.mic_woff = audio_codec.mic_roff = audio_codec.mic_buffer; + audio_codec.mic_stage = 0; + audio_codec.mic_adj_stage = 0; + audio_codec.mic_adj_count = 0; + audio_codec.mic_calc = 0; + } + } + } +} + +/** + * @brief audio codec init + * @param none + * @retval error status + */ +error_status audio_codec_init(void) +{ + uint32_t reg_len = sizeof(reg_addr_data) / sizeof(uint16_t); + uint32_t i_index = 0; + uint8_t i2c_cmd[2]; + + if(AUDIO_DEFAULT_FREQ == AUDIO_FREQ_16K) + { + reg_addr_data[6] = WM8988_REG_FREQ16K; + audio_codec.audio_freq = AUDIO_FREQ_16K; + } + else if(AUDIO_DEFAULT_FREQ == AUDIO_FREQ_48K) + { + reg_addr_data[6] = WM8988_REG_FREQ48K; + audio_codec.audio_freq = AUDIO_FREQ_48K; + } + else + { + return ERROR; + } + + if(AUDIO_DEFAULT_BITW == AUDIO_BITW_16) + { + reg_addr_data[5] = WM8988_REG_BITW16; + audio_codec.audio_bitw = AUDIO_BITW_16; + } + else + { + return ERROR; + } + + /* i2c init */ + hi2cx.i2cx = I2Cx_PORT; + + i2c_config(&hi2cx); + + for(i_index = 0; i_index < reg_len; i_index ++) + { + i2c_cmd[0] = (uint8_t)(reg_addr_data[i_index] >> 8); + i2c_cmd[1] = (uint8_t)reg_addr_data[i_index] & 0xFF; + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + return ERROR; + } + } + + /* timer init */ + mclk_tmr1_init(); + + codec_i2s_init(&audio_codec); + + return SUCCESS; +} + +/** + * @brief audio codec loop + * @param none + * @retval none + */ +error_status audio_codec_loop(void) +{ + static uint8_t mic_mute = 0; + static uint16_t mic_volume = 0; + static uint8_t spk_mute = 0; + static uint16_t spk_volume = 0; + uint16_t audio_ctrl_l; + uint16_t audio_ctrl_r; + uint8_t i2c_cmd[2]; + + if(mic_mute != audio_codec.mic_mute) + { + mic_mute = audio_codec.mic_mute; + audio_ctrl_l = WM8988_R21_LEFT_ADC_VOLUME << 9 | 0x100; + audio_ctrl_r = WM8988_R22_RIGHT_ADC_VOLUME << 9 | 0x100; + if(audio_codec.mic_mute == 0) + { + audio_ctrl_l |= audio_codec.mic_volume; + audio_ctrl_r |= audio_codec.mic_volume; + } + i2c_cmd[0] = (uint8_t)(audio_ctrl_l >> 8); + i2c_cmd[1] = (uint8_t)audio_ctrl_l & 0xFF; + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + return ERROR; + } + i2c_cmd[0] = (uint8_t)(audio_ctrl_r >> 8); + i2c_cmd[1] = (uint8_t)audio_ctrl_r & 0xFF; + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + return ERROR; + } + } + + if(mic_volume != audio_codec.mic_volume) + { + mic_volume = audio_codec.mic_volume; + audio_ctrl_l = WM8988_R21_LEFT_ADC_VOLUME << 9 | 0x100; + audio_ctrl_r = WM8988_R22_RIGHT_ADC_VOLUME << 9 | 0x100; + audio_ctrl_l |= audio_codec.mic_volume; + audio_ctrl_r |= audio_codec.mic_volume; + i2c_cmd[0] = (uint8_t)(audio_ctrl_l >> 8); + i2c_cmd[1] = (uint8_t)audio_ctrl_l & 0xFF; + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + return ERROR; + } + i2c_cmd[0] = (uint8_t)(audio_ctrl_r >> 8); + i2c_cmd[1] = (uint8_t)audio_ctrl_r & 0xFF; + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + return ERROR; + } + } + + if(spk_mute != audio_codec.spk_mute) + { + spk_mute = audio_codec.spk_mute; + audio_ctrl_l = (WM8988_R5_ADC_DAC_CONTROL << 9) | 0x0006 | (audio_codec.spk_mute << 3); + i2c_cmd[0] = (uint8_t)(audio_ctrl_l >> 8); + i2c_cmd[1] = (uint8_t)audio_ctrl_l & 0xFF; + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + return ERROR; + } + } + + if(spk_volume != audio_codec.spk_volume) + { + spk_volume = audio_codec.spk_volume; + audio_ctrl_l = WM8988_R2_LOUT1_VOLUME << 9 | 0x100; + audio_ctrl_r = WM8988_R3_ROUT1_VOLUME << 9 | 0x100; + audio_ctrl_l |= audio_codec.spk_volume; + audio_ctrl_r |= audio_codec.spk_volume; + + i2c_cmd[0] = (uint8_t)(audio_ctrl_l >> 8); + i2c_cmd[1] = (uint8_t)audio_ctrl_l & 0xFF; + + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + return ERROR; + } + i2c_cmd[0] = (uint8_t)(audio_ctrl_r >> 8); + i2c_cmd[1] = (uint8_t)audio_ctrl_r & 0xFF; + if(i2c_master_transmit(&hi2cx, WM8988_I2C_ADDR_CSB_LOW, (uint8_t *)i2c_cmd, 2, 0xFFFF) != I2C_OK) + { + return ERROR; + } + } + return SUCCESS; +} + +/** + * @} + */ + +/** + * @} + */ + + + + diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/main.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/main.c new file mode 100644 index 0000000..4140095 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/main.c @@ -0,0 +1,200 @@ +/** + ************************************************************************** + * @file main.c + * @version v2.0.2 + * @date 2021-12-31 + * @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. + * + ************************************************************************** + */ + +#include "at32f413_board.h" +#include "at32f413_clock.h" +#include "usbd_core.h" +#include "usbd_int.h" +#include "audio_hid_class.h" +#include "audio_hid_desc.h" +#include "audio_codec.h" + +/** @addtogroup AT32F413_periph_examples + * @{ + */ + +/** @addtogroup 413_USB_device_audio_hid USB_device_audio_hid + * @{ + */ + +/* usb global struct define */ +usbd_core_type usb_core_dev; + +uint8_t report_buf[USBD_IN_MAXPACKET_SIZE]; + +/** + * @brief usb 48M clock select + * @param clk_s:USB_CLK_HICK, USB_CLK_HEXT + * @retval none + */ +void usb_clock48m_select(usb_clk48_s clk_s) +{ + if(clk_s == USB_CLK_HICK) + { + crm_usb_clock_source_select(CRM_USB_CLOCK_SOURCE_HICK); + + /* enable the acc calibration ready interrupt */ + crm_periph_clock_enable(CRM_ACC_PERIPH_CLOCK, TRUE); + + /* update the c1\c2\c3 value */ + acc_write_c1(7980); + acc_write_c2(8000); + acc_write_c3(8020); + + /* open acc calibration */ + acc_calibration_mode_enable(ACC_CAL_HICKTRIM, TRUE); + } + else + { + switch(system_core_clock) + { + /* 48MHz */ + case 48000000: + crm_usb_clock_div_set(CRM_USB_DIV_1); + break; + + /* 72MHz */ + case 72000000: + crm_usb_clock_div_set(CRM_USB_DIV_1_5); + break; + + /* 96MHz */ + case 96000000: + crm_usb_clock_div_set(CRM_USB_DIV_2); + break; + + /* 120MHz */ + case 120000000: + crm_usb_clock_div_set(CRM_USB_DIV_2_5); + break; + + /* 144MHz */ + case 144000000: + crm_usb_clock_div_set(CRM_USB_DIV_3); + break; + + /* 168MHz */ + case 168000000: + crm_usb_clock_div_set(CRM_USB_DIV_3_5); + break; + + /* 192MHz */ + case 192000000: + crm_usb_clock_div_set(CRM_USB_DIV_4); + break; + + default: + break; + + } + } +} + +/** + * @brief main function. + * @param none + * @retval none + */ +int main(void) +{ + /* config nvic priority group */ + nvic_priority_group_config(NVIC_PRIORITY_GROUP_4); + + /* system clock config */ + system_clock_config(); + + /* audio codec init */ + audio_codec_init(); + + /* at32 board init */ + at32_board_init(); + + /* select usb 48m clcok source */ + usb_clock48m_select(USB_CLK_HEXT); + + /* enable usb clock */ + crm_periph_clock_enable(CRM_USB_PERIPH_CLOCK, TRUE); + + /* enable usb interrupt */ + nvic_irq_enable(USBFS_L_CAN1_RX0_IRQn, 0, 0); + + /* usb core init */ + usbd_core_init(&usb_core_dev, USB, &audio_hid_class_handler, &audio_hid_desc_handler, 0); + + /* enable usb pull-up */ + usbd_connect(&usb_core_dev); + + while(1) + { + audio_codec_loop(); + if(at32_button_press() == USER_BUTTON) + { + report_buf[0] = HID_REPORT_ID_5; + report_buf[1] = (~report_buf[1]) & 0x1; + class_send_report(&usb_core_dev, report_buf, USBD_IN_MAXPACKET_SIZE); + } + delay_ms(100); + } +} + +/** + * @brief this function handles usb interrupt. + * @param none + * @retval none + */ +void USBFS_L_CAN1_RX0_IRQHandler(void) +{ + usbd_irq_handler(&usb_core_dev); +} + +/** + * @brief usb delay millisecond function. + * @param ms: number of millisecond delay + * @retval none + */ +void usb_delay_ms(uint32_t ms) +{ + /* user can define self delay function */ + delay_ms(ms); +} + +/** + * @brief usb delay microsecond function. + * @param us: number of microsecond delay + * @retval none + */ +void usb_delay_us(uint32_t us) +{ + delay_us(us); +} + +/** + * @} + */ + +/** + * @} + */ diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h index d23ebb8..d825fa0 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/readme.txt b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/readme.txt index 453de0f..f88433f 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/readme.txt +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_int.c index 1604b6d..8a2129e 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/main.c b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/main.c index e4cc1d1..d018607 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/main.c +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -120,7 +120,7 @@ void usb_clock48m_select(usb_clk48_s clk_s) */ void keyboard_send_string(uint8_t *string, uint8_t len) { - uint8_t index = 0; + __IO uint8_t index = 0; for(index = 0; index < len; index ++) { while(1) @@ -132,17 +132,18 @@ void keyboard_send_string(uint8_t *string, uint8_t len) break; } } - } - /* send 0x00 */ - while(1) - { - if(g_keyboard_tx_completed == 1) + /* send 0x00 */ + while(1) { - g_keyboard_tx_completed = 0; - usb_hid_keyboard_send_char(&usb_core_dev, 0x00); - break; + if(g_keyboard_tx_completed == 1) + { + g_keyboard_tx_completed = 0; + usb_hid_keyboard_send_char(&usb_core_dev, 0x00); + break; + } } } + } /** @@ -155,6 +156,8 @@ int main(void) uint16_t data_len; uint32_t timeout; + + uint8_t send_zero_packet = 0; /* config nvic priority group */ nvic_priority_group_config(NVIC_PRIORITY_GROUP_4); @@ -183,8 +186,19 @@ int main(void) /* get usb vcp receive data */ data_len = usb_vcp_get_rxdata(&usb_core_dev, usb_buffer); - if(data_len > 0) + if(data_len > 0 || send_zero_packet == 1) { + + /* bulk transfer is complete when the endpoint does one of the following + 1 has transferred exactly the amount of data expected + 2 transfers a packet with a payload size less than wMaxPacketSize or transfers a zero-length packet + */ + if(data_len > 0) + send_zero_packet = 1; + + if(data_len == 0) + send_zero_packet = 0; + timeout = 50000; do { diff --git a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/custom_hid/inc/usb_conf.h index ae5b35a..732ca0c 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/custom_hid/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/readme.txt b/project/at_start_f413/examples/usb_device/custom_hid/readme.txt index 47f4912..837218c 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/readme.txt +++ b/project/at_start_f413/examples/usb_device/custom_hid/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_int.c index 2201883..3622653 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/src/main.c b/project/at_start_f413/examples/usb_device/custom_hid/src/main.c index fe3e8f3..d0d49d2 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/src/main.c +++ b/project/at_start_f413/examples/usb_device/custom_hid/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/keyboard/inc/usb_conf.h index a7e34c7..e83e636 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/keyboard/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/readme.txt b/project/at_start_f413/examples/usb_device/keyboard/readme.txt index 8937fc6..d659f2f 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/readme.txt +++ b/project/at_start_f413/examples/usb_device/keyboard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_int.c index fffeb1a..436527a 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/src/main.c b/project/at_start_f413/examples/usb_device/keyboard/src/main.c index bb7da6e..7ebfec2 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/src/main.c +++ b/project/at_start_f413/examples/usb_device/keyboard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -40,7 +40,7 @@ */ usbd_core_type usb_core_dev; -extern uint8_t hid_suspend_flag; +extern __IO uint8_t hid_suspend_flag; void keyboard_send_string(uint8_t *string, uint8_t len); void system_clock_recover(void); void button_exint_init(void); @@ -54,7 +54,7 @@ void usb_low_power_wakeup_config(void); */ void keyboard_send_string(uint8_t *string, uint8_t len) { - uint8_t index = 0; + __IO uint8_t index = 0; for(index = 0; index < len; index ++) { while(1) @@ -66,16 +66,17 @@ void keyboard_send_string(uint8_t *string, uint8_t len) break; } } - } - while(1) - { - if(g_u8tx_completed == 1) + while(1) { - g_u8tx_completed = 0; - usb_hid_keyboard_send_char(&usb_core_dev, 0x00); - break; + if(g_u8tx_completed == 1) + { + g_u8tx_completed = 0; + usb_hid_keyboard_send_char(&usb_core_dev, 0x00); + break; + } } } + } /** diff --git a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/mouse/inc/usb_conf.h index cdba697..01bf5c2 100644 --- a/project/at_start_f413/examples/usb_device/mouse/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/mouse/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/readme.txt b/project/at_start_f413/examples/usb_device/mouse/readme.txt index a665526..512832b 100644 --- a/project/at_start_f413/examples/usb_device/mouse/readme.txt +++ b/project/at_start_f413/examples/usb_device/mouse/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_int.c index e7af0b5..0de4c7a 100644 --- a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/src/main.c b/project/at_start_f413/examples/usb_device/mouse/src/main.c index 53ca434..2eefcf5 100644 --- a/project/at_start_f413/examples/usb_device/mouse/src/main.c +++ b/project/at_start_f413/examples/usb_device/mouse/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -40,8 +40,8 @@ */ usbd_core_type usb_core_dev; -uint8_t press_mouse = 0; -extern uint8_t hid_suspend_flag; +__IO uint8_t press_mouse = 0; +extern __IO uint8_t hid_suspend_flag; uint8_t report_buf[USBD_IN_MAXPACKET_SIZE]; void system_clock_recover(void); void button_exint_init(void); diff --git a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h b/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h index 9eb2495..575dfb6 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb mass storage disk interface header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/msc/inc/usb_conf.h index 4ce43c2..225fe6a 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/readme.txt b/project/at_start_f413/examples/usb_device/msc/readme.txt index f1056c5..5892a96 100644 --- a/project/at_start_f413/examples/usb_device/msc/readme.txt +++ b/project/at_start_f413/examples/usb_device/msc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/msc/src/at32f413_int.c index e3884a2..ce58827 100644 --- a/project/at_start_f413/examples/usb_device/msc/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/msc/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/src/main.c b/project/at_start_f413/examples/usb_device/msc/src/main.c index ed55509..a0703ce 100644 --- a/project/at_start_f413/examples/usb_device/msc/src/main.c +++ b/project/at_start_f413/examples/usb_device/msc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c b/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c index 7425713..932a74a 100644 --- a/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c +++ b/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb mass storage disk function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/printer/inc/usb_conf.h index 8e1707b..f0257a8 100644 --- a/project/at_start_f413/examples/usb_device/printer/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/printer/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/readme.txt b/project/at_start_f413/examples/usb_device/printer/readme.txt index 05c343d..e518aab 100644 --- a/project/at_start_f413/examples/usb_device/printer/readme.txt +++ b/project/at_start_f413/examples/usb_device/printer/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/printer/src/at32f413_int.c index 92f978c..d266ba4 100644 --- a/project/at_start_f413/examples/usb_device/printer/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/printer/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/src/main.c b/project/at_start_f413/examples/usb_device/printer/src/main.c index d2573f7..1820443 100644 --- a/project/at_start_f413/examples/usb_device/printer/src/main.c +++ b/project/at_start_f413/examples/usb_device/printer/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/usb_conf.h index f1fe16a..5c19b11 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/readme.txt b/project/at_start_f413/examples/usb_device/vcp_loopback/readme.txt index e8f62d4..988f4b3 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/readme.txt +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_int.c index aa11bf6..3496a70 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/src/main.c b/project/at_start_f413/examples/usb_device/vcp_loopback/src/main.c index 1cf912e..81ac530 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/src/main.c +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h index e03f859..0c9540c 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash_fat16.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief fat16 file system header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h index 1bb1d89..f87a249 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb mass storage disk interface header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/usb_conf.h index 8492ef5..62b3450 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/readme.txt b/project/at_start_f413/examples/usb_device/virtual_msc_iap/readme.txt index f975361..b75bfd6 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/readme.txt +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_int.c index b09143d..37a8405 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/flash_fat16.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/flash_fat16.c index b30f144..e8490b9 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/flash_fat16.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/flash_fat16.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash_fat16.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief fat16 file system ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c index c6bdfe6..7b1016b 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c index ac68501..67d7cf5 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb mass storage disk function ************************************************************************** * Copyright notice & Disclaimer @@ -119,8 +119,7 @@ usb_sts_type msc_disk_capacity(uint8_t lun, uint32_t *blk_nbr, uint32_t *blk_siz switch(lun) { case INTERNAL_FLASH_LUN: - //*blk_nbr = flash_iap.flash_size / flash_iap.sector_size; - *blk_nbr = 1024*1024 / flash_iap.sector_size; + *blk_nbr = 100*1024*1024 / flash_iap.sector_size; *blk_size = flash_iap.sector_size; break; case SPI_FLASH_LUN: diff --git a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_clock.h b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_conf.h b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_int.h b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_int.h +++ b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvoptx b/project/at_start_f413/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvoptx index 9e67727..8c8f8f2 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvoptx +++ b/project/at_start_f413/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvoptx @@ -270,6 +270,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 +
+ + 3 + 8 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c at32f413_misc.c 0 @@ -277,7 +289,7 @@ 3 - 8 + 9 1 0 0 @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvprojx b/project/at_start_f413/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvprojx index ba71132..26214bc 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvprojx +++ b/project/at_start_f413/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_misc.c 1 diff --git a/project/at_start_f413/examples/wdt/wdt_reset/readme.txt b/project/at_start_f413/examples/wdt/wdt_reset/readme.txt index 472e74a..de2af48 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/readme.txt +++ b/project/at_start_f413/examples/wdt/wdt_reset/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file wdt_reset/readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c +++ b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_int.c b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_int.c index 3b73d69..56c8d70 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_int.c +++ b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/src/main.c b/project/at_start_f413/examples/wdt/wdt_reset/src/main.c index 1494045..46a8d5f 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/src/main.c +++ b/project/at_start_f413/examples/wdt/wdt_reset/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_clock.h b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_clock.h index 49bb02c..fd22786 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_conf.h b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_conf.h index eb0dedd..5c513f2 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_int.h b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_int.h index 2b6dea1..badfcc8 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_int.h +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvoptx b/project/at_start_f413/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvoptx index fd9ecd6..0630e85 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvoptx +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvoptx @@ -270,6 +270,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c at32f413_misc.c 0 @@ -277,7 +289,7 @@ 3 - 8 + 9 1 0 0 @@ -297,7 +309,7 @@ 0 4 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 4 - 10 + 11 2 0 0 @@ -329,7 +341,7 @@ 0 5 - 11 + 12 5 0 0 diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvprojx b/project/at_start_f413/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvprojx index 88b2cbb..cee5545 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvprojx +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_misc.c 1 diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt b/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt index 5956d8f..3e4134e 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file wwdt_reset/readme.txt - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c index 88fb2b3..244a26d 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_int.c b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_int.c index c174e9e..bbd0e46 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_int.c +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/src/main.c b/project/at_start_f413/examples/wwdt/wwdt_reset/src/main.c index 97ed8c0..53fb2e8 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/src/main.c +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/templates/iar_v6.10/template.ewp b/project/at_start_f413/templates/iar_v6.10/template.ewp index 6a266e8..d8c5fe4 100644 --- a/project/at_start_f413/templates/iar_v6.10/template.ewp +++ b/project/at_start_f413/templates/iar_v6.10/template.ewp @@ -70,16 +70,16 @@ diff --git a/project/at_start_f413/templates/iar_v7.4/template.ewp b/project/at_start_f413/templates/iar_v7.4/template.ewp index 2548ec1..441fae4 100644 --- a/project/at_start_f413/templates/iar_v7.4/template.ewp +++ b/project/at_start_f413/templates/iar_v7.4/template.ewp @@ -60,16 +60,16 @@