diff --git a/AT32F415_periph_lib_V2.0.0.chm b/AT32F415_periph_lib_V2.0.2.chm similarity index 62% rename from AT32F415_periph_lib_V2.0.0.chm rename to AT32F415_periph_lib_V2.0.2.chm index 0e27345..ef7dc70 100644 Binary files a/AT32F415_periph_lib_V2.0.0.chm and b/AT32F415_periph_lib_V2.0.2.chm differ diff --git a/document/ReleaseNotes_AT32F415_Firmware_Library.pdf b/document/ReleaseNotes_AT32F415_Firmware_Library.pdf index af1a557..2fce5ec 100644 Binary files a/document/ReleaseNotes_AT32F415_Firmware_Library.pdf and b/document/ReleaseNotes_AT32F415_Firmware_Library.pdf differ diff --git a/libraries/cmsis/cm4/device_support/at32f415.h b/libraries/cmsis/cm4/device_support/at32f415.h index b3f1d43..41c9a8f 100644 --- a/libraries/cmsis/cm4/device_support/at32f415.h +++ b/libraries/cmsis/cm4/device_support/at32f415.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 header file ************************************************************************** * Copyright notice & Disclaimer @@ -58,7 +58,7 @@ extern "C" { !defined (AT32F415KBU7_4) && !defined (AT32F415R8T7) && !defined (AT32F415R8T7_7) && \ !defined (AT32F415C8T7) && !defined (AT32F415K8U7_4) - #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 at32f415.h file)" #endif #if defined (AT32F415RCT7) || defined (AT32F415RCT7_7) || defined (AT32F415CCT7) || \ @@ -89,7 +89,7 @@ extern "C" { */ #define __AT32F415_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */ #define __AT32F415_LIBRARY_VERSION_MIDDLE (0x00) /*!< [23:16] middle version */ -#define __AT32F415_LIBRARY_VERSION_MINOR (0x00) /*!< [15:8] minor version */ +#define __AT32F415_LIBRARY_VERSION_MINOR (0x02) /*!< [15:8] minor version */ #define __AT32F415_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */ #define __AT32F415_LIBRARY_VERSION ((__AT32F415_LIBRARY_VERSION_MAJOR << 24) | \ (__AT32F415_LIBRARY_VERSION_MIDDLE << 16) | \ @@ -360,7 +360,8 @@ typedef enum {ERROR = 0, SUCCESS = !ERROR} error_status; /** * @} */ - + +#include "at32f415_def.h" #include "at32f415_conf.h" #ifdef __cplusplus diff --git a/libraries/cmsis/cm4/device_support/at32f415_conf_template.h b/libraries/cmsis/cm4/device_support/at32f415_conf_template.h index 910dbec..49b2790 100644 --- a/libraries/cmsis/cm4/device_support/at32f415_conf_template.h +++ b/libraries/cmsis/cm4/device_support/at32f415_conf_template.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s index bc2403d..28ba6ab 100644 --- a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s +++ b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file startup_at32f415.s - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415xx devices vector table for gcc toolchain. * this module performs: * - set the initial sp diff --git a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f415.s b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f415.s index 087c714..05d11d8 100644 --- a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f415.s +++ b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f415.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f415.s -;* @version v2.0.0 -;* @date 2021-11-26 +;* @version v2.0.2 +;* @date 2021-12-31 ;* @brief at32f415 startup file for IAR Systems ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s index bcc45b9..275d41d 100644 --- a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s +++ b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f415.s -;* @version v2.0.0 -;* @date 2021-11-26 +;* @version v2.0.2 +;* @date 2021-12-31 ;* @brief at32f415 startup file for keil ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/system_at32f415.c b/libraries/cmsis/cm4/device_support/system_at32f415.c index 1505877..0b478f0 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f415.c +++ b/libraries/cmsis/cm4/device_support/system_at32f415.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f415.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_at32f415.h b/libraries/cmsis/cm4/device_support/system_at32f415.h index 42d29c2..b798747 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f415.h +++ b/libraries/cmsis/cm4/device_support/system_at32f415.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f415.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/at32f415_adc.h b/libraries/drivers/inc/at32f415_adc.h index b2bb528..aa83870 100644 --- a/libraries/drivers/inc/at32f415_adc.h +++ b/libraries/drivers/inc/at32f415_adc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_adc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 adc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_can.h b/libraries/drivers/inc/at32f415_can.h index b964bbe..5067bdb 100644 --- a/libraries/drivers/inc/at32f415_can.h +++ b/libraries/drivers/inc/at32f415_can.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_can.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 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/at32f415_cmp.h b/libraries/drivers/inc/at32f415_cmp.h index e4ddcb1..a2c1da3 100644 --- a/libraries/drivers/inc/at32f415_cmp.h +++ b/libraries/drivers/inc/at32f415_cmp.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_cmp.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 cmp header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_crc.h b/libraries/drivers/inc/at32f415_crc.h index 4c7257f..ed17491 100644 --- a/libraries/drivers/inc/at32f415_crc.h +++ b/libraries/drivers/inc/at32f415_crc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_crc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 crc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_crm.h b/libraries/drivers/inc/at32f415_crm.h index d65c3d3..dc218be 100644 --- a/libraries/drivers/inc/at32f415_crm.h +++ b/libraries/drivers/inc/at32f415_crm.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_crm.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 crm header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_debug.h b/libraries/drivers/inc/at32f415_debug.h index 6c8ac09..3bcf9eb 100644 --- a/libraries/drivers/inc/at32f415_debug.h +++ b/libraries/drivers/inc/at32f415_debug.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_debug.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 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/at32f415_def.h b/libraries/drivers/inc/at32f415_def.h new file mode 100644 index 0000000..11e547b --- /dev/null +++ b/libraries/drivers/inc/at32f415_def.h @@ -0,0 +1,69 @@ +/** + ************************************************************************** + * @file at32f415_def.h + * @version v2.0.2 + * @date 2021-12-31 + * @brief at32f415 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 __AT32F415_DEF_H +#define __AT32F415_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/at32f415_dma.h b/libraries/drivers/inc/at32f415_dma.h index 9640ee1..ee66b3d 100644 --- a/libraries/drivers/inc/at32f415_dma.h +++ b/libraries/drivers/inc/at32f415_dma.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_dma.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 dma header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_ertc.h b/libraries/drivers/inc/at32f415_ertc.h index d085463..b818def 100644 --- a/libraries/drivers/inc/at32f415_ertc.h +++ b/libraries/drivers/inc/at32f415_ertc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_ertc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 ertc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_exint.h b/libraries/drivers/inc/at32f415_exint.h index 50a8c32..cc3006f 100644 --- a/libraries/drivers/inc/at32f415_exint.h +++ b/libraries/drivers/inc/at32f415_exint.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_exint.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 exint header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_flash.h b/libraries/drivers/inc/at32f415_flash.h index ec972bc..0d61ba7 100644 --- a/libraries/drivers/inc/at32f415_flash.h +++ b/libraries/drivers/inc/at32f415_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_flash.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_gpio.h b/libraries/drivers/inc/at32f415_gpio.h index 8cb428a..699aa2d 100644 --- a/libraries/drivers/inc/at32f415_gpio.h +++ b/libraries/drivers/inc/at32f415_gpio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_gpio.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 gpio header file ************************************************************************** * Copyright notice & Disclaimer @@ -423,7 +423,7 @@ typedef struct }; /** - * @brief gpio wcr register, offset:0x10 + * @brief gpio scr register, offset:0x10 */ union { diff --git a/libraries/drivers/inc/at32f415_i2c.h b/libraries/drivers/inc/at32f415_i2c.h index d7b2db2..7b2a86c 100644 --- a/libraries/drivers/inc/at32f415_i2c.h +++ b/libraries/drivers/inc/at32f415_i2c.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_i2c.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 i2c header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_misc.h b/libraries/drivers/inc/at32f415_misc.h index 71abb64..018aa0f 100644 --- a/libraries/drivers/inc/at32f415_misc.h +++ b/libraries/drivers/inc/at32f415_misc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_misc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 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/at32f415_pwc.h b/libraries/drivers/inc/at32f415_pwc.h index 5e069a9..0bbfefb 100644 --- a/libraries/drivers/inc/at32f415_pwc.h +++ b/libraries/drivers/inc/at32f415_pwc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_pwc.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 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/at32f415_sdio.h b/libraries/drivers/inc/at32f415_sdio.h index 9b3f683..b76059a 100644 --- a/libraries/drivers/inc/at32f415_sdio.h +++ b/libraries/drivers/inc/at32f415_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_sdio.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 sdio header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_spi.h b/libraries/drivers/inc/at32f415_spi.h index 1c998ea..6fc3479 100644 --- a/libraries/drivers/inc/at32f415_spi.h +++ b/libraries/drivers/inc/at32f415_spi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_spi.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 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/at32f415_tmr.h b/libraries/drivers/inc/at32f415_tmr.h index ff08d0f..bdfc3f7 100644 --- a/libraries/drivers/inc/at32f415_tmr.h +++ b/libraries/drivers/inc/at32f415_tmr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_tmr.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 tmr header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_usart.h b/libraries/drivers/inc/at32f415_usart.h index f399f20..6686973 100644 --- a/libraries/drivers/inc/at32f415_usart.h +++ b/libraries/drivers/inc/at32f415_usart.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_usart.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 usart header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_usb.h b/libraries/drivers/inc/at32f415_usb.h index 5cb09df..9da299a 100644 --- a/libraries/drivers/inc/at32f415_usb.h +++ b/libraries/drivers/inc/at32f415_usb.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_usb.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 usb header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_wdt.h b/libraries/drivers/inc/at32f415_wdt.h index 18c3b49..cb88749 100644 --- a/libraries/drivers/inc/at32f415_wdt.h +++ b/libraries/drivers/inc/at32f415_wdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_wdt.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 wdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_wwdt.h b/libraries/drivers/inc/at32f415_wwdt.h index 8f798ec..1388e71 100644 --- a/libraries/drivers/inc/at32f415_wwdt.h +++ b/libraries/drivers/inc/at32f415_wwdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_wwdt.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 wwdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_adc.c b/libraries/drivers/src/at32f415_adc.c index f37e628..9b19b7e 100644 --- a/libraries/drivers/src/at32f415_adc.c +++ b/libraries/drivers/src/at32f415_adc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 @@ -911,7 +911,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/at32f415_can.c b/libraries/drivers/src/at32f415_can.c index 1977ac2..006ccee 100644 --- a/libraries/drivers/src/at32f415_can.c +++ b/libraries/drivers/src/at32f415_can.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 @@ -583,13 +583,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; @@ -660,10 +660,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/at32f415_cmp.c b/libraries/drivers/src/at32f415_cmp.c index bb841dc..49e766d 100644 --- a/libraries/drivers/src/at32f415_cmp.c +++ b/libraries/drivers/src/at32f415_cmp.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_cmp.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/at32f415_crc.c b/libraries/drivers/src/at32f415_crc.c index 7a9ca8c..c330007 100644 --- a/libraries/drivers/src/at32f415_crc.c +++ b/libraries/drivers/src/at32f415_crc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_crm.c b/libraries/drivers/src/at32f415_crm.c index 86dfb52..558b60c 100644 --- a/libraries/drivers/src/at32f415_crm.c +++ b/libraries/drivers/src/at32f415_crm.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_debug.c b/libraries/drivers/src/at32f415_debug.c index 5f52304..8476f0b 100644 --- a/libraries/drivers/src/at32f415_debug.c +++ b/libraries/drivers/src/at32f415_debug.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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; } /** * @brief set periph debug mode @@ -75,14 +75,13 @@ uint32_t debug_device_id_get(void) */ 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/at32f415_dma.c b/libraries/drivers/src/at32f415_dma.c index b5c7fcd..aeb38d9 100644 --- a/libraries/drivers/src/at32f415_dma.c +++ b/libraries/drivers/src/at32f415_dma.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 @@ -342,9 +341,9 @@ 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 { diff --git a/libraries/drivers/src/at32f415_ertc.c b/libraries/drivers/src/at32f415_ertc.c index edb1b49..2218676 100644 --- a/libraries/drivers/src/at32f415_ertc.c +++ b/libraries/drivers/src/at32f415_ertc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_ertc.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the ertc firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -102,7 +102,7 @@ error_status ertc_wait_update(void) ertc_write_protect_disable(); /* clear updf flag */ - ERTC->sts_bit.updf = 0; + ERTC->sts = ~(ERTC_UPDF_FLAG | 0x00000080) | (ERTC->sts_bit.imen << 7); /* enable write protection */ ertc_write_protect_enable(); @@ -170,7 +170,7 @@ error_status ertc_init_mode_enter(void) if(ERTC->sts_bit.imf == 0) { /* enter init mode */ - ERTC->sts_bit.imen = 1; + ERTC->sts = 0xFFFFFFFF; while(ERTC->sts_bit.imf == 0) { @@ -196,7 +196,7 @@ error_status ertc_init_mode_enter(void) */ void ertc_init_mode_exit(void) { - ERTC->sts_bit.imen = FALSE; + ERTC->sts = 0xFFFFFF7F; } /** @@ -1328,7 +1328,7 @@ void ertc_tamper_enable(ertc_tamper_select_type tamper_x, confirm_state new_stat /** * @brief enable or disable interrupt. * @param source: interrupts sources - * this parameter can be one of the following values: + * this parameter can be any combination of the following values: * - ERTC_TP_INT: tamper interrupt. * - ERTC_ALA_INT: alarm a interrupt. * - ERTC_ALB_INT: alarm b interrupt. @@ -1463,7 +1463,7 @@ void ertc_flag_clear(uint32_t flag) /* disable write protection */ ertc_write_protect_disable(); - ERTC->sts &= ~flag; + ERTC->sts = ~(flag | 0x00000080) | (ERTC->sts_bit.imen << 7); /* enable write protection */ ertc_write_protect_enable(); diff --git a/libraries/drivers/src/at32f415_exint.c b/libraries/drivers/src/at32f415_exint.c index b37e54a..66976db 100644 --- a/libraries/drivers/src/at32f415_exint.c +++ b/libraries/drivers/src/at32f415_exint.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 diff --git a/libraries/drivers/src/at32f415_flash.c b/libraries/drivers/src/at32f415_flash.c index 00b58da..b088dce 100644 --- a/libraries/drivers/src/at32f415_flash.c +++ b/libraries/drivers/src/at32f415_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_gpio.c b/libraries/drivers/src/at32f415_gpio.c index 1cf8de4..bc84f71 100644 --- a/libraries/drivers/src/at32f415_gpio.c +++ b/libraries/drivers/src/at32f415_gpio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_i2c.c b/libraries/drivers/src/at32f415_i2c.c index 2c46b4e..8073099 100644 --- a/libraries/drivers/src/at32f415_i2c.c +++ b/libraries/drivers/src/at32f415_i2c.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_misc.c b/libraries/drivers/src/at32f415_misc.c index 69a5a45..5262cfa 100644 --- a/libraries/drivers/src/at32f415_misc.c +++ b/libraries/drivers/src/at32f415_misc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_pwc.c b/libraries/drivers/src/at32f415_pwc.c index 7e8e7aa..30d070e 100644 --- a/libraries/drivers/src/at32f415_pwc.c +++ b/libraries/drivers/src/at32f415_pwc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_sdio.c b/libraries/drivers/src/at32f415_sdio.c index 6ff28ad..1091a82 100644 --- a/libraries/drivers/src/at32f415_sdio.c +++ b/libraries/drivers/src/at32f415_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_spi.c b/libraries/drivers/src/at32f415_spi.c index 2277080..45b7b84 100644 --- a/libraries/drivers/src/at32f415_spi.c +++ b/libraries/drivers/src/at32f415_spi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_tmr.c b/libraries/drivers/src/at32f415_tmr.c index 185f7bd..e6cd185 100644 --- a/libraries/drivers/src/at32f415_tmr.c +++ b/libraries/drivers/src/at32f415_tmr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 @@ -1346,7 +1346,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/at32f415_usart.c b/libraries/drivers/src/at32f415_usart.c index bb228ba..57fa1ff 100644 --- a/libraries/drivers/src/at32f415_usart.c +++ b/libraries/drivers/src/at32f415_usart.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_usb.c b/libraries/drivers/src/at32f415_usb.c index 87ce4af..2cf1ca3 100644 --- a/libraries/drivers/src/at32f415_usb.c +++ b/libraries/drivers/src/at32f415_usb.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_usb.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief contains all the functions for the usb firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -309,8 +309,7 @@ void usb_set_tx_fifo(otg_global_type *usbx, uint8_t txfifo, uint16_t size) offset = usbx->grxfsiz; if(txfifo == 0) { - usbx->gnptxfsiz_ept0tx_bit.nptxfstaddr = offset; - usbx->gnptxfsiz_ept0tx_bit.nptxfdep = size; + usbx->gnptxfsiz_ept0tx = offset | (size << 16); } else { @@ -319,8 +318,7 @@ void usb_set_tx_fifo(otg_global_type *usbx, uint8_t txfifo, uint16_t size) { offset += usbx->dieptxfn_bit[i_index].ineptxfdep; } - usbx->dieptxfn_bit[txfifo-1].ineptxfstaddr = offset; - usbx->dieptxfn_bit[txfifo-1].ineptxfdep = size; + usbx->dieptxfn[txfifo - 1] = offset | (size << 16); } } @@ -423,7 +421,11 @@ void usb_write_packet(otg_global_type *usbx, uint8_t *pusr_buf, uint16_t num, ui uint32_t *pbuf = (uint32_t *)pusr_buf; for(n_index = 0; n_index < nhbytes; n_index ++) { +#if defined (__ICCARM__) && (__VER__ < 7000000) + USB_FIFO(usbx, num) = *(__packed uint32_t *)pbuf; +#else USB_FIFO(usbx, num) = __UNALIGNED_UINT32_READ(pbuf); +#endif pbuf ++; } } @@ -442,7 +444,11 @@ void usb_read_packet(otg_global_type *usbx, uint8_t *pusr_buf, uint16_t num, uin uint32_t *pbuf = (uint32_t *)pusr_buf; for(n_index = 0; n_index < nhbytes; n_index ++) { +#if defined (__ICCARM__) && (__VER__ < 7000000) + *(__packed uint32_t *)pbuf = USB_FIFO(usbx, 0); +#else __UNALIGNED_UINT32_WRITE(pbuf, (USB_FIFO(usbx, 0))); +#endif pbuf ++; } } diff --git a/libraries/drivers/src/at32f415_wdt.c b/libraries/drivers/src/at32f415_wdt.c index 6ab0594..f07092a 100644 --- a/libraries/drivers/src/at32f415_wdt.c +++ b/libraries/drivers/src/at32f415_wdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_wwdt.c b/libraries/drivers/src/at32f415_wwdt.c index 4d6bc4f..3ecf5ce 100644 --- a/libraries/drivers/src/at32f415_wwdt.c +++ b/libraries/drivers/src/at32f415_wwdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 909517a..5d0686e 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 9883c2d..171ae86 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/usb_drivers/inc/usb_core.h b/middlewares/usb_drivers/inc/usb_core.h index 4e7ce20..99a859f 100644 --- a/middlewares/usb_drivers/inc/usb_core.h +++ b/middlewares/usb_drivers/inc/usb_core.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_core.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb core header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/inc/usb_std.h b/middlewares/usb_drivers/inc/usb_std.h index 06c2fc3..3d42d3b 100644 --- a/middlewares/usb_drivers/inc/usb_std.h +++ b/middlewares/usb_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/usb_drivers/inc/usbd_core.h b/middlewares/usb_drivers/inc/usbd_core.h index 7d8f201..a5d9e66 100644 --- a/middlewares/usb_drivers/inc/usbd_core.h +++ b/middlewares/usb_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/usb_drivers/inc/usbd_int.h b/middlewares/usb_drivers/inc/usbd_int.h index ddb81e3..52b38a8 100644 --- a/middlewares/usb_drivers/inc/usbd_int.h +++ b/middlewares/usb_drivers/inc/usbd_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_int.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb interrupt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/inc/usbd_sdr.h b/middlewares/usb_drivers/inc/usbd_sdr.h index 84707fe..ff39e75 100644 --- a/middlewares/usb_drivers/inc/usbd_sdr.h +++ b/middlewares/usb_drivers/inc/usbd_sdr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_sdr.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/usb_drivers/inc/usbh_core.h b/middlewares/usb_drivers/inc/usbh_core.h index ce5943f..60c38b7 100644 --- a/middlewares/usb_drivers/inc/usbh_core.h +++ b/middlewares/usb_drivers/inc/usbh_core.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_core.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host core header file ************************************************************************** * Copyright notice & Disclaimer @@ -301,6 +301,7 @@ typedef struct uint32_t conn_sts; /*!< connect status */ uint32_t port_enable; /*!< port enable status */ + uint32_t timer; /*!< sof timer */ uint32_t err_cnt[USB_HOST_CHANNEL_NUM]; /*!< error counter */ uint32_t xfer_cnt[USB_HOST_CHANNEL_NUM]; /*!< xfer counter */ diff --git a/middlewares/usb_drivers/inc/usbh_ctrl.h b/middlewares/usb_drivers/inc/usbh_ctrl.h index 7730b3e..b3ce276 100644 --- a/middlewares/usb_drivers/inc/usbh_ctrl.h +++ b/middlewares/usb_drivers/inc/usbh_ctrl.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_ctrl.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/usb_drivers/inc/usbh_int.h b/middlewares/usb_drivers/inc/usbh_int.h index 68c0f5c..ccc4636 100644 --- a/middlewares/usb_drivers/inc/usbh_int.h +++ b/middlewares/usb_drivers/inc/usbh_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_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 @@ -55,6 +55,7 @@ void usbh_hch_in_handler(usbh_core_type *uhost, uint8_t chn); void usbh_hch_out_handler(usbh_core_type *uhost, uint8_t chn); void usbh_rx_qlvl_handler(usbh_core_type *uhost); void usbh_wakeup_handler(usbh_core_type *uhost); +void usbh_sof_handler(usbh_core_type *uhost); /** * @} diff --git a/middlewares/usb_drivers/src/usb_core.c b/middlewares/usb_drivers/src/usb_core.c index 7d12fef..4f60669 100644 --- a/middlewares/usb_drivers/src/usb_core.c +++ b/middlewares/usb_drivers/src/usb_core.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_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/usb_drivers/src/usbd_core.c b/middlewares/usb_drivers/src/usbd_core.c index 0a49032..e496280 100644 --- a/middlewares/usb_drivers/src/usbd_core.c +++ b/middlewares/usb_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 device driver ************************************************************************** * Copyright notice & Disclaimer @@ -645,7 +645,7 @@ void usbd_enter_suspend(usbd_core_type *udev) void usbd_flush_tx_fifo(usbd_core_type *udev, uint8_t ept_num) { /* flush endpoint tx fifo */ - usb_flush_tx_fifo(udev->usb_reg, ept_num & 0xF); + usb_flush_tx_fifo(udev->usb_reg, ept_num & 0x1F); } /** diff --git a/middlewares/usb_drivers/src/usbd_int.c b/middlewares/usb_drivers/src/usbd_int.c index a9af232..6155936 100644 --- a/middlewares/usb_drivers/src/usbd_int.c +++ b/middlewares/usb_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 @@ -425,8 +425,8 @@ void usbd_reset_handler(usbd_core_type *udev) /* endpoint fifo alloc */ usbd_fifo_alloc(udev); - /* flush tx fifo 0 */ - usb_flush_tx_fifo(usbx, 0); + /* flush all tx fifo */ + usb_flush_tx_fifo(usbx, 0x10); /* clear in and out endpoint interrupt flag */ for(i_index = 0; i_index < USB_EPT_MAX_NUM; i_index ++) diff --git a/middlewares/usb_drivers/src/usbd_sdr.c b/middlewares/usb_drivers/src/usbd_sdr.c index ab47180..fb21846 100644 --- a/middlewares/usb_drivers/src/usbd_sdr.c +++ b/middlewares/usb_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/middlewares/usb_drivers/src/usbh_core.c b/middlewares/usb_drivers/src/usbh_core.c index 27ee11b..2f66221 100644 --- a/middlewares/usb_drivers/src/usbh_core.c +++ b/middlewares/usb_drivers/src/usbh_core.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_core.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host driver ************************************************************************** * Copyright notice & Disclaimer @@ -512,6 +512,8 @@ usb_sts_type usbh_core_init(usbh_core_type *uhost, /* host user handler */ uhost->user_handler->user_init(); + uhost->timer = 0; + /* usb host cfg default init */ usbh_cfg_default_init(uhost); @@ -542,9 +544,6 @@ usb_sts_type usbh_core_init(usbh_core_type *uhost, /* clock select */ usbh_fsls_clksel(usbx, USB_HCFG_CLK_48M); - /* reset host port */ - usbh_reset_port(uhost); - /* set support ls and fs device */ host->hcfg_bit.fslssupp = 0; @@ -950,11 +949,13 @@ void usbh_reset_port(usbh_core_type *uhost) /* set port reset */ usb_host->hprt = hprt_val | USB_OTG_HPRT_PRTRST; - usb_delay_ms(10); + usb_delay_ms(100); /* clear port reset */ usb_host->hprt = hprt_val & (~USB_OTG_HPRT_PRTRST); + usb_delay_ms(20); + } /** @@ -968,9 +969,6 @@ static void usbh_attached(usbh_core_type *uhost) uhost->ctrl.hch_in = usbh_alloc_channel(uhost, 0x80); uhost->ctrl.hch_out = usbh_alloc_channel(uhost, 0x00); - /* reset port */ - usbh_reset_port(uhost); - /* user reset callback handler */ uhost->user_handler->user_reset(); @@ -991,6 +989,9 @@ static void usbh_attached(usbh_core_type *uhost) uhost->ctrl.ept0_size, uhost->dev.speed); + usb_flush_tx_fifo(uhost->usb_reg, 0x10); + usb_flush_rx_fifo(uhost->usb_reg); + /* user attached callback */ uhost->user_handler->user_attached(); } @@ -1027,7 +1028,7 @@ static void usbh_class_request(usbh_core_type *uhost) { uhost->global_state = USBH_CLASS; } - else if(status == USB_ERROR) + else if(status == USB_ERROR || status == USB_FAIL) { uhost->global_state = USBH_ERROR_STATE; } @@ -1133,7 +1134,13 @@ static void usbh_disconnect(usbh_core_type *uhost) usb_sts_type usbh_loop_handler(usbh_core_type *uhost) { usb_sts_type status = USB_FAIL; - + + if(uhost->conn_sts == 0 && + uhost->global_state != USBH_IDLE && + uhost->global_state != USBH_DISCONNECT) + { + uhost->global_state = USBH_IDLE; + } switch(uhost->global_state) { case USBH_IDLE: @@ -1141,6 +1148,9 @@ usb_sts_type usbh_loop_handler(usbh_core_type *uhost) { uhost->global_state = USBH_PORT_EN; + /* wait stable */ + usb_delay_ms(200); + /* port reset */ usbh_reset_port(uhost); @@ -1153,9 +1163,6 @@ usb_sts_type usbh_loop_handler(usbh_core_type *uhost) if(uhost->port_enable) { uhost->global_state = USBH_ATTACHED; - - /* wait stable */ - usb_delay_ms(50); } break; diff --git a/middlewares/usb_drivers/src/usbh_ctrl.c b/middlewares/usb_drivers/src/usbh_ctrl.c index 0326acf..f8f39dd 100644 --- a/middlewares/usb_drivers/src/usbh_ctrl.c +++ b/middlewares/usb_drivers/src/usbh_ctrl.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_ctrl.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host control request ************************************************************************** * Copyright notice & Disclaimer @@ -365,7 +365,10 @@ usb_sts_type usbh_ctrl_error_handler(usbh_core_type *uhost) else { uhost->ctrl.sts = CTRL_FAIL; - status = USB_FAIL; + uhost->global_state = USBH_DISCONNECT; + uhost->ctrl.err_cnt = 0; + USBH_DEBUG("control error: device not response"); + status = USB_ERROR; } return status; } diff --git a/middlewares/usb_drivers/src/usbh_int.c b/middlewares/usb_drivers/src/usbh_int.c index 7ed4635..b9de7f0 100644 --- a/middlewares/usb_drivers/src/usbh_int.c +++ b/middlewares/usb_drivers/src/usbh_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_int.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host interrupt request ************************************************************************** * Copyright notice & Disclaimer @@ -59,6 +59,7 @@ void usbh_irq_handler(otg_core_type *otgdev) } if(intsts & USB_OTG_SOF_FLAG) { + usbh_sof_handler(uhost); usb_global_clear_interrupt(usbx, USB_OTG_SOF_FLAG); } if(intsts & USB_OTG_MODEMIS_FLAG) @@ -114,6 +115,16 @@ void usbh_wakeup_handler(usbh_core_type *uhost) uhost->global_state = USBH_WAKEUP; } +/** + * @brief usb host sof handler + * @param uhost: to the structure of usbh_core_type + * @retval none + */ +void usbh_sof_handler(usbh_core_type *uhost) +{ + uhost->timer ++; +} + /** * @brief usb host disconnect handler * @param uhost: to the structure of usbh_core_type @@ -194,7 +205,11 @@ void usbh_hch_in_handler(usbh_core_type *uhost, uint8_t chn) usb_chh->hcchar_bit.oddfrm = TRUE; uhost->urb_state[chn] = URB_DONE; } - uhost->hch[chn].toggle_in ^= 1; + else if(usb_chh->hcchar_bit.eptype == EPT_ISO_TYPE) + { + uhost->urb_state[chn] = URB_DONE; + } + uhost->hch[chn].toggle_in ^= 1; } else if(hcint_value & USB_OTG_HC_CHHLTD_FLAG) { @@ -436,8 +451,6 @@ void usbh_port_handler(usbh_core_type *uhost) { if(prt & USB_OTG_HPRT_PRTCONSTS) { - /* usb unmask disconnect */ - usbx->gintmsk_bit.disconintmsk = 0; /* connect callback */ uhost->conn_sts = 1; } @@ -466,7 +479,6 @@ void usbh_port_handler(usbh_core_type *uhost) /* clean up hprt */ usb_host->hprt &= ~(USB_OTG_HPRT_PRTENA | USB_OTG_HPRT_PRTENCHNG | USB_OTG_HPRT_PRTOVRCACT | USB_OTG_HPRT_PRTCONDET); - usbx->gintmsk_bit.disconintmsk = 1; } } diff --git a/middlewares/usbd_class/audio/audio_class.c b/middlewares/usbd_class/audio/audio_class.c index 2811b9a..6756a60 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 @@ -62,6 +62,8 @@ void audio_set_interface(void *udev, usb_setup_type *setup); usb_audio_type audio_struct = {0, 0, 0, 0, 0, 0x1400, 0, 0, 0, {0x0000, 0x1400, 0x33}, {0x0000, 0x1400, 0x33}}; +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_class_handler = { @@ -114,8 +116,10 @@ usb_sts_type class_clear_handler(void *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); @@ -294,7 +298,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... @@ -303,15 +306,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); - usb_flush_tx_fifo(pudev->usb_reg, USBD_AUDIO_MIC_IN_EPT & 0x7F); - usbd_ept_send(pudev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + usbd_flush_tx_fifo(udev, USBD_AUDIO_MIC_IN_EPT); + 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); - usb_flush_tx_fifo(pudev->usb_reg, USBD_AUDIO_FEEDBACK_EPT & 0x7F); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + audio_feedback_state = 0; } return status; @@ -336,7 +337,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { /* speaker data*/ audio_codec_spk_fifo_write(audio_struct.audio_spk_data, g_rxlen); - + audio_spk_out_stage = 1; /* get next data */ usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); } @@ -352,7 +353,33 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; - + +#if AUDIO_SUPPORT_FEEDBACK + if(audio_spk_out_stage & 2) + { + audio_spk_out_stage = 0; + } + else if( audio_spk_out_stage ) + { + audio_spk_out_stage |= 2; + + if( 0 == audio_feedback_state ) + { + usbd_core_type *pudev = (usbd_core_type *)udev; + int len = audio_codec_spk_feedback(audio_struct.audio_feed_back); + usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + audio_feedback_state = 1; + } + if( audio_feedback_state++ > (1<usb_reg)->dsts_bit.soffn; uint32_t epctl_fb = USB_INEPT(pudev->usb_reg, (USBD_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.dpid; @@ -427,7 +455,7 @@ void audio_inisoincom_event(void *udev) 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); } - +#endif } /** @@ -443,22 +471,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); } } @@ -514,11 +546,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); } } @@ -533,11 +567,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); } } @@ -552,11 +588,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); } } @@ -577,7 +615,6 @@ void audio_set_interface(void *udev, usb_setup_type *setup) if(audio_struct.spk_alt_setting ) { 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); } } diff --git a/middlewares/usbd_class/audio/audio_class.h b/middlewares/usbd_class/audio/audio_class.h index 2b57042..0c2032e 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 a02e17d..3830524 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 @@ -46,7 +46,7 @@ extern "C" { */ #define AUDIO_SUPPORT_SPK 1 #define AUDIO_SUPPORT_MIC 1 -#define AUDIO_SUPPORT_FEEDBACK 0 +#define AUDIO_SUPPORT_FEEDBACK 1 #define AUDIO_SUPPORT_FREQ_16K 1 #define AUDIO_SUPPORT_FREQ_48K 1 diff --git a/middlewares/usbd_class/audio/audio_desc.c b/middlewares/usbd_class/audio/audio_desc.c index 974334c..b16fbcc 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 9ebc587..f328f68 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 index beb4c4b..157e4c0 100644 --- a/middlewares/usbd_class/audio_hid/audio_conf.h +++ b/middlewares/usbd_class/audio_hid/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 @@ -48,7 +48,7 @@ extern "C" { #define AUDIO_SUPPORT_MIC 1 #define AUDIO_SUPPORT_FEEDBACK 1 -#define AUDIO_SUPPORT_FREQ_16K 1 +#define AUDIO_SUPPORT_FREQ_16K 0 #define AUDIO_SUPPORT_FREQ_48K 1 diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.c b/middlewares/usbd_class/audio_hid/audio_hid_class.c index 12830c9..33689ab 100644 --- a/middlewares/usbd_class/audio_hid/audio_hid_class.c +++ b/middlewares/usbd_class/audio_hid/audio_hid_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 @@ -71,7 +71,8 @@ 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 = { @@ -134,8 +135,10 @@ usb_sts_type class_clear_handler(void *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); @@ -441,7 +444,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... @@ -450,19 +452,17 @@ 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); - usb_flush_tx_fifo(pudev->usb_reg, USBD_AUDIO_MIC_IN_EPT & 0x7F); - usbd_ept_send(pudev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + usbd_flush_tx_fifo(udev, USBD_AUDIO_MIC_IN_EPT); + 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); - usb_flush_tx_fifo(pudev->usb_reg, USBD_AUDIO_FEEDBACK_EPT & 0x7F); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + audio_feedback_state = 0; } else if((ept_num & 0x7F) == (USBD_HID_IN_EPT & 0x7F)) { - usb_flush_tx_fifo(pudev->usb_reg, USBD_HID_IN_EPT & 0x7F); + usbd_flush_tx_fifo(udev, USBD_HID_IN_EPT); } return status; @@ -487,7 +487,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { /* speaker data*/ audio_codec_spk_fifo_write(audio_struct.audio_spk_data, g_rxlen); - + audio_spk_out_stage = 1; /* get next data */ usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); } @@ -510,7 +510,33 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; - + +#if AUDIO_SUPPORT_FEEDBACK + if(audio_spk_out_stage & 2) + { + audio_spk_out_stage = 0; + } + else if( audio_spk_out_stage ) + { + audio_spk_out_stage |= 2; + + if( 0 == audio_feedback_state ) + { + usbd_core_type *pudev = (usbd_core_type *)udev; + int len = audio_codec_spk_feedback(audio_struct.audio_feed_back); + usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + audio_feedback_state = 1; + } + if( audio_feedback_state++ > (1<usb_reg)->dsts_bit.soffn; uint32_t epctl_fb = USB_INEPT(pudev->usb_reg, (USBD_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.dpid; @@ -586,7 +612,7 @@ void audio_inisoincom_event(void *udev) 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); } - +#endif } /** @@ -602,22 +628,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); } } @@ -673,11 +703,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); } } @@ -692,11 +724,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); } } @@ -711,11 +745,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); } } @@ -736,7 +772,6 @@ void audio_set_interface(void *udev, usb_setup_type *setup) if(audio_struct.spk_alt_setting ) { 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); } } diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.h b/middlewares/usbd_class/audio_hid/audio_hid_class.h index 17839f9..196ab9b 100644 --- a/middlewares/usbd_class/audio_hid/audio_hid_class.h +++ b/middlewares/usbd_class/audio_hid/audio_hid_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 @@ -70,11 +70,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 */ @@ -89,6 +89,17 @@ extern "C" { #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 */ diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.c b/middlewares/usbd_class/audio_hid/audio_hid_desc.c index 6b9089d..0bea803 100644 --- a/middlewares/usbd_class/audio_hid/audio_hid_desc.c +++ b/middlewares/usbd_class/audio_hid/audio_hid_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_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 */ @@ -90,8 +93,13 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] = USB_MAX_EP0_SIZE, /* bMaxPacketSize */ LBYTE(USBD_VENDOR_ID), /* idVendor */ HBYTE(USBD_VENDOR_ID), /* idVendor */ +#if AUDIO_SUPPORT_FEEDBACK LBYTE(USBD_PRODUCT_ID), /* idProduct */ HBYTE(USBD_PRODUCT_ID), /* idProduct */ +#else + LBYTE(USBD_PRODUCT_ID+1), /* idProduct */ + HBYTE(USBD_PRODUCT_ID+1), /* idProduct */ +#endif 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -103,7 +111,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 */ @@ -149,7 +160,7 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = 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_OUTPUT_TERMINAL_ID, /* bAssocTerminal: no association */ AUDIO_MIC_CHR, /* bNrChannels: two channel */ #if (AUDIO_MIC_CHR == 2) 0x03, /* wChannelConfig: left front and right front */ @@ -177,7 +188,7 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = 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_INPUT_TERMINAL_ID, /* bAssocTerminal: unused */ AUDIO_MIC_FEATURE_UNIT_ID, /* bSourceID: from feature unit terminal */ 0x00, /* iTerminal: unused */ #endif @@ -190,7 +201,7 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = 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_OUTPUT_TERMINAL_ID, /* bAssocTerminal: no association */ AUDIO_SPK_CHR, /* bNrChannels: two channel */ #if (AUDIO_SPK_CHR == 2) 0x03, /* wChannelConfig: left front and right front */ @@ -218,7 +229,7 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] = 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_INPUT_TERMINAL_ID, /* bAssocTerminal: unused */ AUDIO_SPK_FEATURE_UNIT_ID, /* bSourceID: from feature unit terminal */ 0x00, /* iTerminal: unused */ #endif @@ -361,8 +372,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) */ @@ -412,7 +423,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) */ @@ -507,7 +521,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 */ @@ -524,7 +541,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, @@ -535,7 +555,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_hid/audio_hid_desc.h b/middlewares/usbd_class/audio_hid/audio_hid_desc.h index bc3a389..048b49a 100644 --- a/middlewares/usbd_class/audio_hid/audio_hid_desc.h +++ b/middlewares/usbd_class/audio_hid/audio_hid_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 @@ -51,7 +51,7 @@ extern "C" { #define BCD_NUM 0x0100 #define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x5550 +#define USBD_PRODUCT_ID 0x5555 #define USBD_SIZ_STRING_LANGID 4 #define USBD_SIZ_STRING_SERIAL 0x1A diff --git a/middlewares/usbd_class/cdc/cdc_class.c b/middlewares/usbd_class/cdc/cdc_class.c index 5bb685b..743d070 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 fab77d4..2a3d202 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 6cbaf56..2cc3421 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 @@ -78,7 +78,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 */ @@ -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 */ @@ -188,7 +194,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, @@ -199,7 +208,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 b634dac..1789834 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 b74175e..2e97662 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 63011bd..83a9418 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 af566ae..39ecb72 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 a15cfb9..5d84c84 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 e69442e..2a0dbb3 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 4536ff1..cec1d25 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 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 e05ed21..913c69b 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 d3d1e07..78c4f88 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 a175d50..7eded6b 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 6fe2f3a..5a95cd8 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 b52d1ec..ae8bf13 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 iap device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -79,7 +79,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 */ @@ -104,7 +107,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 */ @@ -157,7 +163,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) */ @@ -185,7 +194,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 */ @@ -202,7 +214,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, @@ -213,7 +228,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 e21f094..6511f95 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 iap 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 911ce58..9abc71f 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 @@ -56,8 +56,8 @@ static uint32_t hid_set_idle = 0; static uint32_t alt_setting = 0; static uint8_t hid_state; uint8_t hid_set_report[64]; -uint8_t hid_suspend_flag = 0; -uint8_t g_u8tx_completed = 0; +__IO uint8_t hid_suspend_flag = 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 54660ee..589ae98 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 8756d07..235e615 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 35ffe75..051f5e9 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 a93d599..b17fc28 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 5abf5e3..5af5694 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 6a1f0e7..0da90eb 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 0ab23dc..47e6abf 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 b3ddf82..3fc4f93 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 0a9cc65..9c46ea5 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 20bf471..e224ea8 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); @@ -220,10 +220,6 @@ 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; usb_flush_tx_fifo(pudev->usb_reg, ept_num&0x7F); -// if(msc_struct.msc_state != MSC_STATE_MACHINE_IDLE) -// { -// bot_scsi_datain_handler(udev, ept_num); -// } bot_scsi_datain_handler(udev, ept_num); return status; } @@ -237,8 +233,6 @@ 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 status = USB_OK; -// if(msc_struct.msc_state == MSC_STATE_MACHINE_IDLE) -// msc_struct.msc_state = MSC_STATE_MACHINE_CMD; bot_scsi_dataout_handler(udev, ept_num); return status; } diff --git a/middlewares/usbd_class/msc/msc_class.h b/middlewares/usbd_class/msc/msc_class.h index 91d50e1..13b4541 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 6069c17..f464e7a 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 53afb4c..8a8767e 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 43c4cf4..4d144b8 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 @@ -61,7 +61,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]; /* static variable */ diff --git a/middlewares/usbd_class/printer/printer_class.h b/middlewares/usbd_class/printer/printer_class.h index 930f119..4f0cb07 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 cdc class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_desc.c b/middlewares/usbd_class/printer/printer_desc.c index 69de340..958c335 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 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 5063403..f9c2e5b 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/usbh_class/usbh_hid/usbh_hid_class.c b/middlewares/usbh_class/usbh_hid/usbh_hid_class.c index eaa79cb..96e0735 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_class.c +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host hid class type ************************************************************************** * Copyright notice & Disclaimer @@ -396,7 +396,7 @@ usb_sts_type uhost_process_handler(void *uhost) break; case USB_HID_GET: - usbh_interrupt_recv(puhost, phid->chin, phid->buffer, phid->in_maxpacket); + usbh_interrupt_recv(puhost, phid->chin, (uint8_t *)phid->buffer, phid->in_maxpacket); phid->state = USB_HID_POLL; phid->poll_timer = usbh_get_frame(puhost->usb_reg); break; @@ -414,11 +414,11 @@ usb_sts_type uhost_process_handler(void *uhost) puhost->urb_state[phid->chin] = URB_IDLE; if(phid->protocol == USB_HID_MOUSE_PROTOCOL_CODE) { - usbh_hid_mouse_decode(phid->buffer); + usbh_hid_mouse_decode((uint8_t *)phid->buffer); } else if(phid->protocol == USB_HID_KEYBOARD_PROTOCOL_CODE) { - usbh_hid_keyboard_decode(phid->buffer); + usbh_hid_keyboard_decode((uint8_t *)phid->buffer); } } diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_class.h b/middlewares/usbh_class/usbh_hid/usbh_hid_class.h index 43ba982..5943786 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_class.h +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host hid class header file ************************************************************************** * Copyright notice & Disclaimer @@ -124,7 +124,7 @@ typedef struct usb_hid_ctrl_state_type ctrl_state; usb_hid_state_type state; uint16_t poll_timer; - uint8_t buffer[64]; + uint32_t buffer[16]; }usbh_hid_type; extern usbh_class_handler_type uhost_class_handler; diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c index 837c947..eed5716 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_keyboard.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host hid keyboard type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.h b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.h index 227e2e6..9392dc1 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.h +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_keyboard.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host hid keyboard header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.c b/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.c index f6d4681..77e359e 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.c +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_mouse.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host hid mouse type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.h b/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.h index 1ae2034..0e85706 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.h +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_mouse.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host hid mouse header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.c b/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.c index ca2016c..83e2937 100644 --- a/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.c +++ b/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_bot_scsi.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host msc bulk-only transfer and scsi type ************************************************************************** * Copyright notice & Disclaimer @@ -598,7 +598,7 @@ usb_sts_type msc_bot_scsi_init(usbh_msc_type *msc_struct) msc_struct->max_lun = 0; msc_struct->use_lun = 0; msc_struct->bot_trans.msc_struct = &usbh_msc; - msc_struct->bot_trans.cmd_state = CMD_STATE_WAIT; + msc_struct->bot_trans.cmd_state = CMD_STATE_SEND; msc_struct->bot_trans.bot_state = BOT_STATE_SEND_CBW; return USB_OK; } diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.h b/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.h index cd18466..d6b2db4 100644 --- a/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.h +++ b/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_bot_scsi.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host msc bulk-only transfer and scsi header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_class.c b/middlewares/usbh_class/usbh_msc/usbh_msc_class.c index c9f8384..4d81a02 100644 --- a/middlewares/usbh_class/usbh_msc/usbh_msc_class.c +++ b/middlewares/usbh_class/usbh_msc/usbh_msc_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_class.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host msc class type ************************************************************************** * Copyright notice & Disclaimer @@ -221,11 +221,10 @@ usb_sts_type uhost_process_handler(void *uhost) case USBH_MSC_INIT: if(pmsc->cur_lun < pmsc->max_lun) { - pmsc->l_unit_n[pmsc->cur_lun].ready = MSC_NOT_READY; - switch(pmsc->l_unit_n[pmsc->cur_lun].state) { case USBH_MSC_INIT: + pmsc->l_unit_n[pmsc->cur_lun].ready = MSC_NOT_READY; pmsc->l_unit_n[pmsc->cur_lun].state = USBH_MSC_INQUIRY; break; case USBH_MSC_INQUIRY: @@ -279,6 +278,7 @@ usb_sts_type uhost_process_handler(void *uhost) } else if(status == USB_FAIL) { + pmsc->l_unit_n[pmsc->cur_lun].ready = MSC_NOT_READY; pmsc->cur_lun ++; } break; @@ -373,7 +373,7 @@ msc_error_type usbh_msc_is_ready(void *uhost, uint8_t lun) { usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; - return pmsc->l_unit_n[pmsc->cur_lun].ready; + return pmsc->l_unit_n[lun].ready; } /** @@ -390,6 +390,7 @@ usb_sts_type usbh_msc_read(void *uhost, uint32_t address, uint32_t len, uint8_t usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; usb_sts_type status; + uint32_t timeout = 0; if(puhost->conn_sts == 0 || puhost->global_state != USBH_CLASS || pmsc->l_unit_n[lun].state != USBH_MSC_IDLE) { @@ -399,8 +400,15 @@ usb_sts_type usbh_msc_read(void *uhost, uint32_t address, uint32_t len, uint8_t pmsc->state = USBH_MSC_READ10; pmsc->l_unit_n[lun].state = USBH_MSC_READ10; pmsc->use_lun = lun; + + timeout = puhost->timer; while(1) { + if(puhost->conn_sts == 0 || (puhost->timer - timeout) > (len * 10000)) + { + pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; + return USB_FAIL; + } status = usbh_msc_bot_scsi_read(uhost, &pmsc->bot_trans, address, buffer, len, lun); if(status == USB_OK) { @@ -430,6 +438,7 @@ usb_sts_type usbh_msc_write(void *uhost, uint32_t address, uint32_t len, uint8_t usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; usb_sts_type status; + uint32_t timeout = 0; if(puhost->conn_sts == 0 || puhost->global_state != USBH_CLASS || pmsc->l_unit_n[lun].state != USBH_MSC_IDLE) { @@ -441,8 +450,14 @@ usb_sts_type usbh_msc_write(void *uhost, uint32_t address, uint32_t len, uint8_t pmsc->l_unit_n[lun].state = USBH_MSC_WRITE; pmsc->use_lun = lun; + timeout = puhost->timer; while(1) { + if(puhost->conn_sts == 0 || (puhost->timer - timeout) > (len * 10000)) + { + pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; + return USB_FAIL; + } status = usbh_msc_bot_scsi_write(uhost, &pmsc->bot_trans, address, buffer, len, lun); if(status == USB_OK) { diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_class.h b/middlewares/usbh_class/usbh_msc/usbh_msc_class.h index dd0e968..1f9b57b 100644 --- a/middlewares/usbh_class/usbh_msc/usbh_msc_class.h +++ b/middlewares/usbh_class/usbh_msc/usbh_msc_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_class.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host msc class header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at32f415_board/at32f415_board.c b/project/at32f415_board/at32f415_board.c index 7f9d47f..7c5de18 100644 --- a/project/at32f415_board/at32f415_board.c +++ b/project/at32f415_board/at32f415_board.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_board/at32f415_board.h b/project/at32f415_board/at32f415_board.h index 0c02c15..84b52d6 100644 --- a/project/at32f415_board/at32f415_board.h +++ b/project/at32f415_board/at32f415_board.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 "at32f415.h" /** @addtogroup AT32F415_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_f415/examples/adc/current_vref_value_check/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_int.h b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvoptx b/project/at_start_f415/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvoptx deleted file mode 100644 index c68c72a..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c - at32f415_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c - at32f415_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvprojx b/project/at_start_f415/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvprojx index 36b1c09..768e9f2 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvprojx +++ b/project/at_start_f415/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_f415/examples/adc/current_vref_value_check/readme.txt b/project/at_start_f415/examples/adc/current_vref_value_check/readme.txt index f89e7b6..6d1c309 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/current_vref_value_check/src/at32f415_clock.c b/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/src/at32f415_int.c b/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_int.c index e8c1823..63154e7 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/src/main.c b/project/at_start_f415/examples/adc/current_vref_value_check/src/main.c index 56bca78..7fd0e40 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include - /** @addtogroup AT32F415_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_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_int.h b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvoptx b/project/at_start_f415/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvoptx deleted file mode 100644 index 726cda5..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c - at32f415_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c - at32f415_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvprojx b/project/at_start_f415/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvprojx index 480b9c1..3534e1f 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvprojx +++ b/project/at_start_f415/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_f415/examples/adc/exint_trigger_partitioned/readme.txt b/project/at_start_f415/examples/adc/exint_trigger_partitioned/readme.txt index 7d365dd..2ee3cd3 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/exint_trigger_partitioned/src/at32f415_clock.c b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/exint_trigger_partitioned/src/at32f415_int.c b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_int.c index d941e44..e9499c1 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/exint_trigger_partitioned/src/main.c b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/main.c index 1c6249a..06f7a11 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include /** @addtogroup AT32F415_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_f415/examples/adc/internal_temperature_sensor/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/internal_temperature_sensor/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_int.h b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvoptx b/project/at_start_f415/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvoptx deleted file mode 100644 index 8ada025..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c - at32f415_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c - at32f415_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvprojx b/project/at_start_f415/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvprojx index ee1b961..24fa915 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvprojx +++ b/project/at_start_f415/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_f415/examples/adc/internal_temperature_sensor/readme.txt b/project/at_start_f415/examples/adc/internal_temperature_sensor/readme.txt index e24460e..c40c8cf 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/internal_temperature_sensor/src/at32f415_clock.c b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/internal_temperature_sensor/src/at32f415_int.c b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_int.c index efca128..c6ae36d 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/internal_temperature_sensor/src/main.c b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/main.c index b6bc6df..830169f 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include - /** @addtogroup AT32F415_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_f415/examples/adc/software_trigger_repeat/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/software_trigger_repeat/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_int.h b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvoptx b/project/at_start_f415/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvoptx deleted file mode 100644 index 3afdb9c..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c - at32f415_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c - at32f415_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvprojx b/project/at_start_f415/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvprojx index 9ac349c..44ca545 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvprojx +++ b/project/at_start_f415/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_f415/examples/adc/software_trigger_repeat/readme.txt b/project/at_start_f415/examples/adc/software_trigger_repeat/readme.txt index 5ffa535..b263019 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/software_trigger_repeat/src/at32f415_clock.c b/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/software_trigger_repeat/src/at32f415_int.c b/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_int.c index eae804d..c5d3b82 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/software_trigger_repeat/src/main.c b/project/at_start_f415/examples/adc/software_trigger_repeat/src/main.c index b92cb43..6f2bae0 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include - - /** @addtogroup AT32F415_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_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_int.h b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvoptx b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvoptx deleted file mode 100644 index 215f6c1..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c - at32f415_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c - at32f415_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c - at32f415_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvprojx b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvprojx index ce8f7cf..c1edd25 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvprojx +++ b/project/at_start_f415/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_f415/examples/adc/tmr_trigger_automatic_preempted/readme.txt b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/readme.txt index b3c2a4f..5a6a7fe 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_clock.c b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_int.c b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_int.c index f1fe57d..359bc66 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/tmr_trigger_automatic_preempted/src/main.c b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/main.c index 91ca540..0712c93 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include - - /** @addtogroup AT32F415_periph_examples * @{ @@ -44,91 +41,11 @@ __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 +120,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 +192,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_f415/examples/adc/voltage_monitoring/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/voltage_monitoring/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_int.h b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvoptx b/project/at_start_f415/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvoptx deleted file mode 100644 index 88f5556..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c - at32f415_dma.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c - at32f415_adc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvprojx b/project/at_start_f415/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvprojx index 9d60c10..7fd3475 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvprojx +++ b/project/at_start_f415/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_f415/examples/adc/voltage_monitoring/readme.txt b/project/at_start_f415/examples/adc/voltage_monitoring/readme.txt index 442e545..ba682b7 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/voltage_monitoring/src/at32f415_clock.c b/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/voltage_monitoring/src/at32f415_int.c b/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_int.c index 1e2fc44..6e31430 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/voltage_monitoring/src/main.c b/project/at_start_f415/examples/adc/voltage_monitoring/src/main.c index baa47f1..cc13a83 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include - /** @addtogroup AT32F415_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_f415/examples/can/communication_mode/inc/at32f415_clock.h b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/communication_mode/inc/at32f415_conf.h b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_int.h b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_int.h +++ b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/communication_mode/mdk_v5/communication_mode.uvoptx b/project/at_start_f415/examples/can/communication_mode/mdk_v5/communication_mode.uvoptx deleted file mode 100644 index 1088420..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_can.c - at32f415_can.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/can/communication_mode/mdk_v5/communication_mode.uvprojx b/project/at_start_f415/examples/can/communication_mode/mdk_v5/communication_mode.uvprojx index 87faefe..5f067bc 100644 --- a/project/at_start_f415/examples/can/communication_mode/mdk_v5/communication_mode.uvprojx +++ b/project/at_start_f415/examples/can/communication_mode/mdk_v5/communication_mode.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_can.c 1 diff --git a/project/at_start_f415/examples/can/communication_mode/readme.txt b/project/at_start_f415/examples/can/communication_mode/readme.txt index efede25..b595eb9 100644 --- a/project/at_start_f415/examples/can/communication_mode/readme.txt +++ b/project/at_start_f415/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_f415/examples/can/communication_mode/src/at32f415_clock.c b/project/at_start_f415/examples/can/communication_mode/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/can/communication_mode/src/at32f415_clock.c +++ b/project/at_start_f415/examples/can/communication_mode/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/communication_mode/src/at32f415_int.c b/project/at_start_f415/examples/can/communication_mode/src/at32f415_int.c index 1a4469e..d041ae8 100644 --- a/project/at_start_f415/examples/can/communication_mode/src/at32f415_int.c +++ b/project/at_start_f415/examples/can/communication_mode/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/communication_mode/src/main.c b/project/at_start_f415/examples/can/communication_mode/src/main.c index f31f576..e077e40 100644 --- a/project/at_start_f415/examples/can/communication_mode/src/main.c +++ b/project/at_start_f415/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_f415/examples/can/filter/inc/at32f415_clock.h b/project/at_start_f415/examples/can/filter/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/can/filter/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/can/filter/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/filter/inc/at32f415_conf.h b/project/at_start_f415/examples/can/filter/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/can/filter/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/can/filter/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/can/filter/inc/at32f415_int.h b/project/at_start_f415/examples/can/filter/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/can/filter/inc/at32f415_int.h +++ b/project/at_start_f415/examples/can/filter/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/filter/mdk_v5/filter.uvoptx b/project/at_start_f415/examples/can/filter/mdk_v5/filter.uvoptx deleted file mode 100644 index b6b90fe..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_can.c - at32f415_can.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/can/filter/mdk_v5/filter.uvprojx b/project/at_start_f415/examples/can/filter/mdk_v5/filter.uvprojx index ee5f7fc..f265a56 100644 --- a/project/at_start_f415/examples/can/filter/mdk_v5/filter.uvprojx +++ b/project/at_start_f415/examples/can/filter/mdk_v5/filter.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c
+ + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_can.c 1 diff --git a/project/at_start_f415/examples/can/filter/readme.txt b/project/at_start_f415/examples/can/filter/readme.txt index e4f60ff..5ffdcfc 100644 --- a/project/at_start_f415/examples/can/filter/readme.txt +++ b/project/at_start_f415/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_f415/examples/can/filter/src/at32f415_clock.c b/project/at_start_f415/examples/can/filter/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/can/filter/src/at32f415_clock.c +++ b/project/at_start_f415/examples/can/filter/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/filter/src/at32f415_int.c b/project/at_start_f415/examples/can/filter/src/at32f415_int.c index 25e5f44..df8e459 100644 --- a/project/at_start_f415/examples/can/filter/src/at32f415_int.c +++ b/project/at_start_f415/examples/can/filter/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/filter/src/main.c b/project/at_start_f415/examples/can/filter/src/main.c index 8d15606..a4f35fc 100644 --- a/project/at_start_f415/examples/can/filter/src/main.c +++ b/project/at_start_f415/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_f415/examples/can/loopback_mode/inc/at32f415_clock.h b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/loopback_mode/inc/at32f415_conf.h b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_int.h b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_int.h +++ b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.uvoptx b/project/at_start_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.uvoptx deleted file mode 100644 index 9e1e095..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_can.c - at32f415_can.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.uvprojx b/project/at_start_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.uvprojx index 4e1c115..3672eb8 100644 --- a/project/at_start_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.uvprojx +++ b/project/at_start_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c
+ + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_can.c 1 diff --git a/project/at_start_f415/examples/can/loopback_mode/readme.txt b/project/at_start_f415/examples/can/loopback_mode/readme.txt index e065183..b66f3bb 100644 --- a/project/at_start_f415/examples/can/loopback_mode/readme.txt +++ b/project/at_start_f415/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_f415/examples/can/loopback_mode/src/at32f415_clock.c b/project/at_start_f415/examples/can/loopback_mode/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/can/loopback_mode/src/at32f415_clock.c +++ b/project/at_start_f415/examples/can/loopback_mode/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/loopback_mode/src/at32f415_int.c b/project/at_start_f415/examples/can/loopback_mode/src/at32f415_int.c index 76bfa6b..a4ebd6d 100644 --- a/project/at_start_f415/examples/can/loopback_mode/src/at32f415_int.c +++ b/project/at_start_f415/examples/can/loopback_mode/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/loopback_mode/src/main.c b/project/at_start_f415/examples/can/loopback_mode/src/main.c index fc24c71..0a02795 100644 --- a/project/at_start_f415/examples/can/loopback_mode/src/main.c +++ b/project/at_start_f415/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_f415/examples/cmp/deep_sleep_mode/inc/at32f415_clock.h b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/deep_sleep_mode/inc/at32f415_conf.h b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_int.h b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.uvoptx b/project/at_start_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.uvoptx deleted file mode 100644 index 3f2d4b0..0000000 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.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 - - - - deep_sleep_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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_cmp.c - at32f415_cmp.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c - at32f415_pwc.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.uvprojx b/project/at_start_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.uvprojx index fe15d5d..e8a2551 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.uvprojx +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.uvprojx @@ -327,8 +327,8 @@ 0 0 0 - 1 - 1 + 3 + 3 1 1 0 diff --git a/project/at_start_f415/examples/cmp/deep_sleep_mode/readme.txt b/project/at_start_f415/examples/cmp/deep_sleep_mode/readme.txt index a914af9..5942244 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/readme.txt +++ b/project/at_start_f415/examples/cmp/deep_sleep_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_f415/examples/cmp/deep_sleep_mode/src/at32f415_clock.c b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/deep_sleep_mode/src/at32f415_int.c b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_int.c index 3d24fd1..bb20ddb 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_int.c +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/deep_sleep_mode/src/main.c b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/main.c index c7a5c8c..3d9346a 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/src/main.c +++ b/project/at_start_f415/examples/cmp/deep_sleep_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 @@ -26,7 +26,6 @@ #include "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -124,77 +123,6 @@ void sysclk_config_deep_sleep(void) while(crm_sysclk_switch_status_get() != CRM_SCLK_PLL); } -/** - * @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 @@ -208,7 +136,7 @@ int main(void) at32_board_init(); - uart_init(115200); + uart_print_init(115200); /* cmp1 configuration */ cmp_config(); diff --git a/project/at_start_f415/examples/cmp/output/inc/at32f415_clock.h b/project/at_start_f415/examples/cmp/output/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/cmp/output/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cmp/output/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/output/inc/at32f415_conf.h b/project/at_start_f415/examples/cmp/output/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/cmp/output/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cmp/output/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cmp/output/inc/at32f415_int.h b/project/at_start_f415/examples/cmp/output/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/cmp/output/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cmp/output/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/output/mdk_v5/output.uvoptx b/project/at_start_f415/examples/cmp/output/mdk_v5/output.uvoptx deleted file mode 100644 index 29b3114..0000000 --- a/project/at_start_f415/examples/cmp/output/mdk_v5/output.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 - - - - 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_cmp.c - at32f415_cmp.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c - at32f415_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 12 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/cmp/output/readme.txt b/project/at_start_f415/examples/cmp/output/readme.txt index 9c0e2d4..42dd43e 100644 --- a/project/at_start_f415/examples/cmp/output/readme.txt +++ b/project/at_start_f415/examples/cmp/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_f415/examples/cmp/output/src/at32f415_clock.c b/project/at_start_f415/examples/cmp/output/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/cmp/output/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cmp/output/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/output/src/at32f415_int.c b/project/at_start_f415/examples/cmp/output/src/at32f415_int.c index 35409ee..1641735 100644 --- a/project/at_start_f415/examples/cmp/output/src/at32f415_int.c +++ b/project/at_start_f415/examples/cmp/output/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/output/src/main.c b/project/at_start_f415/examples/cmp/output/src/main.c index 9226b1c..fe68ec4 100644 --- a/project/at_start_f415/examples/cmp/output/src/main.c +++ b/project/at_start_f415/examples/cmp/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 @@ -26,7 +26,6 @@ #include "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -126,77 +125,6 @@ void tmr1_init(void) TMR1->ists &= 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 main function. * @param none @@ -208,7 +136,7 @@ int main(void) at32_board_init(); - uart_init(115200); + uart_print_init(115200); /* cmp1 configuration */ cmp_config(); diff --git a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_clock.h b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/bit_band/inc/at32f415_conf.h b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_int.h b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvoptx b/project/at_start_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvoptx deleted file mode 100644 index 93c02aa..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvprojx b/project/at_start_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvprojx index 9a9ef43..d4b9800 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvprojx +++ b/project/at_start_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c
+ + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_misc.c 1 diff --git a/project/at_start_f415/examples/cortex_m4/bit_band/readme.txt b/project/at_start_f415/examples/cortex_m4/bit_band/readme.txt index a074280..c45bbae 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/readme.txt +++ b/project/at_start_f415/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_f415/examples/cortex_m4/bit_band/src/at32f415_clock.c b/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/bit_band/src/at32f415_int.c b/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_int.c index da0aa1b..9955f9d 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_int.c +++ b/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/bit_band/src/main.c b/project/at_start_f415/examples/cortex_m4/bit_band/src/main.c index 3264bd8..0104ed3 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/src/main.c +++ b/project/at_start_f415/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_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvoptx b/project/at_start_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvoptx deleted file mode 100644 index 4d9e837..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvprojx b/project/at_start_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvprojx index 356d98c..a2f89bc 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvprojx +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c
+ + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/cortex_m4/systick_interrupt/readme.txt b/project/at_start_f415/examples/cortex_m4/systick_interrupt/readme.txt index 1b20656..6feaa10 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/cortex_m4/systick_interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/systick_interrupt/src/at32f415_int.c b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_int.c index dbdffd5..74baf1a 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/systick_interrupt/src/main.c b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/main.c index a8f5181..59c5505 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/crc/calculation/inc/at32f415_clock.h b/project/at_start_f415/examples/crc/calculation/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/crc/calculation/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/crc/calculation/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crc/calculation/inc/at32f415_conf.h b/project/at_start_f415/examples/crc/calculation/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/crc/calculation/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/crc/calculation/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crc/calculation/inc/at32f415_int.h b/project/at_start_f415/examples/crc/calculation/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/crc/calculation/inc/at32f415_int.h +++ b/project/at_start_f415/examples/crc/calculation/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crc/calculation/mdk_v5/calculation.uvoptx b/project/at_start_f415/examples/crc/calculation/mdk_v5/calculation.uvoptx deleted file mode 100644 index 4687203..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crc.c - at32f415_crc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/crc/calculation/mdk_v5/calculation.uvprojx b/project/at_start_f415/examples/crc/calculation/mdk_v5/calculation.uvprojx index 6ff718d..78d7185 100644 --- a/project/at_start_f415/examples/crc/calculation/mdk_v5/calculation.uvprojx +++ b/project/at_start_f415/examples/crc/calculation/mdk_v5/calculation.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_crc.c 1 diff --git a/project/at_start_f415/examples/crc/calculation/readme.txt b/project/at_start_f415/examples/crc/calculation/readme.txt index 7f9b23c..8b9e029 100644 --- a/project/at_start_f415/examples/crc/calculation/readme.txt +++ b/project/at_start_f415/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_f415/examples/crc/calculation/src/at32f415_clock.c b/project/at_start_f415/examples/crc/calculation/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/crc/calculation/src/at32f415_clock.c +++ b/project/at_start_f415/examples/crc/calculation/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crc/calculation/src/at32f415_int.c b/project/at_start_f415/examples/crc/calculation/src/at32f415_int.c index c0ebda3..7eefc70 100644 --- a/project/at_start_f415/examples/crc/calculation/src/at32f415_int.c +++ b/project/at_start_f415/examples/crc/calculation/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crc/calculation/src/main.c b/project/at_start_f415/examples/crc/calculation/src/main.c index eb4e2a6..7cfaaa3 100644 --- a/project/at_start_f415/examples/crc/calculation/src/main.c +++ b/project/at_start_f415/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_f415/examples/crm/clock_failure_detection/inc/at32f415_clock.h b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/clock_failure_detection/inc/at32f415_conf.h b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_int.h b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_int.h +++ b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvoptx b/project/at_start_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvoptx deleted file mode 100644 index c1448f2..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvprojx b/project/at_start_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvprojx index 36a9588..690fff2 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvprojx +++ b/project/at_start_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c
+ + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c +
diff --git a/project/at_start_f415/examples/crm/clock_failure_detection/readme.txt b/project/at_start_f415/examples/crm/clock_failure_detection/readme.txt index c78f53c..eea42a5 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/readme.txt +++ b/project/at_start_f415/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_f415/examples/crm/clock_failure_detection/src/at32f415_clock.c b/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_clock.c +++ b/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/clock_failure_detection/src/at32f415_int.c b/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_int.c index 392fb06..1e81933 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_int.c +++ b/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/clock_failure_detection/src/main.c b/project/at_start_f415/examples/crm/clock_failure_detection/src/main.c index 63967d8..ab5c734 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/src/main.c +++ b/project/at_start_f415/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_f415/examples/crm/pll_config2/inc/at32f415_clock.h b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/pll_config2/inc/at32f415_conf.h b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_int.h b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_int.h +++ b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/pll_config2/mdk_v5/pll_config2.uvoptx b/project/at_start_f415/examples/crm/pll_config2/mdk_v5/pll_config2.uvoptx deleted file mode 100644 index 20a003c..0000000 --- a/project/at_start_f415/examples/crm/pll_config2/mdk_v5/pll_config2.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 - - - - pll_config2 - 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/crm/pll_config2/mdk_v5/pll_config2.uvprojx b/project/at_start_f415/examples/crm/pll_config2/mdk_v5/pll_config2.uvprojx index 02255dc..ab0a54f 100644 --- a/project/at_start_f415/examples/crm/pll_config2/mdk_v5/pll_config2.uvprojx +++ b/project/at_start_f415/examples/crm/pll_config2/mdk_v5/pll_config2.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c +
diff --git a/project/at_start_f415/examples/crm/pll_config2/readme.txt b/project/at_start_f415/examples/crm/pll_config2/readme.txt index 2aaffbb..f66b3fe 100644 --- a/project/at_start_f415/examples/crm/pll_config2/readme.txt +++ b/project/at_start_f415/examples/crm/pll_config2/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_f415/examples/crm/pll_config2/src/at32f415_clock.c b/project/at_start_f415/examples/crm/pll_config2/src/at32f415_clock.c index d6663ed..1cb9a7b 100644 --- a/project/at_start_f415/examples/crm/pll_config2/src/at32f415_clock.c +++ b/project/at_start_f415/examples/crm/pll_config2/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/pll_config2/src/at32f415_int.c b/project/at_start_f415/examples/crm/pll_config2/src/at32f415_int.c index a024888..c50b36a 100644 --- a/project/at_start_f415/examples/crm/pll_config2/src/at32f415_int.c +++ b/project/at_start_f415/examples/crm/pll_config2/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/pll_config2/src/main.c b/project/at_start_f415/examples/crm/pll_config2/src/main.c index f78e19c..0ff850e 100644 --- a/project/at_start_f415/examples/crm/pll_config2/src/main.c +++ b/project/at_start_f415/examples/crm/pll_config2/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_f415/examples/crm/sysclk_switch/inc/at32f415_clock.h b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/sysclk_switch/inc/at32f415_conf.h b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_int.h b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_int.h +++ b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvoptx b/project/at_start_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvoptx deleted file mode 100644 index a216ef1..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 9 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvprojx b/project/at_start_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvprojx index 37df314..fc1edea 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvprojx +++ b/project/at_start_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c +
diff --git a/project/at_start_f415/examples/crm/sysclk_switch/readme.txt b/project/at_start_f415/examples/crm/sysclk_switch/readme.txt index d786b36..cb845af 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/readme.txt +++ b/project/at_start_f415/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_f415/examples/crm/sysclk_switch/src/at32f415_clock.c b/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_clock.c +++ b/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/sysclk_switch/src/at32f415_int.c b/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_int.c index a024888..c50b36a 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_int.c +++ b/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/sysclk_switch/src/main.c b/project/at_start_f415/examples/crm/sysclk_switch/src/main.c index 7177546..837f25d 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/src/main.c +++ b/project/at_start_f415/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_f415/examples/debug/tmr1/inc/at32f415_clock.h b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/debug/tmr1/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/debug/tmr1/inc/at32f415_conf.h b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/debug/tmr1/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/debug/tmr1/inc/at32f415_int.h b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/debug/tmr1/inc/at32f415_int.h +++ b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/debug/tmr1/mdk_v5/tmr1.uvoptx b/project/at_start_f415/examples/debug/tmr1/mdk_v5/tmr1.uvoptx deleted file mode 100644 index 44f6f5f..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c - at32f415_tmr.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_debug.c - at32f415_debug.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/debug/tmr1/mdk_v5/tmr1.uvprojx b/project/at_start_f415/examples/debug/tmr1/mdk_v5/tmr1.uvprojx index 57c374f..9d233fe 100644 --- a/project/at_start_f415/examples/debug/tmr1/mdk_v5/tmr1.uvprojx +++ b/project/at_start_f415/examples/debug/tmr1/mdk_v5/tmr1.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/debug/tmr1/readme.txt b/project/at_start_f415/examples/debug/tmr1/readme.txt index 33d4ad3..56ae9eb 100644 --- a/project/at_start_f415/examples/debug/tmr1/readme.txt +++ b/project/at_start_f415/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_f415/examples/debug/tmr1/src/at32f415_clock.c b/project/at_start_f415/examples/debug/tmr1/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/debug/tmr1/src/at32f415_clock.c +++ b/project/at_start_f415/examples/debug/tmr1/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/debug/tmr1/src/at32f415_int.c b/project/at_start_f415/examples/debug/tmr1/src/at32f415_int.c index d65736e..87e3b53 100644 --- a/project/at_start_f415/examples/debug/tmr1/src/at32f415_int.c +++ b/project/at_start_f415/examples/debug/tmr1/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/debug/tmr1/src/main.c b/project/at_start_f415/examples/debug/tmr1/src/main.c index eb826d8..c78f648 100644 --- a/project/at_start_f415/examples/debug/tmr1/src/main.c +++ b/project/at_start_f415/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_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_clock.h b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_conf.h b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_int.h b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_int.h +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvoptx b/project/at_start_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvoptx deleted file mode 100644 index 3e1f4f6..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c - at32f415_tmr.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c - at32f415_dma.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvprojx b/project/at_start_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvprojx index d6e5f37..d6aaeed 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvprojx +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c
+ + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/dma/data_to_gpio_flexible/readme.txt b/project/at_start_f415/examples/dma/data_to_gpio_flexible/readme.txt index 6df06b0..4b7a984 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/readme.txt +++ b/project/at_start_f415/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_f415/examples/dma/data_to_gpio_flexible/src/at32f415_clock.c b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_clock.c +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/data_to_gpio_flexible/src/at32f415_int.c b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_int.c index 1c2aa65..e174acb 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_int.c +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/data_to_gpio_flexible/src/main.c b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/main.c index baa9e54..1618af4 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/main.c +++ b/project/at_start_f415/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_f415/examples/dma/flash_to_sram/inc/at32f415_clock.h b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/flash_to_sram/inc/at32f415_conf.h b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_int.h b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_int.h +++ b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvoptx b/project/at_start_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvoptx deleted file mode 100644 index 3fd2d03..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_flash.c - at32f415_flash.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c - at32f415_dma.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvprojx b/project/at_start_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvprojx index 0c57e1d..363a538 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvprojx +++ b/project/at_start_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c
+ + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_dma.c 1 diff --git a/project/at_start_f415/examples/dma/flash_to_sram/readme.txt b/project/at_start_f415/examples/dma/flash_to_sram/readme.txt index 0add0f6..d382607 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/readme.txt +++ b/project/at_start_f415/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_f415/examples/dma/flash_to_sram/src/at32f415_clock.c b/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_clock.c +++ b/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/flash_to_sram/src/at32f415_int.c b/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_int.c index 4c4d42e..39e5e82 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_int.c +++ b/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/flash_to_sram/src/main.c b/project/at_start_f415/examples/dma/flash_to_sram/src/main.c index be3e118..04f9716 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/src/main.c +++ b/project/at_start_f415/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_f415/examples/ertc/bpr_domain/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/bpr_domain/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/bpr_domain/mdk_v5/bpr_domain.uvoptx b/project/at_start_f415/examples/ertc/bpr_domain/mdk_v5/bpr_domain.uvoptx deleted file mode 100644 index 5f8b50e..0000000 --- a/project/at_start_f415/examples/ertc/bpr_domain/mdk_v5/bpr_domain.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 - - - - bpr_domain - 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c - at32f415_ertc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c - at32f415_pwc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/ertc/bpr_domain/readme.txt b/project/at_start_f415/examples/ertc/bpr_domain/readme.txt index ec8fa0d..3c40f2b 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/readme.txt +++ b/project/at_start_f415/examples/ertc/bpr_domain/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_f415/examples/ertc/bpr_domain/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/bpr_domain/src/at32f415_int.c b/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_int.c index 33e0b0f..aa2ad15 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/bpr_domain/src/main.c b/project/at_start_f415/examples/ertc/bpr_domain/src/main.c index 773b5aa..756c14a 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/src/main.c +++ b/project/at_start_f415/examples/ertc/bpr_domain/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 "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -49,7 +48,6 @@ ertc_dt_type bpr_addr_tab[ERTC_BPR_DT_NUMBER] = void ertc_config(void); void bpr_reg_write(void); uint32_t bpr_reg_check(void); -void uart_init(uint32_t bound); /** * @brief main function. @@ -68,7 +66,7 @@ int main(void) nvic_priority_group_config(NVIC_PRIORITY_GROUP_4); /* initialize uart */ - uart_init(115200); + uart_print_init(115200); printf("\r\nertc bpr domain example\r\n\r\n"); @@ -201,82 +199,6 @@ uint32_t bpr_reg_check(void) return TRUE; } -/** - * @brief initialize print usart - * @param bound: uart baudrate - * @retval none - */ -void uart_init(uint32_t bound) -{ - 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, bound, 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; -} - /** * @} */ diff --git a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/calendar/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/calendar/mdk_v5/calendar.uvoptx b/project/at_start_f415/examples/ertc/calendar/mdk_v5/calendar.uvoptx deleted file mode 100644 index dfaf6f0..0000000 --- a/project/at_start_f415/examples/ertc/calendar/mdk_v5/calendar.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 - - - - 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c - at32f415_ertc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c - at32f415_pwc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/ertc/calendar/readme.txt b/project/at_start_f415/examples/ertc/calendar/readme.txt index 4d23e7e..18cd9cd 100644 --- a/project/at_start_f415/examples/ertc/calendar/readme.txt +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/calendar/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/calendar/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/ertc/calendar/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/calendar/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/calendar/src/at32f415_int.c b/project/at_start_f415/examples/ertc/calendar/src/at32f415_int.c index 35571d8..203ba4d 100644 --- a/project/at_start_f415/examples/ertc/calendar/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/calendar/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/calendar/src/main.c b/project/at_start_f415/examples/ertc/calendar/src/main.c index 17cc512..76e14a6 100644 --- a/project/at_start_f415/examples/ertc/calendar/src/main.c +++ b/project/at_start_f415/examples/ertc/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 "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -46,7 +45,6 @@ __IO uint16_t ertc_clk_div_b = 0; void ertc_config(void); void ertc_alarm_show(void); void ertc_time_show(void); -void uart_init(uint32_t bound); /** * @brief main program @@ -69,7 +67,7 @@ int main(void) at32_board_init(); /* initialize uart */ - uart_init(115200); + uart_print_init(115200); /* enable the pwc clock interface */ crm_periph_clock_enable(CRM_PWC_PERIPH_CLOCK, TRUE); @@ -260,82 +258,6 @@ void ertc_alarm_show(void) printf("Alarm: %02d:%02d:%02d\r\n",alarm.hour, alarm.min, alarm.sec); } -/** - * @brief initialize print usart - * @param bound: uart baudrate - * @retval none - */ -void uart_init(uint32_t bound) -{ - 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, bound, 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; -} - /** * @} */ diff --git a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/lick_calibration/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/lick_calibration/mdk_v5/lick_calibration.uvoptx b/project/at_start_f415/examples/ertc/lick_calibration/mdk_v5/lick_calibration.uvoptx deleted file mode 100644 index 8c8e7ed..0000000 --- a/project/at_start_f415/examples/ertc/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c - at32f415_ertc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c - at32f415_pwc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - 3 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c - at32f415_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 13 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 14 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/ertc/lick_calibration/readme.txt b/project/at_start_f415/examples/ertc/lick_calibration/readme.txt index 4218fa0..ec17e0b 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/readme.txt +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/lick_calibration/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/lick_calibration/src/at32f415_int.c b/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_int.c index 1a02162..4274a51 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/lick_calibration/src/main.c b/project/at_start_f415/examples/ertc/lick_calibration/src/main.c index d3a34e6..0f88308 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/src/main.c +++ b/project/at_start_f415/examples/ertc/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 "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -41,7 +40,6 @@ __IO uint32_t capture_number = 0; __IO uint32_t period_value = 0; void ertc_config(void); -void uart_init(uint32_t bound); uint32_t lick_frequency_get(void); /** @@ -64,7 +62,7 @@ int main(void) at32_board_init(); /* initialize uart */ - uart_init(115200); + uart_print_init(115200); /* ertc configuration */ ertc_config(); @@ -212,82 +210,6 @@ uint32_t lick_frequency_get(void) } } -/** - * @brief initialize print usart - * @param bound: uart baudrate - * @retval none - */ -void uart_init(uint32_t bound) -{ - 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, bound, 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; -} - /** * @} */ diff --git a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/tamper/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/tamper/mdk_v5/tamper.uvoptx b/project/at_start_f415/examples/ertc/tamper/mdk_v5/tamper.uvoptx deleted file mode 100644 index eb70759..0000000 --- a/project/at_start_f415/examples/ertc/tamper/mdk_v5/tamper.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 - - - - 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c - at32f415_ertc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c - at32f415_pwc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/ertc/tamper/readme.txt b/project/at_start_f415/examples/ertc/tamper/readme.txt index 830a251..d0ba342 100644 --- a/project/at_start_f415/examples/ertc/tamper/readme.txt +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/tamper/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/tamper/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/ertc/tamper/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/tamper/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/tamper/src/at32f415_int.c b/project/at_start_f415/examples/ertc/tamper/src/at32f415_int.c index 4f9e166..1d3c15f 100644 --- a/project/at_start_f415/examples/ertc/tamper/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/tamper/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/tamper/src/main.c b/project/at_start_f415/examples/ertc/tamper/src/main.c index cb6bf11..cc8e8a4 100644 --- a/project/at_start_f415/examples/ertc/tamper/src/main.c +++ b/project/at_start_f415/examples/ertc/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 @@ -26,7 +26,6 @@ #include "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -51,7 +50,6 @@ void bpr_reg_write(void); uint32_t bpr_reg_check(void); uint32_t is_bpr_reg_reset(void); void ertc_tamper_config(void); -void uart_init(uint32_t bound); /** * @brief main program @@ -70,7 +68,7 @@ int main(void) at32_board_init(); /* initialize uart */ - uart_init(115200); + uart_print_init(115200); /* ertc configuration */ ertc_config(); @@ -246,82 +244,6 @@ uint32_t is_bpr_reg_reset(void) return 0; } -/** - * @brief initialize print usart - * @param bound: uart baudrate - * @retval none - */ -void uart_init(uint32_t bound) -{ - 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, bound, 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; -} - /** * @} */ diff --git a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/time_stamp/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/time_stamp/mdk_v5/time_stamp.uvoptx b/project/at_start_f415/examples/ertc/time_stamp/mdk_v5/time_stamp.uvoptx deleted file mode 100644 index 2faab37..0000000 --- a/project/at_start_f415/examples/ertc/time_stamp/mdk_v5/time_stamp.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 - - - - time_stamp - 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c - at32f415_ertc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c - at32f415_pwc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/ertc/time_stamp/readme.txt b/project/at_start_f415/examples/ertc/time_stamp/readme.txt index 78cab4d..3b064bb 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/readme.txt +++ b/project/at_start_f415/examples/ertc/time_stamp/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_f415/examples/ertc/time_stamp/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/time_stamp/src/at32f415_int.c b/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_int.c index a9b3b76..ca2d1ac 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/time_stamp/src/main.c b/project/at_start_f415/examples/ertc/time_stamp/src/main.c index 2e5f23c..611b4f8 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/src/main.c +++ b/project/at_start_f415/examples/ertc/time_stamp/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 "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -40,7 +39,6 @@ void ertc_time_show(void); void ertc_timestamp_show(void); void ertc_config(void); void ertc_timestamp_config(void); -void uart_init(uint32_t bound); /** * @brief main program @@ -59,7 +57,7 @@ int main(void) at32_board_init(); /* initialize uart */ - uart_init(115200); + uart_print_init(115200); /* ertc configuration */ ertc_config(); @@ -199,82 +197,6 @@ void ertc_timestamp_show(void) printf("%02d:%02d:%02d\r\n", time.hour, time.min, time.sec); } -/** - * @brief initialize print usart - * @param bound: uart baudrate - * @retval none - */ -void uart_init(uint32_t bound) -{ - 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, bound, 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; -} - /** * @} */ diff --git a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/wakeup_timer/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/wakeup_timer/mdk_v5/wakeup_timer.uvoptx b/project/at_start_f415/examples/ertc/wakeup_timer/mdk_v5/wakeup_timer.uvoptx deleted file mode 100644 index 02a78db..0000000 --- a/project/at_start_f415/examples/ertc/wakeup_timer/mdk_v5/wakeup_timer.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 - - - - wakeup_timer - 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c - at32f415_ertc.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c - at32f415_pwc.c - 0 - 0 - - - 3 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c - at32f415_usart.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 13 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/ertc/wakeup_timer/readme.txt b/project/at_start_f415/examples/ertc/wakeup_timer/readme.txt index 1b4bc65..e20ddb6 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/readme.txt +++ b/project/at_start_f415/examples/ertc/wakeup_timer/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_f415/examples/ertc/wakeup_timer/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/wakeup_timer/src/at32f415_int.c b/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_int.c index 9d30d06..927a2f1 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/wakeup_timer/src/main.c b/project/at_start_f415/examples/ertc/wakeup_timer/src/main.c index 2478d42..0b301ac 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/src/main.c +++ b/project/at_start_f415/examples/ertc/wakeup_timer/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 "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -37,7 +36,6 @@ */ void ertc_config(void); -void uart_init(uint32_t bound); void wakeup_timer_config(void); /** @@ -60,7 +58,7 @@ int main(void) at32_board_init(); /* initialize uart */ - uart_init(115200); + uart_print_init(115200); /* ertc configuration */ ertc_config(); @@ -172,82 +170,6 @@ void wakeup_timer_config(void) nvic_irq_enable(ERTC_WKUP_IRQn, 0, 1); } -/** - * @brief initialize print usart - * @param bound: uart baudrate - * @retval none - */ -void uart_init(uint32_t bound) -{ - 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, bound, 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; -} - /** * @} */ diff --git a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_clock.h b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_config/inc/at32f415_conf.h b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_int.h b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_int.h +++ b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_config/mdk_v5/exint_config.uvoptx b/project/at_start_f415/examples/exint/exint_config/mdk_v5/exint_config.uvoptx deleted file mode 100644 index 96ea193..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 10 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/exint/exint_config/mdk_v5/exint_config.uvprojx b/project/at_start_f415/examples/exint/exint_config/mdk_v5/exint_config.uvprojx index 0c465ee..c9bf746 100644 --- a/project/at_start_f415/examples/exint/exint_config/mdk_v5/exint_config.uvprojx +++ b/project/at_start_f415/examples/exint/exint_config/mdk_v5/exint_config.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c
+ + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c +
diff --git a/project/at_start_f415/examples/exint/exint_config/readme.txt b/project/at_start_f415/examples/exint/exint_config/readme.txt index 83f42c5..d361b1a 100644 --- a/project/at_start_f415/examples/exint/exint_config/readme.txt +++ b/project/at_start_f415/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_f415/examples/exint/exint_config/src/at32f415_clock.c b/project/at_start_f415/examples/exint/exint_config/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/exint/exint_config/src/at32f415_clock.c +++ b/project/at_start_f415/examples/exint/exint_config/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_config/src/at32f415_int.c b/project/at_start_f415/examples/exint/exint_config/src/at32f415_int.c index 1c45707..f85a7ad 100644 --- a/project/at_start_f415/examples/exint/exint_config/src/at32f415_int.c +++ b/project/at_start_f415/examples/exint/exint_config/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_config/src/main.c b/project/at_start_f415/examples/exint/exint_config/src/main.c index 3298644..32dc231 100644 --- a/project/at_start_f415/examples/exint/exint_config/src/main.c +++ b/project/at_start_f415/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_f415/examples/exint/exint_software_trigger/inc/at32f415_clock.h b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_software_trigger/inc/at32f415_conf.h b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_int.h b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_int.h +++ b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx b/project/at_start_f415/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx deleted file mode 100644 index 5033188..0000000 --- a/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c - at32f415_clock.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\src\at32f415_int.c - at32f415_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 - ..\..\..\..\..\at32f415_board\at32f415_board.c - at32f415_board.c - 0 - 0 - - - - - firmware - 0 - 0 - 0 - 0 - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c - at32f415_exint.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c - at32f415_gpio.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c - at32f415_misc.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c - at32f415_crm.c - 0 - 0 - - - 3 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c - at32f415_tmr.c - 0 - 0 - - - - - cmsis - 0 - 0 - 0 - 0 - - 4 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c - system_at32f415.c - 0 - 0 - - - 4 - 11 - 2 - 0 - 0 - 0 - ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s - startup_at32f415.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_f415/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvprojx b/project/at_start_f415/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvprojx index 96ed10a..9019998 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvprojx +++ b/project/at_start_f415/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/exint/exint_software_trigger/readme.txt b/project/at_start_f415/examples/exint/exint_software_trigger/readme.txt index 22fd94c..b43ade1 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/readme.txt +++ b/project/at_start_f415/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_f415/examples/exint/exint_software_trigger/src/at32f415_clock.c b/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_clock.c +++ b/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_software_trigger/src/at32f415_int.c b/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_int.c index 0244e7d..7614165 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_int.c +++ b/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_software_trigger/src/main.c b/project/at_start_f415/examples/exint/exint_software_trigger/src/main.c index 7f82a89..3c8cae5 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/src/main.c +++ b/project/at_start_f415/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_f415/examples/flash/flash_write_read/inc/at32f415_clock.h b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/flash/flash_write_read/inc/at32f415_conf.h b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_int.h b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_int.h +++ b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/flash/flash_write_read/inc/flash.h b/project/at_start_f415/examples/flash/flash_write_read/inc/flash.h index 50a2921..fe927ab 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/inc/flash.h +++ b/project/at_start_f415/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_f415/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx b/project/at_start_f415/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx index 6570fd7..6f97921 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx +++ b/project/at_start_f415/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_flash.c at32f415_flash.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 0 4 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 4 - 11 + 12 2 0 0 @@ -341,7 +353,7 @@ 0 5 - 12 + 13 5 0 0 diff --git a/project/at_start_f415/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvprojx b/project/at_start_f415/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvprojx index 47e6804..310ecc2 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvprojx +++ b/project/at_start_f415/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_flash.c 1 diff --git a/project/at_start_f415/examples/flash/flash_write_read/readme.txt b/project/at_start_f415/examples/flash/flash_write_read/readme.txt index 8b60c27..ea2c8db 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/readme.txt +++ b/project/at_start_f415/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_f415/examples/flash/flash_write_read/src/at32f415_clock.c b/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_clock.c +++ b/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/flash/flash_write_read/src/at32f415_int.c b/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_int.c index b224104..0cb7ae9 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_int.c +++ b/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/flash/flash_write_read/src/flash.c b/project/at_start_f415/examples/flash/flash_write_read/src/flash.c index 4d7b755..1922af5 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/src/flash.c +++ b/project/at_start_f415/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_f415/examples/flash/flash_write_read/src/main.c b/project/at_start_f415/examples/flash/flash_write_read/src/main.c index a1a1b14..59c28c0 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/src/main.c +++ b/project/at_start_f415/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_f415/examples/gpio/led_toggle/inc/at32f415_clock.h b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/led_toggle/inc/at32f415_conf.h b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_int.h b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_int.h +++ b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx b/project/at_start_f415/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx index f488531..1b4db6a 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx +++ b/project/at_start_f415/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx @@ -258,6 +258,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c at32f415_gpio.c 0 @@ -265,7 +277,7 @@ 3 - 7 + 8 1 0 0 @@ -285,7 +297,7 @@ 0 4 - 8 + 9 1 0 0 @@ -297,7 +309,7 @@ 4 - 9 + 10 2 0 0 @@ -317,7 +329,7 @@ 0 5 - 10 + 11 5 0 0 diff --git a/project/at_start_f415/examples/gpio/led_toggle/mdk_v5/led_toggle.uvprojx b/project/at_start_f415/examples/gpio/led_toggle/mdk_v5/led_toggle.uvprojx index 4ec96df..d356b5b 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/mdk_v5/led_toggle.uvprojx +++ b/project/at_start_f415/examples/gpio/led_toggle/mdk_v5/led_toggle.uvprojx @@ -417,6 +417,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_gpio.c 1 diff --git a/project/at_start_f415/examples/gpio/led_toggle/readme.txt b/project/at_start_f415/examples/gpio/led_toggle/readme.txt index 6b63193..9dc3168 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/readme.txt +++ b/project/at_start_f415/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_f415/examples/gpio/led_toggle/src/at32f415_clock.c b/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_clock.c +++ b/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/led_toggle/src/at32f415_int.c b/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_int.c index 5a88770..2fe8ae4 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_int.c +++ b/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/led_toggle/src/main.c b/project/at_start_f415/examples/gpio/led_toggle/src/main.c index 9a5115f..7d085b7 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/src/main.c +++ b/project/at_start_f415/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_f415/examples/gpio/swjtag_remap/inc/at32f415_clock.h b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/swjtag_remap/inc/at32f415_conf.h b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_int.h b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_int.h +++ b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx b/project/at_start_f415/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx index 922339d..ada99a6 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx +++ b/project/at_start_f415/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx @@ -258,6 +258,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c at32f415_gpio.c 0 @@ -265,7 +277,7 @@ 3 - 7 + 8 1 0 0 @@ -285,7 +297,7 @@ 0 4 - 8 + 9 1 0 0 @@ -297,7 +309,7 @@ 4 - 9 + 10 2 0 0 @@ -317,7 +329,7 @@ 0 5 - 10 + 11 5 0 0 diff --git a/project/at_start_f415/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvprojx b/project/at_start_f415/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvprojx index a5d031c..f7ba43a 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvprojx +++ b/project/at_start_f415/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvprojx @@ -417,6 +417,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_gpio.c 1 diff --git a/project/at_start_f415/examples/gpio/swjtag_remap/readme.txt b/project/at_start_f415/examples/gpio/swjtag_remap/readme.txt index bfde011..f398d72 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/readme.txt +++ b/project/at_start_f415/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_f415/examples/gpio/swjtag_remap/src/at32f415_clock.c b/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_clock.c +++ b/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/swjtag_remap/src/at32f415_int.c b/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_int.c index 9cfc631..d799f84 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_int.c +++ b/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/swjtag_remap/src/main.c b/project/at_start_f415/examples/gpio/swjtag_remap/src/main.c index fddfe2a..ed53c25 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2c/communication_dma/inc/at32f415_clock.h b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_dma/inc/at32f415_conf.h b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_int.h b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx b/project/at_start_f415/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx index b1384c1..9a15e4f 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx +++ b/project/at_start_f415/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx @@ -311,6 +311,18 @@ 0 0 + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 +
@@ -321,7 +333,7 @@ 0 4 - 11 + 12 1 0 0 @@ -333,7 +345,7 @@ 4 - 12 + 13 2 0 0 @@ -353,7 +365,7 @@ 0 5 - 13 + 14 5 0 0 diff --git a/project/at_start_f415/examples/i2c/communication_dma/mdk_v5/communication_dma.uvprojx b/project/at_start_f415/examples/i2c/communication_dma/mdk_v5/communication_dma.uvprojx index e80322b..b86cbf7 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/mdk_v5/communication_dma.uvprojx +++ b/project/at_start_f415/examples/i2c/communication_dma/mdk_v5/communication_dma.uvprojx @@ -442,6 +442,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/i2c/communication_dma/readme.txt b/project/at_start_f415/examples/i2c/communication_dma/readme.txt index ea321a8..d1d6aca 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2c/communication_dma/src/at32f415_clock.c b/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_dma/src/at32f415_int.c b/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_int.c index 570fbd3..b531894 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_dma/src/main.c b/project/at_start_f415/examples/i2c/communication_dma/src/main.c index 7ae759b..65e25ea 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2c/communication_int/inc/at32f415_clock.h b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_int/inc/at32f415_conf.h b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_int.h b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx b/project/at_start_f415/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx index 4fb9522..da50c3c 100644 --- a/project/at_start_f415/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx +++ b/project/at_start_f415/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx @@ -306,6 +306,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c at32f415_dma.c 0 @@ -321,7 +333,7 @@ 0 4 - 11 + 12 1 0 0 @@ -333,7 +345,7 @@ 4 - 12 + 13 2 0 0 @@ -353,7 +365,7 @@ 0 5 - 13 + 14 5 0 0 diff --git a/project/at_start_f415/examples/i2c/communication_int/mdk_v5/communication_int.uvprojx b/project/at_start_f415/examples/i2c/communication_int/mdk_v5/communication_int.uvprojx index 21842f4..5ff1b10 100644 --- a/project/at_start_f415/examples/i2c/communication_int/mdk_v5/communication_int.uvprojx +++ b/project/at_start_f415/examples/i2c/communication_int/mdk_v5/communication_int.uvprojx @@ -437,6 +437,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_dma.c 1 diff --git a/project/at_start_f415/examples/i2c/communication_int/readme.txt b/project/at_start_f415/examples/i2c/communication_int/readme.txt index ade42b1..87909c9 100644 --- a/project/at_start_f415/examples/i2c/communication_int/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2c/communication_int/src/at32f415_clock.c b/project/at_start_f415/examples/i2c/communication_int/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/i2c/communication_int/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2c/communication_int/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_int/src/at32f415_int.c b/project/at_start_f415/examples/i2c/communication_int/src/at32f415_int.c index 1f0b2e0..bb20ce5 100644 --- a/project/at_start_f415/examples/i2c/communication_int/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2c/communication_int/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_int/src/main.c b/project/at_start_f415/examples/i2c/communication_int/src/main.c index 47abcde..b4af676 100644 --- a/project/at_start_f415/examples/i2c/communication_int/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2c/communication_poll/inc/at32f415_clock.h b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_poll/inc/at32f415_conf.h b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_int.h b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx b/project/at_start_f415/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx index d23f3a7..1a06117 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx +++ b/project/at_start_f415/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx @@ -311,6 +311,18 @@ 0 0 + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + @@ -321,7 +333,7 @@ 0 4 - 11 + 12 1 0 0 @@ -333,7 +345,7 @@ 4 - 12 + 13 2 0 0 @@ -353,7 +365,7 @@ 0 5 - 13 + 14 5 0 0 diff --git a/project/at_start_f415/examples/i2c/communication_poll/mdk_v5/communication_poll.uvprojx b/project/at_start_f415/examples/i2c/communication_poll/mdk_v5/communication_poll.uvprojx index be63985..72a0ec2 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/mdk_v5/communication_poll.uvprojx +++ b/project/at_start_f415/examples/i2c/communication_poll/mdk_v5/communication_poll.uvprojx @@ -442,6 +442,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/i2c/communication_poll/readme.txt b/project/at_start_f415/examples/i2c/communication_poll/readme.txt index b9ee8b6..ba25a3f 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2c/communication_poll/src/at32f415_clock.c b/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_poll/src/at32f415_int.c b/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_int.c index 00df492..7d21487 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_poll/src/main.c b/project/at_start_f415/examples/i2c/communication_poll/src/main.c index 1fcb7ca..2ccf355 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2c/eeprom/inc/at32f415_clock.h b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/eeprom/inc/at32f415_conf.h b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_int.h b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx b/project/at_start_f415/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx index 0c85059..c2e11ea 100644 --- a/project/at_start_f415/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx +++ b/project/at_start_f415/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx @@ -311,6 +311,18 @@ 0 0 + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + @@ -321,7 +333,7 @@ 0 4 - 11 + 12 1 0 0 @@ -333,7 +345,7 @@ 4 - 12 + 13 2 0 0 @@ -353,7 +365,7 @@ 0 5 - 13 + 14 5 0 0 diff --git a/project/at_start_f415/examples/i2c/eeprom/mdk_v5/eeprom.uvprojx b/project/at_start_f415/examples/i2c/eeprom/mdk_v5/eeprom.uvprojx index b926cb2..4b4f3bf 100644 --- a/project/at_start_f415/examples/i2c/eeprom/mdk_v5/eeprom.uvprojx +++ b/project/at_start_f415/examples/i2c/eeprom/mdk_v5/eeprom.uvprojx @@ -442,6 +442,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/i2c/eeprom/readme.txt b/project/at_start_f415/examples/i2c/eeprom/readme.txt index 4c645e9..c75a358 100644 --- a/project/at_start_f415/examples/i2c/eeprom/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2c/eeprom/src/at32f415_clock.c b/project/at_start_f415/examples/i2c/eeprom/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/i2c/eeprom/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2c/eeprom/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/eeprom/src/at32f415_int.c b/project/at_start_f415/examples/i2c/eeprom/src/at32f415_int.c index 65c8fd7..46b7bbf 100644 --- a/project/at_start_f415/examples/i2c/eeprom/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2c/eeprom/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/eeprom/src/main.c b/project/at_start_f415/examples/i2c/eeprom/src/main.c index 1115989..0291d64 100644 --- a/project/at_start_f415/examples/i2c/eeprom/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2s/halfduplex_dma/inc/at32f415_clock.h b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_dma/inc/at32f415_conf.h b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_int.h b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx b/project/at_start_f415/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx index a290158..6e816a0 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c at32f415_dma.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 0 4 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 4 - 11 + 12 2 0 0 @@ -341,7 +353,7 @@ 0 5 - 12 + 13 5 0 0 diff --git a/project/at_start_f415/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvprojx b/project/at_start_f415/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvprojx index 8bf1ba6..333d143 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvprojx +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_dma.c 1 diff --git a/project/at_start_f415/examples/i2s/halfduplex_dma/readme.txt b/project/at_start_f415/examples/i2s/halfduplex_dma/readme.txt index 6663922..d60c785 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2s/halfduplex_dma/src/at32f415_clock.c b/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_dma/src/at32f415_int.c b/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_int.c index eea95af..8569878 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_dma/src/main.c b/project/at_start_f415/examples/i2s/halfduplex_dma/src/main.c index d82d28f..d275436 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx b/project/at_start_f415/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx index 9a15793..e407ef8 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_spi.c at32f415_spi.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_f415/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx b/project/at_start_f415/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx index bee4633..94024fe 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_spi.c 1 diff --git a/project/at_start_f415/examples/i2s/halfduplex_interrupt/readme.txt b/project/at_start_f415/examples/i2s/halfduplex_interrupt/readme.txt index 63233f8..db9c299 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2s/halfduplex_interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_interrupt/src/at32f415_int.c b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_int.c index 5e278a8..e3f6258 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_interrupt/src/main.c b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/main.c index 8ef4d3b..e25f43f 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_int.h b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx index b4eeb2c..53c8f04 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_spi.c at32f415_spi.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_f415/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvprojx b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvprojx index 5cfe49c..781ac0c 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvprojx +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_spi.c 1 diff --git a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt index 3cf496b..c93193a 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_clock.c b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_int.c b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_int.c index 2be442f..9d8ecce 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c index 6c6bb94..f32a349 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c +++ b/project/at_start_f415/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_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_alarm/mdk_v5/deepsleep_ertc_alarm.uvoptx b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/mdk_v5/deepsleep_ertc_alarm.uvoptx index e680a4d..15c12d5 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/mdk_v5/deepsleep_ertc_alarm.uvoptx +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/mdk_v5/deepsleep_ertc_alarm.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c at32f415_pwc.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -301,7 +313,7 @@ 3 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 0 4 - 11 + 12 1 0 0 @@ -333,7 +345,7 @@ 4 - 12 + 13 2 0 0 @@ -353,7 +365,7 @@ 0 5 - 13 + 14 5 0 0 diff --git a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/mdk_v5/deepsleep_ertc_alarm.uvprojx b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/mdk_v5/deepsleep_ertc_alarm.uvprojx index a25b095..0deebd4 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/mdk_v5/deepsleep_ertc_alarm.uvprojx +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/mdk_v5/deepsleep_ertc_alarm.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_pwc.c 1 diff --git a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/readme.txt b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/readme.txt index 48e0648..68a7f65 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/readme.txt +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/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_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_int.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_int.c index 24ebaa8..41ff628 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_alarm/src/main.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/main.c index f66f68d..0687ffb 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/main.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/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_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_tamper/mdk_v5/deepsleep_ertc_tamper.uvoptx b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/mdk_v5/deepsleep_ertc_tamper.uvoptx index 608630e..3e7dda1 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/mdk_v5/deepsleep_ertc_tamper.uvoptx +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/mdk_v5/deepsleep_ertc_tamper.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c at32f415_pwc.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -301,7 +313,7 @@ 3 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 0 4 - 11 + 12 1 0 0 @@ -333,7 +345,7 @@ 4 - 12 + 13 2 0 0 @@ -353,7 +365,7 @@ 0 5 - 13 + 14 5 0 0 diff --git a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/mdk_v5/deepsleep_ertc_tamper.uvprojx b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/mdk_v5/deepsleep_ertc_tamper.uvprojx index a48f76b..98dc043 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/mdk_v5/deepsleep_ertc_tamper.uvprojx +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/mdk_v5/deepsleep_ertc_tamper.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_pwc.c 1 diff --git a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/readme.txt b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/readme.txt index 75e0eba..204c000 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/readme.txt +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_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_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_int.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_int.c index ff169a8..820c909 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_tamper/src/main.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/main.c index 399b040..7daf701 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/main.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_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_f415/examples/pwc/power_voltage_monitor/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/power_voltage_monitor/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx b/project/at_start_f415/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx index 44cfbaf..181af9c 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c at32f415_pwc.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 0 4 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 4 - 11 + 12 2 0 0 @@ -341,7 +353,7 @@ 0 5 - 12 + 13 5 0 0 diff --git a/project/at_start_f415/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvprojx b/project/at_start_f415/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvprojx index d0ac9de..0b23cf0 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvprojx +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_pwc.c 1 diff --git a/project/at_start_f415/examples/pwc/power_voltage_monitor/readme.txt b/project/at_start_f415/examples/pwc/power_voltage_monitor/readme.txt index bea833d..0bd388b 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/readme.txt +++ b/project/at_start_f415/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_f415/examples/pwc/power_voltage_monitor/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/power_voltage_monitor/src/at32f415_int.c b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_int.c index 92b108d..6336574 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/power_voltage_monitor/src/main.c b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/main.c index 4dcbf75..8ecaf4e 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/src/main.c +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_tmr2/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_tmr2/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx b/project/at_start_f415/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx index 4149edf..efb98a1 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c at32f415_pwc.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 0 4 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 4 - 11 + 12 2 0 0 @@ -341,7 +353,7 @@ 0 5 - 12 + 13 5 0 0 diff --git a/project/at_start_f415/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvprojx b/project/at_start_f415/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvprojx index 67083fa..583917a 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvprojx +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_pwc.c 1 diff --git a/project/at_start_f415/examples/pwc/sleep_tmr2/readme.txt b/project/at_start_f415/examples/pwc/sleep_tmr2/readme.txt index e29fb93..0d07257 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/readme.txt +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_tmr2/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_tmr2/src/at32f415_int.c b/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_int.c index 411f2a0..e166bb1 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_tmr2/src/main.c b/project/at_start_f415/examples/pwc/sleep_tmr2/src/main.c index e7901e8..61bf0b9 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/src/main.c +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_usart1/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_usart1/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvprojx b/project/at_start_f415/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvprojx index 89eb7e7..489fcb5 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvprojx +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_usart1/readme.txt b/project/at_start_f415/examples/pwc/sleep_usart1/readme.txt index 9f6b8a6..a2f6c1c 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/readme.txt +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_usart1/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_usart1/src/at32f415_int.c b/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_int.c index 2c8a3bb..ad10f57 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_usart1/src/main.c b/project/at_start_f415/examples/pwc/sleep_usart1/src/main.c index 95f7bcc..b215514 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include - /** @addtogroup AT32F415_periph_examples * @{ @@ -36,57 +34,6 @@ /** @addtogroup 415_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_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_ertc_alarm/mdk_v5/standby_ertc_alarm.uvoptx b/project/at_start_f415/examples/pwc/standby_ertc_alarm/mdk_v5/standby_ertc_alarm.uvoptx index 5437714..b73e596 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/mdk_v5/standby_ertc_alarm.uvoptx +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/mdk_v5/standby_ertc_alarm.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c at32f415_pwc.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 0 4 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 4 - 11 + 12 2 0 0 @@ -341,7 +353,7 @@ 0 5 - 12 + 13 5 0 0 diff --git a/project/at_start_f415/examples/pwc/standby_ertc_alarm/mdk_v5/standby_ertc_alarm.uvprojx b/project/at_start_f415/examples/pwc/standby_ertc_alarm/mdk_v5/standby_ertc_alarm.uvprojx index 9d169ff..1da0657 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/mdk_v5/standby_ertc_alarm.uvprojx +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/mdk_v5/standby_ertc_alarm.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_pwc.c 1 diff --git a/project/at_start_f415/examples/pwc/standby_ertc_alarm/readme.txt b/project/at_start_f415/examples/pwc/standby_ertc_alarm/readme.txt index 183723d..e88910c 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/readme.txt +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/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_f415/examples/pwc/standby_ertc_alarm/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_ertc_alarm/src/at32f415_int.c b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_int.c index f6fddd4..525e833 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_ertc_alarm/src/main.c b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/main.c index bef72e7..c432b8b 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/main.c +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/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_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx b/project/at_start_f415/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx index 142f7f2..9261ac2 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c at32f415_pwc.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_f415/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvprojx b/project/at_start_f415/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvprojx index 0d43eaa..4331a88 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvprojx +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_pwc.c 1 diff --git a/project/at_start_f415/examples/pwc/standby_wakeup_pin/readme.txt b/project/at_start_f415/examples/pwc/standby_wakeup_pin/readme.txt index 2ea19d8..aa05617 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/readme.txt +++ b/project/at_start_f415/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_f415/examples/pwc/standby_wakeup_pin/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_wakeup_pin/src/at32f415_int.c b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_int.c index 527bb6e..7554621 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_wakeup_pin/src/main.c b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/main.c index 5055c3e..047c235 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/main.c +++ b/project/at_start_f415/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_f415/examples/sdio/sd_mmc_card/inc/at32_sdio.h b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32_sdio.h index 9ae5323..e916740 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32_sdio.h +++ b/project/at_start_f415/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_f415/examples/sdio/sd_mmc_card/inc/at32f415_clock.h b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sd_mmc_card/inc/at32f415_conf.h b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_int.h b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_int.h +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sd_mmc_card/readme.txt b/project/at_start_f415/examples/sdio/sd_mmc_card/readme.txt index 86cb592..fcd320e 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/readme.txt +++ b/project/at_start_f415/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_f415/examples/sdio/sd_mmc_card/src/at32_sdio.c b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32_sdio.c index d59261c..99efdc2 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32_sdio.c +++ b/project/at_start_f415/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_f415/examples/sdio/sd_mmc_card/src/at32f415_clock.c b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_clock.c +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sd_mmc_card/src/at32f415_int.c b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_int.c index e96d33b..75f129f 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_int.c +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sd_mmc_card/src/main.c b/project/at_start_f415/examples/sdio/sd_mmc_card/src/main.c index f6fc755..270b89e 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/src/main.c +++ b/project/at_start_f415/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_f415/examples/sdio/sdio_fatfs/inc/at32_sdio.h b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32_sdio.h index 133447f..3521e72 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32_sdio.h +++ b/project/at_start_f415/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_f415/examples/sdio/sdio_fatfs/inc/at32f415_clock.h b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sdio_fatfs/inc/at32f415_conf.h b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_int.h b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_int.h +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sdio_fatfs/readme.txt b/project/at_start_f415/examples/sdio/sdio_fatfs/readme.txt index 7fa41c8..e17e985 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/readme.txt +++ b/project/at_start_f415/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_f415/examples/sdio/sdio_fatfs/src/at32_sdio.c b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32_sdio.c index 2008ef5..589fc1f 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32_sdio.c +++ b/project/at_start_f415/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_f415/examples/sdio/sdio_fatfs/src/at32f415_clock.c b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_clock.c +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sdio_fatfs/src/at32f415_int.c b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_int.c index f5c2b34..c26bdce 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_int.c +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sdio_fatfs/src/main.c b/project/at_start_f415/examples/sdio/sdio_fatfs/src/main.c index 43f0c69..af5144a 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/src/main.c +++ b/project/at_start_f415/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_f415/examples/spi/crc_transfer_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/crc_transfer_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_int.h b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx b/project/at_start_f415/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx index 42c971f..f7c1165 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_spi.c at32f415_spi.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_f415/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvprojx b/project/at_start_f415/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvprojx index f86a7fa..8f6240e 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvprojx +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_spi.c 1 diff --git a/project/at_start_f415/examples/spi/crc_transfer_polling/readme.txt b/project/at_start_f415/examples/spi/crc_transfer_polling/readme.txt index eff3d81..4699c4f 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/crc_transfer_polling/src/at32f415_clock.c b/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/crc_transfer_polling/src/at32f415_int.c b/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_int.c index 955f1c3..7a0f10e 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/crc_transfer_polling/src/main.c b/project/at_start_f415/examples/spi/crc_transfer_polling/src/main.c index 362309f..2732811 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include /** @addtogroup AT32F415_periph_examples * @{ diff --git a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/fullduplex_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_int.h b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx b/project/at_start_f415/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx index 7ec7520..645f373 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx +++ b/project/at_start_f415/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_spi.c at32f415_spi.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_f415/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvprojx b/project/at_start_f415/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvprojx index c90e8a8..2dcd8c0 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvprojx +++ b/project/at_start_f415/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_spi.c 1 diff --git a/project/at_start_f415/examples/spi/fullduplex_polling/readme.txt b/project/at_start_f415/examples/spi/fullduplex_polling/readme.txt index b4ff636..ce2075e 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/fullduplex_polling/src/at32f415_clock.c b/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/fullduplex_polling/src/at32f415_int.c b/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_int.c index f879909..701633f 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/fullduplex_polling/src/main.c b/project/at_start_f415/examples/spi/fullduplex_polling/src/main.c index 2a3ad6b..fbf9a92 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include /** @addtogroup AT32F415_periph_examples * @{ diff --git a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx b/project/at_start_f415/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx index 9a15793..e407ef8 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_spi.c at32f415_spi.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_f415/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx b/project/at_start_f415/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx index bee4633..94024fe 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_spi.c 1 diff --git a/project/at_start_f415/examples/spi/halfduplex_interrupt/readme.txt b/project/at_start_f415/examples/spi/halfduplex_interrupt/readme.txt index d07814f..5a4678e 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/halfduplex_interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_interrupt/src/at32f415_int.c b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_int.c index 77e40e5..04315c5 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_interrupt/src/main.c b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/main.c index 490e8ef..3cf69d6 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include /** @addtogroup AT32F415_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_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_int.h b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx index 7ace22a..faa930f 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_spi.c at32f415_spi.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_f415/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvprojx b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvprojx index 09dfd13..35505c1 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvprojx +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_spi.c 1 diff --git a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/readme.txt b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/readme.txt index eb8873c..9b532cd 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_clock.c b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_int.c b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_int.c index b24ab7b..d8f5eb4 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_transceiver_switch/src/main.c b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/main.c index 0f5df0e..487cb10 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include /** @addtogroup AT32F415_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_f415/examples/spi/only_receive_mode_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/only_receive_mode_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_int.h b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx b/project/at_start_f415/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx index 43db2d1..c176039 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_spi.c at32f415_spi.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_f415/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvprojx b/project/at_start_f415/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvprojx index 88d1703..266d41e 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvprojx +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_spi.c 1 diff --git a/project/at_start_f415/examples/spi/only_receive_mode_polling/readme.txt b/project/at_start_f415/examples/spi/only_receive_mode_polling/readme.txt index a2aabb8..3650634 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/only_receive_mode_polling/src/at32f415_clock.c b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/only_receive_mode_polling/src/at32f415_int.c b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_int.c index 46388e1..2b18bda 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/only_receive_mode_polling/src/main.c b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/main.c index b3e1959..1f349f3 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include /** @addtogroup AT32F415_periph_examples * @{ diff --git a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_int.h b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx index 80fb73c..2939bb4 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c at32f415_dma.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 0 4 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 4 - 11 + 12 2 0 0 @@ -341,7 +353,7 @@ 0 5 - 12 + 13 5 0 0 diff --git a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvprojx b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvprojx index 9b8d60e..4978cdc 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvprojx +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_dma.c 1 diff --git a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt index 942bed5..94f1149 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_clock.c b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_int.c b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_int.c index d33102b..f4e2307 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c index 6655b96..2f4e14b 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include /** @addtogroup AT32F415_periph_examples * @{ diff --git a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/w25q_flash/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_int.h b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/w25q_flash/inc/spi_flash.h b/project/at_start_f415/examples/spi/w25q_flash/inc/spi_flash.h index dc672bd..400f6d8 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/inc/spi_flash.h +++ b/project/at_start_f415/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_f415/examples/spi/w25q_flash/readme.txt b/project/at_start_f415/examples/spi/w25q_flash/readme.txt index 94f715c..774d3f1 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/w25q_flash/src/at32f415_clock.c b/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/w25q_flash/src/at32f415_int.c b/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_int.c index bacbf3f..69ed4f0 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/w25q_flash/src/main.c b/project/at_start_f415/examples/spi/w25q_flash/src/main.c index 8ef3fe4..e399d9c 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include #include "spi_flash.h" /** @addtogroup AT32F415_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_f415/examples/spi/w25q_flash/src/spi_flash.c b/project/at_start_f415/examples/spi/w25q_flash/src/spi_flash.c index 87f6c1c..64a95c8 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/src/spi_flash.c +++ b/project/at_start_f415/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_f415/examples/tmr/6_steps/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/6_steps/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx b/project/at_start_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx index 799be7e..9a6556c 100644 --- a/project/at_start_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx +++ b/project/at_start_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx b/project/at_start_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx index 7b28219..b1177ab 100644 --- a/project/at_start_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx +++ b/project/at_start_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/6_steps/readme.txt b/project/at_start_f415/examples/tmr/6_steps/readme.txt index 1e57cd8..ac9791b 100644 --- a/project/at_start_f415/examples/tmr/6_steps/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/6_steps/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/6_steps/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/6_steps/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/6_steps/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/6_steps/src/at32f415_int.c b/project/at_start_f415/examples/tmr/6_steps/src/at32f415_int.c index b462214..96d5b32 100644 --- a/project/at_start_f415/examples/tmr/6_steps/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/6_steps/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/6_steps/src/main.c b/project/at_start_f415/examples/tmr/6_steps/src/main.c index 1076001..cd70795 100644 --- a/project/at_start_f415/examples/tmr/6_steps/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/7_pwm_output/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/7_pwm_output/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx b/project/at_start_f415/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx index 2605860..5383ffe 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx +++ b/project/at_start_f415/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvprojx b/project/at_start_f415/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvprojx index 55eda77..8551708 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvprojx +++ b/project/at_start_f415/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/7_pwm_output/readme.txt b/project/at_start_f415/examples/tmr/7_pwm_output/readme.txt index c56c7d2..cba1b52 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/7_pwm_output/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/7_pwm_output/src/at32f415_int.c b/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_int.c index 875e0ed..91fa9cc 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/7_pwm_output/src/main.c b/project/at_start_f415/examples/tmr/7_pwm_output/src/main.c index a67939f..6c3be00 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/cascade_synchro/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/cascade_synchro/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx b/project/at_start_f415/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx index 57df0f1..8a8c3db 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx +++ b/project/at_start_f415/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvprojx b/project/at_start_f415/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvprojx index 626f7b2..ed2e67f 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvprojx +++ b/project/at_start_f415/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/cascade_synchro/readme.txt b/project/at_start_f415/examples/tmr/cascade_synchro/readme.txt index 28ac543..e7ae5cd 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/cascade_synchro/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/cascade_synchro/src/at32f415_int.c b/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_int.c index 9362785..a2abb1c 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/cascade_synchro/src/main.c b/project/at_start_f415/examples/tmr/cascade_synchro/src/main.c index a073451..a46632a 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/complementary_signals/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/complementary_signals/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx b/project/at_start_f415/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx index 059e0a0..e97cbd5 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx +++ b/project/at_start_f415/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvprojx b/project/at_start_f415/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvprojx index e6867e0..59fde93 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvprojx +++ b/project/at_start_f415/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/complementary_signals/readme.txt b/project/at_start_f415/examples/tmr/complementary_signals/readme.txt index 8e71c19..3ed835b 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/complementary_signals/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/complementary_signals/src/at32f415_int.c b/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_int.c index 851acf2..8523c7f 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/complementary_signals/src/main.c b/project/at_start_f415/examples/tmr/complementary_signals/src/main.c index 05ed339..6f4d72f 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/dma/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/dma/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/dma/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/dma/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/dma/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma/mdk_v5/dma.uvoptx b/project/at_start_f415/examples/tmr/dma/mdk_v5/dma.uvoptx index 2a6599d..12dbdb0 100644 --- a/project/at_start_f415/examples/tmr/dma/mdk_v5/dma.uvoptx +++ b/project/at_start_f415/examples/tmr/dma/mdk_v5/dma.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_tmr.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 0 4 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 4 - 11 + 12 2 0 0 @@ -341,7 +353,7 @@ 0 5 - 12 + 13 5 0 0 diff --git a/project/at_start_f415/examples/tmr/dma/mdk_v5/dma.uvprojx b/project/at_start_f415/examples/tmr/dma/mdk_v5/dma.uvprojx index 2d064ec..99b81ed 100644 --- a/project/at_start_f415/examples/tmr/dma/mdk_v5/dma.uvprojx +++ b/project/at_start_f415/examples/tmr/dma/mdk_v5/dma.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/dma/readme.txt b/project/at_start_f415/examples/tmr/dma/readme.txt index 4cb4e1d..ef7325d 100644 --- a/project/at_start_f415/examples/tmr/dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/dma/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/dma/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma/src/at32f415_int.c b/project/at_start_f415/examples/tmr/dma/src/at32f415_int.c index 8c31ee2..01a674f 100644 --- a/project/at_start_f415/examples/tmr/dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma/src/main.c b/project/at_start_f415/examples/tmr/dma/src/main.c index debb8ce..975d477 100644 --- a/project/at_start_f415/examples/tmr/dma/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/dma_burst/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma_burst/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx b/project/at_start_f415/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx index d93ecc7..2d30a9a 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx +++ b/project/at_start_f415/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_tmr.c 0 @@ -289,7 +301,7 @@ 3 - 9 + 10 1 0 0 @@ -309,7 +321,7 @@ 0 4 - 10 + 11 1 0 0 @@ -321,7 +333,7 @@ 4 - 11 + 12 2 0 0 @@ -341,7 +353,7 @@ 0 5 - 12 + 13 5 0 0 diff --git a/project/at_start_f415/examples/tmr/dma_burst/mdk_v5/dma_burst.uvprojx b/project/at_start_f415/examples/tmr/dma_burst/mdk_v5/dma_burst.uvprojx index 441d7d7..22f48d9 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/mdk_v5/dma_burst.uvprojx +++ b/project/at_start_f415/examples/tmr/dma_burst/mdk_v5/dma_burst.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/dma_burst/readme.txt b/project/at_start_f415/examples/tmr/dma_burst/readme.txt index 7dd0a88..dfdb600 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/dma_burst/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma_burst/src/at32f415_int.c b/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_int.c index 03a39e9..a282618 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma_burst/src/main.c b/project/at_start_f415/examples/tmr/dma_burst/src/main.c index 019e4b0..e41aa61 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/encoder_tmr2/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/encoder_tmr2/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvoptx b/project/at_start_f415/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvoptx index c135218..9f98732 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvoptx +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvprojx b/project/at_start_f415/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvprojx index ddde46a..711de5b 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvprojx +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/mdk_v5/encoder_tmr2.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/encoder_tmr2/readme.txt b/project/at_start_f415/examples/tmr/encoder_tmr2/readme.txt index 07c094b..20d072e 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/encoder_tmr2/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/encoder_tmr2/src/at32f415_int.c b/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_int.c index 0c8a290..0ff482b 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/encoder_tmr2/src/main.c b/project/at_start_f415/examples/tmr/encoder_tmr2/src/main.c index 7373142..bb33217 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/external_clock/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/external_clock/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/external_clock/mdk_v5/external_clock.uvoptx b/project/at_start_f415/examples/tmr/external_clock/mdk_v5/external_clock.uvoptx index 877d240..27c6bb5 100644 --- a/project/at_start_f415/examples/tmr/external_clock/mdk_v5/external_clock.uvoptx +++ b/project/at_start_f415/examples/tmr/external_clock/mdk_v5/external_clock.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/external_clock/mdk_v5/external_clock.uvprojx b/project/at_start_f415/examples/tmr/external_clock/mdk_v5/external_clock.uvprojx index 2aad692..fc5b420 100644 --- a/project/at_start_f415/examples/tmr/external_clock/mdk_v5/external_clock.uvprojx +++ b/project/at_start_f415/examples/tmr/external_clock/mdk_v5/external_clock.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/external_clock/readme.txt b/project/at_start_f415/examples/tmr/external_clock/readme.txt index a1dbc16..8a1c192 100644 --- a/project/at_start_f415/examples/tmr/external_clock/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/external_clock/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/external_clock/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/external_clock/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/external_clock/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/external_clock/src/at32f415_int.c b/project/at_start_f415/examples/tmr/external_clock/src/at32f415_int.c index 99b1a7f..80c61fd 100644 --- a/project/at_start_f415/examples/tmr/external_clock/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/external_clock/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/external_clock/src/main.c b/project/at_start_f415/examples/tmr/external_clock/src/main.c index fdd4eb7..172b8e1 100644 --- a/project/at_start_f415/examples/tmr/external_clock/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvoptx b/project/at_start_f415/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvoptx index 05d4631..009ccc5 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvoptx +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvprojx b/project/at_start_f415/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvprojx index 9492bf0..0e39e5a 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvprojx +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/mdk_v5/hall_xor_tmr2.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/hall_xor_tmr2/readme.txt b/project/at_start_f415/examples/tmr/hall_xor_tmr2/readme.txt index 971e707..4aea776 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/hall_xor_tmr2/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hall_xor_tmr2/src/at32f415_int.c b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_int.c index 9295e57..95c9cd7 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hall_xor_tmr2/src/main.c b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/main.c index a3adcf6..388654f 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/hang_mode/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hang_mode/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hang_mode/mdk_v5/hang_mode.uvoptx b/project/at_start_f415/examples/tmr/hang_mode/mdk_v5/hang_mode.uvoptx index 22ce66a..820563e 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/mdk_v5/hang_mode.uvoptx +++ b/project/at_start_f415/examples/tmr/hang_mode/mdk_v5/hang_mode.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/hang_mode/mdk_v5/hang_mode.uvprojx b/project/at_start_f415/examples/tmr/hang_mode/mdk_v5/hang_mode.uvprojx index e2850c5..567072a 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/mdk_v5/hang_mode.uvprojx +++ b/project/at_start_f415/examples/tmr/hang_mode/mdk_v5/hang_mode.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/hang_mode/readme.txt b/project/at_start_f415/examples/tmr/hang_mode/readme.txt index 9df587f..0684caf 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/hang_mode/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hang_mode/src/at32f415_int.c b/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_int.c index 8365966..913ba00 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hang_mode/src/main.c b/project/at_start_f415/examples/tmr/hang_mode/src/main.c index 70baf62..c060867 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/input_capture/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/input_capture/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/input_capture/readme.txt b/project/at_start_f415/examples/tmr/input_capture/readme.txt index d482b17..2036dfd 100644 --- a/project/at_start_f415/examples/tmr/input_capture/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/input_capture/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/input_capture/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/input_capture/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/input_capture/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/input_capture/src/at32f415_int.c b/project/at_start_f415/examples/tmr/input_capture/src/at32f415_int.c index 2456793..78ea2fa 100644 --- a/project/at_start_f415/examples/tmr/input_capture/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/input_capture/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/input_capture/src/main.c b/project/at_start_f415/examples/tmr/input_capture/src/main.c index 2cbdc22..062bc19 100644 --- a/project/at_start_f415/examples/tmr/input_capture/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_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_f415/examples/tmr/oc_high/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_high/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_high/mdk_v5/oc_high.uvoptx b/project/at_start_f415/examples/tmr/oc_high/mdk_v5/oc_high.uvoptx index 1191a31..d63f87a 100644 --- a/project/at_start_f415/examples/tmr/oc_high/mdk_v5/oc_high.uvoptx +++ b/project/at_start_f415/examples/tmr/oc_high/mdk_v5/oc_high.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_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_f415/examples/tmr/oc_high/mdk_v5/oc_high.uvprojx b/project/at_start_f415/examples/tmr/oc_high/mdk_v5/oc_high.uvprojx index b5d0728..844cdde 100644 --- a/project/at_start_f415/examples/tmr/oc_high/mdk_v5/oc_high.uvprojx +++ b/project/at_start_f415/examples/tmr/oc_high/mdk_v5/oc_high.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/oc_high/readme.txt b/project/at_start_f415/examples/tmr/oc_high/readme.txt index 31f5842..36a062a 100644 --- a/project/at_start_f415/examples/tmr/oc_high/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/oc_high/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/oc_high/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/oc_high/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/oc_high/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_high/src/at32f415_int.c b/project/at_start_f415/examples/tmr/oc_high/src/at32f415_int.c index 8cc7157..de27785 100644 --- a/project/at_start_f415/examples/tmr/oc_high/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/oc_high/src/at32f415_int.c @@ -1,17 +1,17 @@ /** ************************************************************************** * @file at32f415_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 AT32F415_periph_examples * @{ */ - + /** @addtogroup 415_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_f415/examples/tmr/oc_high/src/main.c b/project/at_start_f415/examples/tmr/oc_high/src/main.c index cb19d0f..56f024b 100644 --- a/project/at_start_f415/examples/tmr/oc_high/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/oc_low/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_low/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_low/mdk_v5/oc_low.uvoptx b/project/at_start_f415/examples/tmr/oc_low/mdk_v5/oc_low.uvoptx index d06e36b..960c618 100644 --- a/project/at_start_f415/examples/tmr/oc_low/mdk_v5/oc_low.uvoptx +++ b/project/at_start_f415/examples/tmr/oc_low/mdk_v5/oc_low.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_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_f415/examples/tmr/oc_low/mdk_v5/oc_low.uvprojx b/project/at_start_f415/examples/tmr/oc_low/mdk_v5/oc_low.uvprojx index 6f1d582..942bd86 100644 --- a/project/at_start_f415/examples/tmr/oc_low/mdk_v5/oc_low.uvprojx +++ b/project/at_start_f415/examples/tmr/oc_low/mdk_v5/oc_low.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/oc_low/readme.txt b/project/at_start_f415/examples/tmr/oc_low/readme.txt index 5be2d6c..eb58d26 100644 --- a/project/at_start_f415/examples/tmr/oc_low/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/oc_low/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/oc_low/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/oc_low/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/oc_low/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_low/src/at32f415_int.c b/project/at_start_f415/examples/tmr/oc_low/src/at32f415_int.c index 0c39be0..29ec697 100644 --- a/project/at_start_f415/examples/tmr/oc_low/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/oc_low/src/at32f415_int.c @@ -1,17 +1,17 @@ /** ************************************************************************** * @file at32f415_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 AT32F415_periph_examples * @{ */ - + /** @addtogroup 415_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_f415/examples/tmr/oc_low/src/main.c b/project/at_start_f415/examples/tmr/oc_low/src/main.c index 5e2c7ba..c50706b 100644 --- a/project/at_start_f415/examples/tmr/oc_low/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvoptx b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvoptx index 5f0ab9e..f6ff0dc 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvoptx +++ b/project/at_start_f415/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\at32f415_usart.c + at32f415_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_f415/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvprojx b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvprojx index 2e024a7..f4bf6cb 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvprojx +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/mdk_v5/oc_toggle_tmr3.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/readme.txt b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/readme.txt index 417a559..efa17f6 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_int.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_int.c index c269fec..a6dd38b 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr3/src/main.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/main.c index 219bc24..60f3510 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvoptx b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvoptx index cd4c150..d97e108 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvoptx +++ b/project/at_start_f415/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\at32f415_usart.c + at32f415_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_f415/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvprojx b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvprojx index dabab35..2f430fd 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvprojx +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/mdk_v5/oc_toggle_tmr9.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/readme.txt b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/readme.txt index 97ea51a..1f83279 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_int.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_int.c index 00925e1..fd6601e 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr9/src/main.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/main.c index 088d775..7410e2f 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/one_cycle/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/one_cycle/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/one_cycle/mdk_v5/one_cycle.uvoptx b/project/at_start_f415/examples/tmr/one_cycle/mdk_v5/one_cycle.uvoptx index b6bcb6a..52e0027 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/mdk_v5/one_cycle.uvoptx +++ b/project/at_start_f415/examples/tmr/one_cycle/mdk_v5/one_cycle.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_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_f415/examples/tmr/one_cycle/mdk_v5/one_cycle.uvprojx b/project/at_start_f415/examples/tmr/one_cycle/mdk_v5/one_cycle.uvprojx index b448242..f36935d 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/mdk_v5/one_cycle.uvprojx +++ b/project/at_start_f415/examples/tmr/one_cycle/mdk_v5/one_cycle.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/one_cycle/readme.txt b/project/at_start_f415/examples/tmr/one_cycle/readme.txt index 75d5081..04133cc 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/one_cycle/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/one_cycle/src/at32f415_int.c b/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_int.c index 5fc0067..f675351 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/one_cycle/src/main.c b/project/at_start_f415/examples/tmr/one_cycle/src/main.c index 367a2cd..ba607b9 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/parallel_synchro/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/parallel_synchro/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvoptx b/project/at_start_f415/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvoptx index 30d8925..5171676 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvoptx +++ b/project/at_start_f415/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_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_f415/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvprojx b/project/at_start_f415/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvprojx index b78a769..5f81f1d 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvprojx +++ b/project/at_start_f415/examples/tmr/parallel_synchro/mdk_v5/parallel_synchro.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/parallel_synchro/readme.txt b/project/at_start_f415/examples/tmr/parallel_synchro/readme.txt index ed40b8d..848d57f 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/parallel_synchro/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/parallel_synchro/src/at32f415_int.c b/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_int.c index ee2c5bc..888bd44 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/parallel_synchro/src/main.c b/project/at_start_f415/examples/tmr/parallel_synchro/src/main.c index f13cc33..f879bc5 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_input/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input/readme.txt b/project/at_start_f415/examples/tmr/pwm_input/readme.txt index 7db2111..3c3fc5e 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_input/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_int.c index 2e5d283..0bcef8d 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input/src/main.c b/project/at_start_f415/examples/tmr/pwm_input/src/main.c index f7c5acf..c4eea2b 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_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_f415/examples/tmr/pwm_input_dma/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input_dma/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input_dma/readme.txt b/project/at_start_f415/examples/tmr/pwm_input_dma/readme.txt index fe4a8c9..e9a1d58 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_input_dma/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input_dma/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_int.c index a98dbd0..5ed739a 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input_dma/src/main.c b/project/at_start_f415/examples/tmr/pwm_input_dma/src/main.c index da56406..99d75c9 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/src/main.c +++ b/project/at_start_f415/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 @@ -26,7 +26,6 @@ #include "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -55,7 +54,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 +111,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 +130,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_f415/examples/tmr/pwm_output_simulate/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_simulate/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvoptx b/project/at_start_f415/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvoptx index 1a7a476..7318f6a 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvoptx +++ b/project/at_start_f415/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\at32f415_usart.c + at32f415_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_f415/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvprojx b/project/at_start_f415/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvprojx index b83169e..081194c 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvprojx +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/mdk_v5/pwm_output_simulate.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/pwm_output_simulate/readme.txt b/project/at_start_f415/examples/tmr/pwm_output_simulate/readme.txt index 785980f..08e1f05 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_simulate/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_simulate/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_int.c index 4c9c3dd..e04f169 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_simulate/src/main.c b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/main.c index 8e07cf7..0d2c74b 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvoptx b/project/at_start_f415/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvoptx index 967de35..d981b35 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvoptx +++ b/project/at_start_f415/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\at32f415_usart.c + at32f415_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_f415/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvprojx b/project/at_start_f415/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvprojx index a1a361b..159a504 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvprojx +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/mdk_v5/pwm_output_tmr10.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/pwm_output_tmr10/readme.txt b/project/at_start_f415/examples/tmr/pwm_output_tmr10/readme.txt index 45c72bf..39286d7 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_tmr10/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr10/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_int.c index 22eed0e..909cb53 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr10/src/main.c b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/main.c index 434e762..c77b51e 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvoptx b/project/at_start_f415/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvoptx index 1fcb6a2..b6c2850 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvoptx +++ b/project/at_start_f415/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\at32f415_usart.c + at32f415_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_f415/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvprojx b/project/at_start_f415/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvprojx index 6de98bf..a94e767 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvprojx +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/mdk_v5/pwm_output_tmr3.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/pwm_output_tmr3/readme.txt b/project/at_start_f415/examples/tmr/pwm_output_tmr3/readme.txt index d4aabc4..18bc5f4 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_tmr3/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr3/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_int.c index 6dd3e56..8ac72c6 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr3/src/main.c b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/main.c index 1debe68..d684836 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/timer_base/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/timer_base/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/timer_base/mdk_v5/timer_base.uvoptx b/project/at_start_f415/examples/tmr/timer_base/mdk_v5/timer_base.uvoptx index 5309e35..144d0af 100644 --- a/project/at_start_f415/examples/tmr/timer_base/mdk_v5/timer_base.uvoptx +++ b/project/at_start_f415/examples/tmr/timer_base/mdk_v5/timer_base.uvoptx @@ -282,6 +282,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c at32f415_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_f415/examples/tmr/timer_base/mdk_v5/timer_base.uvprojx b/project/at_start_f415/examples/tmr/timer_base/mdk_v5/timer_base.uvprojx index 1b11a7b..5c1b616 100644 --- a/project/at_start_f415/examples/tmr/timer_base/mdk_v5/timer_base.uvprojx +++ b/project/at_start_f415/examples/tmr/timer_base/mdk_v5/timer_base.uvprojx @@ -427,6 +427,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_tmr.c 1 diff --git a/project/at_start_f415/examples/tmr/timer_base/readme.txt b/project/at_start_f415/examples/tmr/timer_base/readme.txt index ebedfd2..3065ed8 100644 --- a/project/at_start_f415/examples/tmr/timer_base/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/timer_base/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/timer_base/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/timer_base/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/timer_base/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/timer_base/src/at32f415_int.c b/project/at_start_f415/examples/tmr/timer_base/src/at32f415_int.c index 8aa9731..6ccf73a 100644 --- a/project/at_start_f415/examples/tmr/timer_base/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/timer_base/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/timer_base/src/main.c b/project/at_start_f415/examples/tmr/timer_base/src/main.c index e2bba14..5caf31e 100644 --- a/project/at_start_f415/examples/tmr/timer_base/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/tmr1_synchro/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr1_synchro/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvoptx b/project/at_start_f415/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvoptx index 5b851e0..785462a 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvoptx +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_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_f415/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvprojx b/project/at_start_f415/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvprojx index eec8bf5..ab93d44 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvprojx +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/mdk_v5/tmr1_synchro.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/tmr1_synchro/readme.txt b/project/at_start_f415/examples/tmr/tmr1_synchro/readme.txt index 11608ff..fbc5841 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/tmr1_synchro/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr1_synchro/src/at32f415_int.c b/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_int.c index b2378b0..91e3dff 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr1_synchro/src/main.c b/project/at_start_f415/examples/tmr/tmr1_synchro/src/main.c index 6b7dc07..4fadc6c 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/tmr2_32bit/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr2_32bit/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvoptx b/project/at_start_f415/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvoptx index 03a0727..7b7c26f 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvoptx +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvoptx @@ -287,6 +287,18 @@ 0 0 + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_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_f415/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvprojx b/project/at_start_f415/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvprojx index 874144d..ab8fc86 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvprojx +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/mdk_v5/tmr2_32bit.uvprojx @@ -432,6 +432,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + diff --git a/project/at_start_f415/examples/tmr/tmr2_32bit/readme.txt b/project/at_start_f415/examples/tmr/tmr2_32bit/readme.txt index 9700fa7..c39d775 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/tmr2_32bit/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr2_32bit/src/at32f415_int.c b/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_int.c index a4c64bf..832070f 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr2_32bit/src/main.c b/project/at_start_f415/examples/tmr/tmr2_32bit/src/main.c index b93f57e..48820bc 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/half_duplex/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/half_duplex/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_int.h b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/half_duplex/readme.txt b/project/at_start_f415/examples/usart/half_duplex/readme.txt index 2f94d32..0dae5b5 100644 --- a/project/at_start_f415/examples/usart/half_duplex/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/half_duplex/src/at32f415_clock.c b/project/at_start_f415/examples/usart/half_duplex/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/half_duplex/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/half_duplex/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/half_duplex/src/at32f415_int.c b/project/at_start_f415/examples/usart/half_duplex/src/at32f415_int.c index 06d4def..ea75b8e 100644 --- a/project/at_start_f415/examples/usart/half_duplex/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/half_duplex/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/half_duplex/src/main.c b/project/at_start_f415/examples/usart/half_duplex/src/main.c index 8c16c5f..4dacef3 100644 --- a/project/at_start_f415/examples/usart/half_duplex/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/hw_flow_control/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/hw_flow_control/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_int.h b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/hw_flow_control/readme.txt b/project/at_start_f415/examples/usart/hw_flow_control/readme.txt index a091f71..959440a 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/hw_flow_control/src/at32f415_clock.c b/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/hw_flow_control/src/at32f415_int.c b/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_int.c index 471ea61..2e0d0d6 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/hw_flow_control/src/main.c b/project/at_start_f415/examples/usart/hw_flow_control/src/main.c index 3d9450f..2fa776c 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/idle_detection/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/idle_detection/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_int.h b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/idle_detection/readme.txt b/project/at_start_f415/examples/usart/idle_detection/readme.txt index 698ae6b..7b0b42c 100644 --- a/project/at_start_f415/examples/usart/idle_detection/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/idle_detection/src/at32f415_clock.c b/project/at_start_f415/examples/usart/idle_detection/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/idle_detection/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/idle_detection/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/idle_detection/src/at32f415_int.c b/project/at_start_f415/examples/usart/idle_detection/src/at32f415_int.c index cc9a461..8cfda89 100644 --- a/project/at_start_f415/examples/usart/idle_detection/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/idle_detection/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/idle_detection/src/main.c b/project/at_start_f415/examples/usart/idle_detection/src/main.c index 20627a6..2124d8d 100644 --- a/project/at_start_f415/examples/usart/idle_detection/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/interrupt/readme.txt b/project/at_start_f415/examples/usart/interrupt/readme.txt index 2fa4cff..a000a36 100644 --- a/project/at_start_f415/examples/usart/interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/usart/interrupt/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/interrupt/src/at32f415_int.c b/project/at_start_f415/examples/usart/interrupt/src/at32f415_int.c index 2556029..732bdd8 100644 --- a/project/at_start_f415/examples/usart/interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/interrupt/src/main.c b/project/at_start_f415/examples/usart/interrupt/src/main.c index 2b85703..11a60a9 100644 --- a/project/at_start_f415/examples/usart/interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/irda/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/irda/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/irda/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/irda/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/irda/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/irda/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/irda/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/irda/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/irda/inc/at32f415_int.h b/project/at_start_f415/examples/usart/irda/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/irda/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/irda/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/irda/readme.txt b/project/at_start_f415/examples/usart/irda/readme.txt index 766cba0..7d902b9 100644 --- a/project/at_start_f415/examples/usart/irda/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/irda/src/at32f415_clock.c b/project/at_start_f415/examples/usart/irda/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/irda/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/irda/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/irda/src/at32f415_int.c b/project/at_start_f415/examples/usart/irda/src/at32f415_int.c index e27a2e9..29e2a45 100644 --- a/project/at_start_f415/examples/usart/irda/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/irda/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/irda/src/main.c b/project/at_start_f415/examples/usart/irda/src/main.c index 266ac68..b6a60c1 100644 --- a/project/at_start_f415/examples/usart/irda/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/polling/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/polling/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/polling/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/polling/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/polling/inc/at32f415_int.h b/project/at_start_f415/examples/usart/polling/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/polling/readme.txt b/project/at_start_f415/examples/usart/polling/readme.txt index 7cb961b..3048cce 100644 --- a/project/at_start_f415/examples/usart/polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/polling/src/at32f415_clock.c b/project/at_start_f415/examples/usart/polling/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/polling/src/at32f415_int.c b/project/at_start_f415/examples/usart/polling/src/at32f415_int.c index fb36aa8..8707ea9 100644 --- a/project/at_start_f415/examples/usart/polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/polling/src/main.c b/project/at_start_f415/examples/usart/polling/src/main.c index cdf2f70..d0b50d6 100644 --- a/project/at_start_f415/examples/usart/polling/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/printf/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/printf/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/printf/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/printf/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/printf/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/printf/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/printf/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/printf/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/printf/inc/at32f415_int.h b/project/at_start_f415/examples/usart/printf/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/printf/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/printf/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/printf/readme.txt b/project/at_start_f415/examples/usart/printf/readme.txt index 5619ca9..351b514 100644 --- a/project/at_start_f415/examples/usart/printf/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/printf/src/at32f415_clock.c b/project/at_start_f415/examples/usart/printf/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/printf/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/printf/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/printf/src/at32f415_int.c b/project/at_start_f415/examples/usart/printf/src/at32f415_int.c index b2ac05c..873c16d 100644 --- a/project/at_start_f415/examples/usart/printf/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/printf/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/printf/src/main.c b/project/at_start_f415/examples/usart/printf/src/main.c index fdb2443..229a885 100644 --- a/project/at_start_f415/examples/usart/printf/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" -#include "stdio.h" /** @addtogroup AT32F415_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_f415/examples/usart/receiver_mute/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/receiver_mute/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_int.h b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/receiver_mute/readme.txt b/project/at_start_f415/examples/usart/receiver_mute/readme.txt index a46dbc2..70caa19 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/receiver_mute/src/at32f415_clock.c b/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/receiver_mute/src/at32f415_int.c b/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_int.c index 9b81349..d2e3459 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/receiver_mute/src/main.c b/project/at_start_f415/examples/usart/receiver_mute/src/main.c index 4cd5c64..56c03a0 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/smartcard/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/smartcard/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/smartcard/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/smartcard/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/smartcard/inc/at32f415_int.h b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/smartcard/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/smartcard/inc/smartcard_config.h b/project/at_start_f415/examples/usart/smartcard/inc/smartcard_config.h index fe0dba5..0a7e06f 100644 --- a/project/at_start_f415/examples/usart/smartcard/inc/smartcard_config.h +++ b/project/at_start_f415/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_f415/examples/usart/smartcard/readme.txt b/project/at_start_f415/examples/usart/smartcard/readme.txt index 80574d8..0bea84d 100644 --- a/project/at_start_f415/examples/usart/smartcard/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/smartcard/src/at32f415_clock.c b/project/at_start_f415/examples/usart/smartcard/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/smartcard/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/smartcard/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/smartcard/src/at32f415_int.c b/project/at_start_f415/examples/usart/smartcard/src/at32f415_int.c index 7127876..905f43f 100644 --- a/project/at_start_f415/examples/usart/smartcard/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/smartcard/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/smartcard/src/main.c b/project/at_start_f415/examples/usart/smartcard/src/main.c index 76f376b..333b335 100644 --- a/project/at_start_f415/examples/usart/smartcard/src/main.c +++ b/project/at_start_f415/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 = 72 mhz / 18) */ + usart_irda_smartcard_division_set(SC_USART, 9); /* sc_usart guard time set to 2 bit */ usart_smartcard_guard_time_set(SC_USART, 0x2); diff --git a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/synchronous/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_int.h b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/synchronous/readme.txt b/project/at_start_f415/examples/usart/synchronous/readme.txt index 3bdf265..ac9a484 100644 --- a/project/at_start_f415/examples/usart/synchronous/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/synchronous/src/at32f415_clock.c b/project/at_start_f415/examples/usart/synchronous/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/synchronous/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/synchronous/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/synchronous/src/at32f415_int.c b/project/at_start_f415/examples/usart/synchronous/src/at32f415_int.c index 7f330a5..e0187ee 100644 --- a/project/at_start_f415/examples/usart/synchronous/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/synchronous/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/synchronous/src/main.c b/project/at_start_f415/examples/usart/synchronous/src/main.c index 7c25e3a..5d19f8f 100644 --- a/project/at_start_f415/examples/usart/synchronous/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_interrupt/readme.txt b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/readme.txt index 0840e16..a080485 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_int.c b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_int.c index a168fad..d3407d9 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_interrupt/src/main.c b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/main.c index 189c774..7ea7ce4 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_int.h b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_polling/readme.txt b/project/at_start_f415/examples/usart/transfer_by_dma_polling/readme.txt index 7a1a64f..74c8ecb 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/transfer_by_dma_polling/src/at32f415_clock.c b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_polling/src/at32f415_int.c b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_int.c index b755efc..bf37487 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_polling/src/main.c b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/main.c index 8c3d7b6..7db1fab 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/audio/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/audio/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/audio/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/audio/inc/audio_codec.h b/project/at_start_f415/examples/usb_device/audio/inc/audio_codec.h index 1e58d96..5bab9fc 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/audio_codec.h +++ b/project/at_start_f415/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 @@ -127,10 +127,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; @@ -144,16 +172,6 @@ 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); diff --git a/project/at_start_f415/examples/usb_device/audio/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/audio/inc/usb_conf.h index 918cfb5..63b9b25 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -69,7 +69,7 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 /** @@ -83,8 +83,8 @@ extern "C" { #define USBD_RX_SIZE 128 #define USBD_EP0_TX_SIZE 24 #define USBD_EP1_TX_SIZE 64 -#define USBD_EP2_TX_SIZE 4 -#define USBD_EP3_TX_SIZE 4 +#define USBD_EP2_TX_SIZE 16 +#define USBD_EP3_TX_SIZE 16 /** * @brief usb endpoint max num define diff --git a/project/at_start_f415/examples/usb_device/audio/mdk_v5/audio.uvprojx b/project/at_start_f415/examples/usb_device/audio/mdk_v5/audio.uvprojx index 312cf25..675de64 100644 --- a/project/at_start_f415/examples/usb_device/audio/mdk_v5/audio.uvprojx +++ b/project/at_start_f415/examples/usb_device/audio/mdk_v5/audio.uvprojx @@ -10,7 +10,7 @@ audio 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::ARMCC + 5060960::V5.06 update 7 (build 960)::.\ARMCC 0 diff --git a/project/at_start_f415/examples/usb_device/audio/readme.txt b/project/at_start_f415/examples/usb_device/audio/readme.txt index 54c9a15..a25d247 100644 --- a/project/at_start_f415/examples/usb_device/audio/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/audio/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/audio/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/audio/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/audio/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/audio/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/audio/src/at32f415_int.c index 87d0393..3f7a4cc 100644 --- a/project/at_start_f415/examples/usb_device/audio/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/audio/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/audio/src/audio_codec.c b/project/at_start_f415/examples/usb_device/audio/src/audio_codec.c index 7268fd4..20319ba 100644 --- a/project/at_start_f415/examples/usb_device/audio/src/audio_codec.c +++ b/project/at_start_f415/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 AT32F415_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; } /** @@ -441,14 +503,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; @@ -502,11 +577,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; @@ -520,11 +594,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; @@ -578,22 +651,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; + } } @@ -604,16 +725,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_f415/examples/usb_device/audio/src/main.c b/project/at_start_f415/examples/usb_device/audio/src/main.c index ede674f..553e268 100644 --- a/project/at_start_f415/examples/usb_device/audio/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_audio_hid/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_audio_hid/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_audio_hid/inc/audio_codec.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/audio_codec.h index 4ef90b5..bb80aea 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/audio_codec.h +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/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 @@ -127,10 +127,38 @@ extern "C" { /** @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; @@ -144,16 +172,6 @@ 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); diff --git a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/usb_conf.h index ce6f0ef..1e3353f 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/usb_conf.h +++ b/project/at_start_f415/examples/usb_device/composite_audio_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 @@ -69,7 +69,7 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 /** @@ -84,7 +84,7 @@ extern "C" { #define USBD_EP0_TX_SIZE 24 #define USBD_EP1_TX_SIZE 64 #define USBD_EP2_TX_SIZE 20 -#define USBD_EP3_TX_SIZE 4 +#define USBD_EP3_TX_SIZE 16 /** * @brief usb endpoint max num define diff --git a/project/at_start_f415/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvprojx b/project/at_start_f415/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvprojx index d4a2798..eb08045 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvprojx +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/mdk_v5/composite_audio_hid.uvprojx @@ -10,7 +10,7 @@ composite_audio_hid 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::ARMCC + 5060960::V5.06 update 7 (build 960)::.\ARMCC 0 @@ -137,7 +137,7 @@ 1 BIN\UL2CM3.DLL - + "" () diff --git a/project/at_start_f415/examples/usb_device/composite_audio_hid/readme.txt b/project/at_start_f415/examples/usb_device/composite_audio_hid/readme.txt index 496ccd4..0bdb177 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/readme.txt +++ b/project/at_start_f415/examples/usb_device/composite_audio_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_f415/examples/usb_device/composite_audio_hid/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_audio_hid/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_int.c index af004e1..7eba0b7 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_audio_hid/src/audio_codec.c b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/audio_codec.c index feacd76..6e86870 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/src/audio_codec.c +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/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 AT32F415_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; } /** @@ -441,14 +503,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; @@ -458,6 +533,8 @@ void codec_i2s_init(audio_codec_type *param) 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; @@ -500,11 +577,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 +594,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 +651,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 +725,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_f415/examples/usb_device/composite_audio_hid/src/main.c b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/main.c index 6a5322a..11f4fd1 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/src/main.c +++ b/project/at_start_f415/examples/usb_device/composite_audio_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 @@ -96,7 +96,7 @@ int main(void) report_buf[1] = (~report_buf[1]) & 0x1; class_send_report(&otg_core_struct.dev, report_buf, USBD_IN_MAXPACKET_SIZE); } - delay_ms(10); + delay_ms(100); } } diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h index 46dc1b9..58cf7b6 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -70,7 +70,7 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/readme.txt b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/readme.txt index 275c0ab..6900964 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_int.c index 976df52..04cd246 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_vcp_keyboard/src/main.c b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/main.c index 0031b6b..07bcaf5 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/main.c +++ b/project/at_start_f415/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 @@ -43,7 +43,7 @@ /* usb global struct define */ otg_core_type otg_core_struct; -uint8_t keyboard_send_flag; +__IO uint8_t keyboard_send_flag; uint8_t usb_buffer[256]; void usb_clock48m_select(usb_clk48_s clk_s); @@ -111,7 +111,7 @@ void EXINT0_IRQHandler(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) @@ -123,17 +123,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(&otg_core_struct.dev, 0x00); - break; + if(g_keyboard_tx_completed == 1) + { + g_keyboard_tx_completed = 0; + usb_hid_keyboard_send_char(&otg_core_struct.dev, 0x00); + break; + } } } + } @@ -147,6 +148,8 @@ int main(void) uint16_t data_len; uint32_t timeout; + + uint8_t send_zero_packet = 0; nvic_priority_group_config(NVIC_PRIORITY_GROUP_4); @@ -184,8 +187,18 @@ int main(void) /* get usb vcp receive data */ data_len = usb_vcp_get_rxdata(&otg_core_struct.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_f415/examples/usb_device/custom_hid/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/custom_hid/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/custom_hid/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/custom_hid/inc/usb_conf.h index a7eff3e..5986806 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -69,7 +69,7 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 /** diff --git a/project/at_start_f415/examples/usb_device/custom_hid/readme.txt b/project/at_start_f415/examples/usb_device/custom_hid/readme.txt index 8919d6c..5362e18 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/custom_hid/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/custom_hid/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_int.c index 3019f32..7e48461 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/custom_hid/src/main.c b/project/at_start_f415/examples/usb_device/custom_hid/src/main.c index 327c145..a1ea670 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/keyboard/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/keyboard/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/keyboard/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/keyboard/inc/usb_conf.h index ad95535..ed4bd98 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -70,7 +70,7 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 /** diff --git a/project/at_start_f415/examples/usb_device/keyboard/readme.txt b/project/at_start_f415/examples/usb_device/keyboard/readme.txt index 010f073..9672bd9 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/keyboard/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/keyboard/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_int.c index 5385e55..ec1ca4c 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/keyboard/src/main.c b/project/at_start_f415/examples/usb_device/keyboard/src/main.c index 1dce2a9..29790db 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/src/main.c +++ b/project/at_start_f415/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 @@ -43,7 +43,7 @@ /* usb global struct define */ otg_core_type otg_core_struct; -extern uint8_t hid_suspend_flag; +extern __IO uint8_t hid_suspend_flag; void usb_clock48m_select(usb_clk48_s clk_s); void keyboard_send_string(uint8_t *string, uint8_t len); void usb_gpio_config(void); @@ -59,7 +59,7 @@ void button_exint_init(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) @@ -71,17 +71,18 @@ void keyboard_send_string(uint8_t *string, uint8_t len) break; } } - } - /* send 0x00 */ - while(1) - { - if(g_u8tx_completed == 1) + /* send 0x00 */ + while(1) { - g_u8tx_completed = 0; - usb_hid_keyboard_send_char(&otg_core_struct.dev, 0x00); - break; + if(g_u8tx_completed == 1) + { + g_u8tx_completed = 0; + usb_hid_keyboard_send_char(&otg_core_struct.dev, 0x00); + break; + } } } + } diff --git a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/mouse/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/mouse/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/mouse/inc/usb_conf.h index b59d7c8..bc2043a 100644 --- a/project/at_start_f415/examples/usb_device/mouse/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -76,9 +76,8 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 -#define OTG_PIN_SOF_SOURCE GPIO_PINS_SOURCE8 /** diff --git a/project/at_start_f415/examples/usb_device/mouse/readme.txt b/project/at_start_f415/examples/usb_device/mouse/readme.txt index 071c284..106ed7c 100644 --- a/project/at_start_f415/examples/usb_device/mouse/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/mouse/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/mouse/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/mouse/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/mouse/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/mouse/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/mouse/src/at32f415_int.c index e6c2bbb..e3e5ef4 100644 --- a/project/at_start_f415/examples/usb_device/mouse/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/mouse/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/mouse/src/main.c b/project/at_start_f415/examples/usb_device/mouse/src/main.c index 9cab294..8306643 100644 --- a/project/at_start_f415/examples/usb_device/mouse/src/main.c +++ b/project/at_start_f415/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 @@ -42,8 +42,8 @@ /* usb global struct define */ otg_core_type otg_core_struct; -uint8_t press_mouse = 0; -extern uint8_t hid_suspend_flag; +__IO uint8_t press_mouse = 0; +extern __IO uint8_t hid_suspend_flag; void usb_clock48m_select(usb_clk48_s clk_s); void keyboard_send_string(uint8_t *string, uint8_t len); void usb_gpio_config(void); diff --git a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/msc/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/msc/inc/msc_diskio.h b/project/at_start_f415/examples/usb_device/msc/inc/msc_diskio.h index 3b27860..6194a84 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/msc_diskio.h +++ b/project/at_start_f415/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_f415/examples/usb_device/msc/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/msc/inc/usb_conf.h index e42472e..c5b81d5 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -70,7 +70,7 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 /** diff --git a/project/at_start_f415/examples/usb_device/msc/readme.txt b/project/at_start_f415/examples/usb_device/msc/readme.txt index 2b6452e..b72453c 100644 --- a/project/at_start_f415/examples/usb_device/msc/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/msc/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/msc/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/msc/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/msc/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/msc/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/msc/src/at32f415_int.c index 11c0d0f..2a5ee58 100644 --- a/project/at_start_f415/examples/usb_device/msc/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/msc/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/msc/src/main.c b/project/at_start_f415/examples/usb_device/msc/src/main.c index f5fdbff..34e715b 100644 --- a/project/at_start_f415/examples/usb_device/msc/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/msc/src/msc_diskio.c b/project/at_start_f415/examples/usb_device/msc/src/msc_diskio.c index a74a210..7bc6047 100644 --- a/project/at_start_f415/examples/usb_device/msc/src/msc_diskio.c +++ b/project/at_start_f415/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_f415/examples/usb_device/printer/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/printer/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/printer/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/printer/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/printer/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/printer/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/printer/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/printer/inc/usb_conf.h index d252619..b3d4e38 100644 --- a/project/at_start_f415/examples/usb_device/printer/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -70,7 +70,7 @@ extern "C" { #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 diff --git a/project/at_start_f415/examples/usb_device/printer/readme.txt b/project/at_start_f415/examples/usb_device/printer/readme.txt index 4588000..e839ea8 100644 --- a/project/at_start_f415/examples/usb_device/printer/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/printer/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/printer/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/printer/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/printer/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/printer/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/printer/src/at32f415_int.c index d4a93c9..7746d98 100644 --- a/project/at_start_f415/examples/usb_device/printer/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/printer/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/printer/src/main.c b/project/at_start_f415/examples/usb_device/printer/src/main.c index 782dcd7..e026ffd 100644 --- a/project/at_start_f415/examples/usb_device/printer/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/vcp_loopback/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/vcp_loopback/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/vcp_loopback/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/usb_conf.h index ddbcc7e..1b96ecc 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -69,7 +69,7 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 /** @@ -109,11 +109,6 @@ extern "C" { #define USBH_RX_FIFO_SIZE 128 #define USBH_NP_TX_FIFO_SIZE 96 #define USBH_P_TX_FIFO_SIZE 96 - -/* otg2 host fifo */ -#define USBH2_RX_FIFO_SIZE 128 -#define USBH2_NP_TX_FIFO_SIZE 96 -#define USBH2_P_TX_FIFO_SIZE 96 #endif /** diff --git a/project/at_start_f415/examples/usb_device/vcp_loopback/readme.txt b/project/at_start_f415/examples/usb_device/vcp_loopback/readme.txt index e8f62d4..988f4b3 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/vcp_loopback/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/vcp_loopback/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_int.c index c0ebda3..7eefc70 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/vcp_loopback/src/main.c b/project/at_start_f415/examples/usb_device/vcp_loopback/src/main.c index 69d2f8c..e10269c 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h index 071e33e..c624469 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h index 97ff578..60e7611 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/usb_conf.h index be2e567..ae47a72 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/usb_conf.h +++ b/project/at_start_f415/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 @@ -70,7 +70,7 @@ extern "C" { #define OTG_PIN_ID GPIO_PINS_10 #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 /** diff --git a/project/at_start_f415/examples/usb_device/virtual_msc_iap/readme.txt b/project/at_start_f415/examples/usb_device/virtual_msc_iap/readme.txt index 606b402..f18eec2 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/virtual_msc_iap/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_int.c index 1c935a2..1366d24 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/virtual_msc_iap/src/flash_fat16.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/flash_fat16.c index 94999bd..30f0e17 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/flash_fat16.c +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/src/main.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/main.c index 6944cf4..6d8ba46 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/src/msc_diskio.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/msc_diskio.c index 98075ef..f5224f6 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/msc_diskio.c +++ b/project/at_start_f415/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,7 +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 = (1024*1024 / FLASH_SECTOR_2K_SIZE); + *blk_nbr = (100*1024*1024 / FLASH_SECTOR_2K_SIZE); *blk_size = flash_iap.sector_size; break; case SPI_FLASH_LUN: diff --git a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/hid_demo/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_int.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/hid_demo/inc/usb_conf.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/usb_conf.h index 474c5b5..de88ba5 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/usb_conf.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/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 @@ -71,7 +71,7 @@ extern "C" { #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 diff --git a/project/at_start_f415/examples/usb_host/hid_demo/inc/usbh_user.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/usbh_user.h index 5cddea2..2a955cc 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/usbh_user.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/inc/usbh_user.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_user.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host user header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/hid_demo/readme.txt b/project/at_start_f415/examples/usb_host/hid_demo/readme.txt index ce90e6b..489ba0e 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/readme.txt +++ b/project/at_start_f415/examples/usb_host/hid_demo/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_f415/examples/usb_host/hid_demo/src/at32f415_clock.c b/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/hid_demo/src/at32f415_int.c b/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_int.c index e6c2bbb..e3e5ef4 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/hid_demo/src/main.c b/project/at_start_f415/examples/usb_host/hid_demo/src/main.c index 911418c..8f7e716 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/src/main.c +++ b/project/at_start_f415/examples/usb_host/hid_demo/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,53 +40,6 @@ * @{ */ -/* 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; -} - - /* usb global struct define */ otg_core_type otg_core_struct; void usb_clock48m_select(usb_clk48_s clk_s); @@ -138,34 +91,6 @@ void EXINT0_IRQHandler(void) } } -/** - * @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 main function. diff --git a/project/at_start_f415/examples/usb_host/hid_demo/src/usbh_user.c b/project/at_start_f415/examples/usb_host/hid_demo/src/usbh_user.c index 8c84c00..9efec4c 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/src/usbh_user.c +++ b/project/at_start_f415/examples/usb_host/hid_demo/src/usbh_user.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_user.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb user function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_clock.h index 86bb055..c9ce7d0 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/msc_only_fat32/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_int.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/msc_only_fat32/inc/usb_conf.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usb_conf.h index 474c5b5..de88ba5 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usb_conf.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/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 @@ -71,7 +71,7 @@ extern "C" { #define OTG_PIN_SOF_GPIO GPIOA -#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK #define OTG_PIN_SOF GPIO_PINS_8 diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usbh_user.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usbh_user.h index 5cddea2..2a955cc 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usbh_user.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usbh_user.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_user.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb host user header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/readme.txt b/project/at_start_f415/examples/usb_host/msc_only_fat32/readme.txt index 2a2c5dc..d48a099 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/readme.txt +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/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_f415/examples/usb_host/msc_only_fat32/src/at32f415_clock.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/msc_only_fat32/src/at32f415_int.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_int.c index e6c2bbb..e3e5ef4 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/msc_only_fat32/src/main.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/main.c index bee9fdb..70a519f 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/main.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/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 @@ -41,89 +41,12 @@ * @{ */ -/* 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; -} - - /* usb global struct define */ otg_core_type otg_core_struct; void usb_clock48m_select(usb_clk48_s clk_s); void usb_gpio_config(void); void usb_low_power_wakeup_config(void); - -/** - * @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 main function. * @param none diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_msc_diskio.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_msc_diskio.c index 7f2737b..091839b 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_msc_diskio.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_msc_diskio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_diskio.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb mass storage disk io ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_user.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_user.c index c284fa3..87eaaea 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_user.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_user.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_user.c - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief usb user function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_clock.h b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wdt/wdt_reset/inc/at32f415_conf.h b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_int.h b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_int.h +++ b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvoptx b/project/at_start_f415/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvoptx index 533bd24..4e75deb 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvoptx +++ b/project/at_start_f415/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvoptx @@ -270,6 +270,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c at32f415_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_f415/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvprojx b/project/at_start_f415/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvprojx index e4c8a53..d2cf063 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvprojx +++ b/project/at_start_f415/examples/wdt/wdt_reset/mdk_v5/wdt_rest.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_misc.c 1 diff --git a/project/at_start_f415/examples/wdt/wdt_reset/readme.txt b/project/at_start_f415/examples/wdt/wdt_reset/readme.txt index 472e74a..de2af48 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/readme.txt +++ b/project/at_start_f415/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_f415/examples/wdt/wdt_reset/src/at32f415_clock.c b/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_clock.c +++ b/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wdt/wdt_reset/src/at32f415_int.c b/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_int.c index c8707ec..1e14721 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_int.c +++ b/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wdt/wdt_reset/src/main.c b/project/at_start_f415/examples/wdt/wdt_reset/src/main.c index 816a596..2072c95 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/src/main.c +++ b/project/at_start_f415/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_f415/examples/wwdt/wwdt_reset/inc/at32f415_clock.h b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_clock.h index 9b6fb5c..ad17ecc 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wwdt/wwdt_reset/inc/at32f415_conf.h b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_conf.h index a37f2de..8440a21 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.0 - * @date 2021-11-26 + * @version v2.0.2 + * @date 2021-12-31 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_int.h b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_int.h index 6cc4ebd..bf6bf6f 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_int.h +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvoptx b/project/at_start_f415/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvoptx index 1cada45..ff3c8f5 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvoptx +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvoptx @@ -270,6 +270,18 @@ 0 0 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c at32f415_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_f415/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvprojx b/project/at_start_f415/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvprojx index 540d3f4..4568000 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvprojx +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/mdk_v5/wwdt_rest.uvprojx @@ -422,6 +422,11 @@ 1 ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_misc.c 1 diff --git a/project/at_start_f415/examples/wwdt/wwdt_reset/readme.txt b/project/at_start_f415/examples/wwdt/wwdt_reset/readme.txt index 5956d8f..3e4134e 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/readme.txt +++ b/project/at_start_f415/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_f415/examples/wwdt/wwdt_reset/src/at32f415_clock.c b/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_clock.c index d9b3bb0..4cb4ca7 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_clock.c +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wwdt/wwdt_reset/src/at32f415_int.c b/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_int.c index 987d764..0e27971 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_int.c +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wwdt/wwdt_reset/src/main.c b/project/at_start_f415/examples/wwdt/wwdt_reset/src/main.c index 9639eb1..0d2024e 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/src/main.c +++ b/project/at_start_f415/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_f415/templates/iar_v6.10/template.ewp b/project/at_start_f415/templates/iar_v6.10/template.ewp index f97a7aa..22a4df0 100644 --- a/project/at_start_f415/templates/iar_v6.10/template.ewp +++ b/project/at_start_f415/templates/iar_v6.10/template.ewp @@ -70,16 +70,16 @@ diff --git a/project/at_start_f415/templates/iar_v7.4/template.ewp b/project/at_start_f415/templates/iar_v7.4/template.ewp index 8ae8f30..7161d56 100644 --- a/project/at_start_f415/templates/iar_v7.4/template.ewp +++ b/project/at_start_f415/templates/iar_v7.4/template.ewp @@ -60,16 +60,16 @@