diff --git a/AT32F415_periph_lib_V2.0.4.chm b/AT32F415_periph_lib_V2.0.5.chm similarity index 62% rename from AT32F415_periph_lib_V2.0.4.chm rename to AT32F415_periph_lib_V2.0.5.chm index fa06f13..a200ace 100644 Binary files a/AT32F415_periph_lib_V2.0.4.chm and b/AT32F415_periph_lib_V2.0.5.chm differ diff --git a/document/AT32F415固件库BSP&Pack应用指南.pdf b/document/AT32F415固件库BSP&Pack应用指南.pdf index f30b340..28491c5 100644 Binary files a/document/AT32F415固件库BSP&Pack应用指南.pdf and b/document/AT32F415固件库BSP&Pack应用指南.pdf differ diff --git a/document/ReleaseNotes_AT32F415_Firmware_Library.pdf b/document/ReleaseNotes_AT32F415_Firmware_Library.pdf index c2d0d1c..e384dc4 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 a1340c0..06f9224 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 header file ************************************************************************** * Copyright notice & Disclaimer @@ -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 (0x04) /*!< [15:8] minor version */ +#define __AT32F415_LIBRARY_VERSION_MINOR (0x05) /*!< [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) | \ diff --git a/libraries/cmsis/cm4/device_support/at32f415_conf_template.h b/libraries/cmsis/cm4/device_support/at32f415_conf_template.h index b74102f..06d9eed 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2c8324b..3251bf1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 eb61889..01ab83d 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.4 -;* @date 2022-04-02 +;* @version v2.0.5 +;* @date 2022-05-20 ;* @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 f03783d..384738f 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.4 -;* @date 2022-04-02 +;* @version v2.0.5 +;* @date 2022-05-20 ;* @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 e0fed17..e824fe8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for cmsis cortex-m4 system source file ************************************************************************** * Copyright notice & Disclaimer @@ -81,6 +81,9 @@ void SystemInit (void) /* wait sclk switch status */ while(CRM->cfg_bit.sclksts != CRM_SCLK_HICK); + /* reset hexten, hextbyps, cfden and pllen bits */ + CRM->ctrl &= ~(0x010D0000U); + /* reset cfg register, include sclk switch, ahbdiv, apb1div, apb2div, adcdiv, clkout pllrcs, pllhextdiv, pllmult, usbdiv and pllrange bits */ CRM->cfg = 0; @@ -88,9 +91,6 @@ void SystemInit (void) /* reset pllfr, pllms, pllns and pllfref bits */ CRM->pll = (0x00001F10U); - /* reset hexten, hextbyps, cfden and pllen bits */ - CRM->ctrl &= ~(0x010D0000U); - /* reset clkout[3], usbbufs, hickdiv, clkoutdiv */ CRM->misc1 = 0x00100000; diff --git a/libraries/cmsis/cm4/device_support/system_at32f415.h b/libraries/cmsis/cm4/device_support/system_at32f415.h index db10439..af3a811 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief cmsis cortex-m4 system header file. ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/dsp/PrivateInclude/arm_sorting.h b/libraries/cmsis/dsp/PrivateInclude/arm_sorting.h index 88090ca..73d3771 100644 --- a/libraries/cmsis/dsp/PrivateInclude/arm_sorting.h +++ b/libraries/cmsis/dsp/PrivateInclude/arm_sorting.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_sorting.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief Private header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/cmsis/dsp/PrivateInclude/arm_vec_fft.h b/libraries/cmsis/dsp/PrivateInclude/arm_vec_fft.h index ac8312b..6d78fb5 100644 --- a/libraries/cmsis/dsp/PrivateInclude/arm_vec_fft.h +++ b/libraries/cmsis/dsp/PrivateInclude/arm_vec_fft.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_vec_fft.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief Private header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/cmsis/dsp/PrivateInclude/arm_vec_filtering.h b/libraries/cmsis/dsp/PrivateInclude/arm_vec_filtering.h index 1b08b15..7874edf 100644 --- a/libraries/cmsis/dsp/PrivateInclude/arm_vec_filtering.h +++ b/libraries/cmsis/dsp/PrivateInclude/arm_vec_filtering.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_vec_filtering.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief Private header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/cmsis/dsp/include/arm_math.h b/libraries/cmsis/dsp/include/arm_math.h index f471537..f063ff8 100644 --- a/libraries/cmsis/dsp/include/arm_math.h +++ b/libraries/cmsis/dsp/include/arm_math.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_math.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief Public header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/cmsis/dsp/include/arm_vec_math.h b/libraries/cmsis/dsp/include/arm_vec_math.h index 17c9772..b705d0a 100644 --- a/libraries/cmsis/dsp/include/arm_vec_math.h +++ b/libraries/cmsis/dsp/include/arm_vec_math.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_vec_math.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief Public header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/drivers/inc/at32f415_adc.h b/libraries/drivers/inc/at32f415_adc.h index 43b6a81..c7741c6 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b3f3a3..acf086e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 can header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_cmp.h b/libraries/drivers/inc/at32f415_cmp.h index 71f9560..f9f2502 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 46efff8..e64b43f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 aa2956e..e446de7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 30c7384..0f49f0f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 debug header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_def.h b/libraries/drivers/inc/at32f415_def.h index e966e9c..57568a6 100644 --- a/libraries/drivers/inc/at32f415_def.h +++ b/libraries/drivers/inc/at32f415_def.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_def.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 macros header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_dma.h b/libraries/drivers/inc/at32f415_dma.h index 5ab46c9..0d05884 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7b6e35e..d92eb0b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 31befbb..2a27c33 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 67d6156..975ce9a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 da29734..773b737 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 gpio header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_i2c.h b/libraries/drivers/inc/at32f415_i2c.h index 73ff525..3656bcd 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ec20dd2..ba52643 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 misc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_pwc.h b/libraries/drivers/inc/at32f415_pwc.h index 56df370..e003bb7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 pwc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_sdio.h b/libraries/drivers/inc/at32f415_sdio.h index 1863de6..3a5a27d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 f60f36f..2180108 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 spi header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_tmr.h b/libraries/drivers/inc/at32f415_tmr.h index 803ad41..36b4f1b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 tmr header file ************************************************************************** * Copyright notice & Disclaimer @@ -834,15 +834,9 @@ typedef struct #define TMR3 ((tmr_type *) TMR3_BASE) #define TMR4 ((tmr_type *) TMR4_BASE) #define TMR5 ((tmr_type *) TMR5_BASE) -#define TMR6 ((tmr_type *) TMR6_BASE) -#define TMR7 ((tmr_type *) TMR7_BASE) -#define TMR8 ((tmr_type *) TMR8_BASE) #define TMR9 ((tmr_type *) TMR9_BASE) #define TMR10 ((tmr_type *) TMR10_BASE) #define TMR11 ((tmr_type *) TMR11_BASE) -#define TMR12 ((tmr_type *) TMR12_BASE) -#define TMR13 ((tmr_type *) TMR13_BASE) -#define TMR14 ((tmr_type *) TMR14_BASE) /** @defgroup TMR_exported_functions * @{ diff --git a/libraries/drivers/inc/at32f415_usart.h b/libraries/drivers/inc/at32f415_usart.h index 93a31f8..f7aa248 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 f38538b..45aa22e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9434064..de9053f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 88b550d..919746e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 35dc3ca..ca4deb6 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the adc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_can.c b/libraries/drivers/src/at32f415_can.c index 7c752c0..e7b7184 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the can firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_cmp.c b/libraries/drivers/src/at32f415_cmp.c index 8361235..148e4f9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 eb4e6d2..d5f9223 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 fff912f..9bbd121 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the crm firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -61,6 +61,9 @@ void crm_reset(void) /* wait sclk switch status */ while(CRM->cfg_bit.sclksts != CRM_SCLK_HICK); + /* reset hexten, hextbyps, cfden and pllen bits */ + CRM->ctrl &= ~(0x010D0000U); + /* reset cfg register, include sclk switch, ahbdiv, apb1div, apb2div, adcdiv, clkout pllrcs, pllhextdiv, pllmult, usbdiv and pllrange bits */ CRM->cfg = 0; @@ -68,9 +71,6 @@ void crm_reset(void) /* reset pllfr, pllms, pllns and pllfref bits */ CRM->pll = (0x00001F10U); - /* reset hexten, hextbyps, cfden and pllen bits */ - CRM->ctrl &= ~(0x010D0000U); - /* reset clkout[3], usbbufs, hickdiv, clkoutdiv */ CRM->misc1 = 0x00100000; @@ -343,6 +343,7 @@ void crm_flag_clear(uint32_t flag) case CRM_LOWPOWER_RESET_FLAG: case CRM_ALL_RESET_FLAG: CRM->ctrlsts_bit.rstfc = TRUE; + while(CRM->ctrlsts_bit.rstfc == TRUE); break; case CRM_LICK_READY_INT_FLAG: CRM->clkint_bit.lickstblfc = TRUE; diff --git a/libraries/drivers/src/at32f415_debug.c b/libraries/drivers/src/at32f415_debug.c index 5f6866a..37cc830 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the debug firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_dma.c b/libraries/drivers/src/at32f415_dma.c index d5470da..47b8f6d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the dma firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_ertc.c b/libraries/drivers/src/at32f415_ertc.c index e18666f..ad15887 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the ertc firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -1460,13 +1460,7 @@ flag_status ertc_flag_get(uint32_t flag) */ void ertc_flag_clear(uint32_t flag) { - /* disable write protection */ - ertc_write_protect_disable(); - 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 142c390..47b162e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 69ab74c..cc89207 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4269592..a83e64d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e23ff7f..a046a0a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 bb38f07..7f41b51 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5b16bd1..ef801e1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the pwc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_sdio.c b/libraries/drivers/src/at32f415_sdio.c index 39eff5b..9fa3e6d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the sdio firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_spi.c b/libraries/drivers/src/at32f415_spi.c index 1692bde..42de64c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the spi firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_tmr.c b/libraries/drivers/src/at32f415_tmr.c index 98e7e47..3b2e16b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the tmr firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_usart.c b/libraries/drivers/src/at32f415_usart.c index d989caa..89c131f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 530ec17..7cac0cc 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the usb firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_wdt.c b/libraries/drivers/src/at32f415_wdt.c index c0076da..df13762 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ddfc77a..e0d714c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief contains all the functions for the wwdt firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/i2c_application_library/i2c_application.c b/middlewares/i2c_application_library/i2c_application.c index 5689a1a..b82a10a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief the driver library of the i2c peripheral ************************************************************************** * Copyright notice & Disclaimer @@ -278,7 +278,7 @@ i2c_status_type i2c_master_write_addr(i2c_handle_type *hi2c, uint16_t address, u /* generate start condtion */ i2c_start_generate(hi2c->i2cx); - /* wait for the start falg to be set */ + /* wait for the start flag to be set */ if(i2c_wait_flag(hi2c, I2C_STARTF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { hi2c->error_code = I2C_ERR_START; @@ -296,7 +296,7 @@ i2c_status_type i2c_master_write_addr(i2c_handle_type *hi2c, uint16_t address, u /* send slave 10-bit address header */ i2c_data_send(hi2c->i2cx, (uint8_t)((address & 0x0300) >> 7) | 0xF0); - /* wait for the addrh falg to be set */ + /* wait for the addrh flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDRHF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { hi2c->error_code = I2C_ERR_ADDR10; @@ -308,7 +308,7 @@ i2c_status_type i2c_master_write_addr(i2c_handle_type *hi2c, uint16_t address, u i2c_data_send(hi2c->i2cx, (uint8_t)(address & 0x00FF)); } - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { hi2c->error_code = I2C_ERR_ADDR; @@ -334,7 +334,7 @@ i2c_status_type i2c_master_read_addr(i2c_handle_type *hi2c, uint16_t address, ui /* generate start condtion */ i2c_start_generate(hi2c->i2cx); - /* wait for the start falg to be set */ + /* wait for the start flag to be set */ if(i2c_wait_flag(hi2c, I2C_STARTF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { hi2c->error_code = I2C_ERR_START; @@ -352,7 +352,7 @@ i2c_status_type i2c_master_read_addr(i2c_handle_type *hi2c, uint16_t address, ui /* send slave 10-bit address header */ i2c_data_send(hi2c->i2cx, (uint8_t)((address & 0x0300) >> 7) | 0xF0); - /* wait for the addrh falg to be set */ + /* wait for the addrh flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDRHF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { hi2c->error_code = I2C_ERR_ADDR10; @@ -363,7 +363,7 @@ i2c_status_type i2c_master_read_addr(i2c_handle_type *hi2c, uint16_t address, ui /* send slave address */ i2c_data_send(hi2c->i2cx, (uint8_t)(address & 0x00FF)); - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { hi2c->error_code = I2C_ERR_ADDR; @@ -377,7 +377,7 @@ i2c_status_type i2c_master_read_addr(i2c_handle_type *hi2c, uint16_t address, ui /* generate restart condtion */ i2c_start_generate(hi2c->i2cx); - /* wait for the start falg to be set */ + /* wait for the start flag to be set */ if(i2c_wait_flag(hi2c, I2C_STARTF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { hi2c->error_code = I2C_ERR_START; @@ -389,7 +389,7 @@ i2c_status_type i2c_master_read_addr(i2c_handle_type *hi2c, uint16_t address, ui i2c_data_send(hi2c->i2cx, (uint8_t)((address & 0x0300) >> 7) | 0xF1); } - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { hi2c->error_code = I2C_ERR_ADDR; @@ -417,7 +417,7 @@ i2c_status_type i2c_master_transmit(i2c_handle_type* hi2c, uint16_t address, uin hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -440,7 +440,7 @@ i2c_status_type i2c_master_transmit(i2c_handle_type* hi2c, uint16_t address, uin while(size > 0) { - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -454,7 +454,7 @@ i2c_status_type i2c_master_transmit(i2c_handle_type* hi2c, uint16_t address, uin size--; } - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -485,7 +485,7 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -497,7 +497,7 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ /* enable ack */ i2c_ack_enable(hi2c->i2cx, TRUE); - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable ack */ @@ -511,7 +511,7 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ while(size > 0) { - /* wait for the rdbf falg to be set */ + /* wait for the rdbf flag to be set */ if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_STOP, timeout) != I2C_OK) { /* disable ack */ @@ -525,7 +525,7 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ size--; } - /* wait for the stop falg to be set */ + /* wait for the stop flag to be set */ if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* disable ack */ @@ -560,7 +560,7 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -619,7 +619,7 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint /* 1 byte */ if(size == 1) { - /* wait for the rdbf falg to be set */ + /* wait for the rdbf flag to be set */ if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -635,7 +635,7 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint /* 2 bytes */ else if(size == 2) { - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -658,7 +658,7 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint /* 3 last bytes */ else { - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -674,7 +674,7 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint (*pdata++) = i2c_data_receive(hi2c->i2cx); size--; - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -697,7 +697,7 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint } else { - /* wait for the rdbf falg to be set */ + /* wait for the rdbf flag to be set */ if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -731,7 +731,7 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -743,7 +743,7 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 /* enable ack */ i2c_ack_enable(hi2c->i2cx, TRUE); - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable ack */ @@ -757,7 +757,7 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 if(hi2c->i2cx->oaddr1_bit.addr1mode == I2C_ADDRESS_MODE_10BIT) { - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable ack */ @@ -772,7 +772,7 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 while(size > 0) { - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* disable ack */ @@ -786,7 +786,7 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 size--; } - /* wait for the ackfail falg to be set */ + /* wait for the ackfail flag to be set */ if(i2c_wait_flag(hi2c, I2C_ACKFAIL_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_5; @@ -822,7 +822,7 @@ i2c_status_type i2c_master_transmit_int(i2c_handle_type* hi2c, uint16_t address, hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -844,7 +844,7 @@ i2c_status_type i2c_master_transmit_int(i2c_handle_type* hi2c, uint16_t address, i2c_addr_flag_clear(hi2c); /* enable interrupt */ - i2c_interrupt_enable(I2C1, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); + i2c_interrupt_enable(hi2c->i2cx, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); return I2C_OK; } @@ -869,7 +869,7 @@ i2c_status_type i2c_slave_receive_int(i2c_handle_type* hi2c, uint8_t* pdata, uin hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -881,7 +881,7 @@ i2c_status_type i2c_slave_receive_int(i2c_handle_type* hi2c, uint8_t* pdata, uin /* enable ack */ i2c_ack_enable(hi2c->i2cx, TRUE); - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_2; @@ -891,7 +891,7 @@ i2c_status_type i2c_slave_receive_int(i2c_handle_type* hi2c, uint8_t* pdata, uin i2c_addr_flag_clear(hi2c); /* enable interrupt */ - i2c_interrupt_enable(I2C1, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); + i2c_interrupt_enable(hi2c->i2cx, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); return I2C_OK; } @@ -917,7 +917,7 @@ i2c_status_type i2c_master_receive_int(i2c_handle_type* hi2c, uint16_t address, hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -970,7 +970,7 @@ i2c_status_type i2c_master_receive_int(i2c_handle_type* hi2c, uint16_t address, } /* enable interrupt */ - i2c_interrupt_enable(I2C1, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); + i2c_interrupt_enable(hi2c->i2cx, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); return I2C_OK; } @@ -995,7 +995,7 @@ i2c_status_type i2c_slave_transmit_int(i2c_handle_type* hi2c, uint8_t* pdata, ui hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1007,7 +1007,7 @@ i2c_status_type i2c_slave_transmit_int(i2c_handle_type* hi2c, uint8_t* pdata, ui /* enable ack */ i2c_ack_enable(hi2c->i2cx, TRUE); - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_2; @@ -1018,7 +1018,7 @@ i2c_status_type i2c_slave_transmit_int(i2c_handle_type* hi2c, uint8_t* pdata, ui if(hi2c->i2cx->oaddr1_bit.addr1mode == I2C_ADDRESS_MODE_10BIT) { - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable ack */ @@ -1032,7 +1032,7 @@ i2c_status_type i2c_slave_transmit_int(i2c_handle_type* hi2c, uint8_t* pdata, ui } /* enable interrupt */ - i2c_interrupt_enable(I2C1, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); + i2c_interrupt_enable(hi2c->i2cx, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); return I2C_OK; } @@ -1058,7 +1058,7 @@ i2c_status_type i2c_master_transmit_dma(i2c_handle_type* hi2c, uint16_t address, hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1111,7 +1111,7 @@ i2c_status_type i2c_slave_receive_dma(i2c_handle_type* hi2c, uint8_t* pdata, uin hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1129,7 +1129,7 @@ i2c_status_type i2c_slave_receive_dma(i2c_handle_type* hi2c, uint8_t* pdata, uin /* configure the dma channel */ i2c_dma_config(hi2c, hi2c->dma_rx_channel, pdata, size); - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable ack */ @@ -1168,7 +1168,7 @@ i2c_status_type i2c_master_receive_dma(i2c_handle_type* hi2c, uint16_t address, hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1244,7 +1244,7 @@ i2c_status_type i2c_slave_transmit_dma(i2c_handle_type* hi2c, uint8_t* pdata, ui hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1263,7 +1263,7 @@ i2c_status_type i2c_slave_transmit_dma(i2c_handle_type* hi2c, uint8_t* pdata, ui i2c_dma_config(hi2c, hi2c->dma_tx_channel, pdata, size); - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable ack */ @@ -1277,7 +1277,7 @@ i2c_status_type i2c_slave_transmit_dma(i2c_handle_type* hi2c, uint8_t* pdata, ui /* clear addr flag */ i2c_addr_flag_clear(hi2c); - /* wait for the addr7 falg to be set */ + /* wait for the addr7 flag to be set */ if(i2c_wait_flag(hi2c, I2C_ADDR7F_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable ack */ @@ -1314,7 +1314,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1335,7 +1335,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 /* clear addr flag */ i2c_addr_flag_clear(hi2c); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1349,7 +1349,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 while(size > 0) { - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1363,7 +1363,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 size--; } - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1396,7 +1396,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1420,7 +1420,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ /* clear addr flag */ i2c_addr_flag_clear(hi2c); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1432,7 +1432,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1488,7 +1488,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ /* 1 byte */ if(size == 1) { - /* wait for the rdbf falg to be set */ + /* wait for the rdbf flag to be set */ if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1504,7 +1504,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ /* 2 bytes */ else if(size == 2) { - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1527,7 +1527,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ /* 3 last bytes */ else { - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1543,7 +1543,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ (*pdata++) = i2c_data_receive(hi2c->i2cx); size--; - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1566,7 +1566,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ } else { - /* wait for the rdbf falg to be set */ + /* wait for the rdbf flag to be set */ if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1606,7 +1606,7 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1627,7 +1627,7 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui /* clear addr flag */ i2c_addr_flag_clear(hi2c); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1639,7 +1639,7 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1649,7 +1649,7 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui } /* enable interrupt */ - i2c_interrupt_enable(I2C1, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); + i2c_interrupt_enable(hi2c->i2cx, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); return I2C_OK; } @@ -1676,7 +1676,7 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1697,7 +1697,7 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin /* clear addr flag */ i2c_addr_flag_clear(hi2c); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1709,7 +1709,7 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1759,7 +1759,7 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin } /* enable interrupt */ - i2c_interrupt_enable(I2C1, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); + i2c_interrupt_enable(hi2c->i2cx, I2C_EVT_INT | I2C_DATA_INT | I2C_ERR_INT, TRUE); return I2C_OK; } @@ -1786,7 +1786,7 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1813,7 +1813,7 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui /* clear addr flag */ i2c_addr_flag_clear(hi2c); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1825,7 +1825,7 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1862,7 +1862,7 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin hi2c->timeout = timeout; hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ + /* wait for the busy flag to be reset */ if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; @@ -1892,7 +1892,7 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin /* clear addr flag */ i2c_addr_flag_clear(hi2c); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -1904,7 +1904,7 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tdbe falg to be set */ + /* wait for the tdbe flag to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* generate stop condtion */ @@ -2075,7 +2075,7 @@ void i2c_slave_tx_isr_int(i2c_handle_type* hi2c) /* disable interrupt */ i2c_interrupt_enable(hi2c->i2cx, I2C_DATA_INT | I2C_EVT_INT | I2C_ERR_INT, FALSE); - /* wait for the ackfail falg to be set */ + /* wait for the ackfail flag to be set */ hi2c->status = i2c_wait_flag(hi2c, I2C_ACKFAIL_FLAG, RESET, I2C_EVENT_CHECK_NONE, hi2c->timeout); /* clear ackfail flag */ @@ -2166,14 +2166,14 @@ void i2c_dma_tx_irq_handler(i2c_handle_type* hi2c) switch(hi2c->mode) { case I2C_DMA_MA_TX: - /* wait for the tdc falg to be set */ + /* wait for the tdc flag to be set */ hi2c->status = i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, hi2c->timeout); /* generate stop condtion */ i2c_stop_generate(hi2c->i2cx); break; case I2C_DMA_SLA_TX: - /* wait for the ackfail falg to be set */ + /* wait for the ackfail flag to be set */ hi2c->status = i2c_wait_flag(hi2c, I2C_ACKFAIL_FLAG, RESET, I2C_EVENT_CHECK_NONE, hi2c->timeout); /* clear ackfail flag */ @@ -2225,7 +2225,7 @@ void i2c_dma_rx_irq_handler(i2c_handle_type* hi2c) } break; case I2C_DMA_SLA_RX: - /* wait for the stop falg to be set */ + /* wait for the stop flag to be set */ hi2c->status = i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_NONE, hi2c->timeout); /* clear stop flag */ diff --git a/middlewares/i2c_application_library/i2c_application.h b/middlewares/i2c_application_library/i2c_application.h index 2793907..173f9d8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 78da09e..45e875e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6f7efc6..30cf99e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d899e63..64ee780 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 cbd97ad..e97cb18 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 981f092..a892e6e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5b79344..2ff0c76 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb host core header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/inc/usbh_ctrl.h b/middlewares/usb_drivers/inc/usbh_ctrl.h index 803beea..d192c2f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2e24e38..9c8d47f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usb_core.c b/middlewares/usb_drivers/src/usb_core.c index 664a684..2e9b8a3 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b3c2821..2e82b64 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb device driver ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usbd_int.c b/middlewares/usb_drivers/src/usbd_int.c index 824a7f1..e7a849c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb interrupt request ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usbd_sdr.c b/middlewares/usb_drivers/src/usbd_sdr.c index a0f94f9..8cf87f6 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 590d8ec..02660c9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb host driver ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usbh_ctrl.c b/middlewares/usb_drivers/src/usbh_ctrl.c index 6bbf72c..f82161a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb host control request ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usbh_int.c b/middlewares/usb_drivers/src/usbh_int.c index 400a8c9..bc3a942 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb host interrupt request ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_class.c b/middlewares/usbd_class/audio/audio_class.c index db41991..5b27662 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_class.h b/middlewares/usbd_class/audio/audio_class.h index e96d415..867b458 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_conf.h b/middlewares/usbd_class/audio/audio_conf.h index b048d35..9d2fe90 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio config ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_desc.c b/middlewares/usbd_class/audio/audio_desc.c index 1bac06d..b46aac5 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_desc.h b/middlewares/usbd_class/audio/audio_desc.h index 1c8eb08..89dab79 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 cba465b..1e1ff32 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio config ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.c b/middlewares/usbd_class/audio_hid/audio_hid_class.c index 995dde5..ff28805 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio class type ************************************************************************** * Copyright notice & Disclaimer @@ -887,6 +887,7 @@ static void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) paudio_hid->g_txhid_buff[i_index] = report[i_index]; } usbd_ept_send(pudev, USBD_AUHID_HID_IN_EPT, paudio_hid->g_txhid_buff, len); + break; default: break; } diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.h b/middlewares/usbd_class/audio_hid/audio_hid_class.h index bdc8eea..6aee66f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.c b/middlewares/usbd_class/audio_hid/audio_hid_desc.c index 4103c37..60a65e8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.h b/middlewares/usbd_class/audio_hid/audio_hid_desc.h index e8b193a..b00cf4e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb audio descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/cdc/cdc_class.c b/middlewares/usbd_class/cdc/cdc_class.c index cb17205..f358ccb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 73dcc4e..41614bd 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e166687..464c7a5 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb cdc device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/cdc/cdc_desc.h b/middlewares/usbd_class/cdc/cdc_desc.h index debf5d5..f433886 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 f51a52e..903afa3 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb cdc and keyboard class type ************************************************************************** * Copyright notice & Disclaimer 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 41aa78b..9bd4ab8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb cdc and keyboard class file ************************************************************************** * Copyright notice & Disclaimer 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 9dfe50f..02ced65 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb cdc and keyboard device descriptor ************************************************************************** * Copyright notice & Disclaimer 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 10a0df6..a571121 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb cdc and keyboard descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c new file mode 100644 index 0000000..56076bb --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c @@ -0,0 +1,579 @@ +/** + ************************************************************************** + * @file cdc_msc_class.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief usb cdc class type + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ +#include "usbd_core.h" +#include "cdc_msc_class.h" +#include "cdc_msc_desc.h" +// #include "msc_bot_scsi.h" + +/** @addtogroup AT32F415_middlewares_usbd_class + * @{ + */ + +/** @defgroup USB_cdc_class + * @brief usb device class cdc demo + * @{ + */ + +/** @defgroup USB_cdc_class_private_functions + * @{ + */ + +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); + +static usb_sts_type cdc_struct_init(cdc_msc_struct_type *pcdc); +extern void usb_usart_config( linecoding_type linecoding); +static void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len); + +static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type msc_class_setup_handler(void *udev, usb_setup_type *setup); + +linecoding_type linecoding = +{ + 115200, + 0, + 0, + 8 +}; + +/* cdc data struct */ +cdc_msc_struct_type cdc_msc_struct; + +/* usb device class handler */ +usbd_class_handler cdc_msc_class_handler = +{ + class_init_handler, + class_clear_handler, + class_setup_handler, + class_ept0_tx_handler, + class_ept0_rx_handler, + class_in_handler, + class_out_handler, + class_sof_handler, + class_event_handler, + &cdc_msc_struct //cdc_struct +}; +/** + * @brief initialize usb custom hid endpoint + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +static usb_sts_type class_init_handler(void *udev) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdcmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + /* init cdc struct */ + cdc_struct_init(pcdcmsc); + + /* open in endpoint */ + usbd_ept_open(pudev, USBD_CDC_INT_EPT, EPT_INT_TYPE, USBD_CDC_CMD_MAXPACKET_SIZE); + + /* open in endpoint */ + usbd_ept_open(pudev, USBD_CDC_BULK_IN_EPT, EPT_BULK_TYPE, USBD_CDC_MSC_IN_MAXPACKET_SIZE); + + /* open out endpoint */ + usbd_ept_open(pudev, USBD_CDC_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + + /* set out endpoint to receive status */ + usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, pcdcmsc->g_rx_buff, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + + /* open in endpoint */ + usbd_ept_open(pudev, USBD_MSC_BULK_IN_EPT, EPT_BULK_TYPE, USBD_CDC_MSC_IN_MAXPACKET_SIZE); + + /* open out endpoint */ + usbd_ept_open(pudev, USBD_MSC_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + + bot_scsi_init(udev); + + return status; +} + +/** + * @brief clear endpoint or other state + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +static usb_sts_type class_clear_handler(void *udev) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + + /* close in endpoint */ + usbd_ept_close(pudev, USBD_CDC_INT_EPT); + + /* close in endpoint */ + usbd_ept_close(pudev, USBD_CDC_BULK_IN_EPT); + + /* close out endpoint */ + usbd_ept_close(pudev, USBD_CDC_BULK_OUT_EPT); + + /* close in endpoint */ + usbd_ept_close(pudev, USBD_MSC_BULK_IN_EPT); + + /* close out endpoint */ + usbd_ept_close(pudev, USBD_MSC_BULK_OUT_EPT); + + return status; +} + +/** + * @brief usb device class setup request handler + * @param udev: to the structure of usbd_core_type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + switch(setup->bmRequestType & USB_REQ_RECIPIENT_MASK) + { + case USB_REQ_RECIPIENT_INTERFACE: + if(setup->wIndex == VCPMSC_MSC_INTERFACE) + { + msc_class_setup_handler(udev, setup); + } + else + { + cdc_class_setup_handler(pudev, setup); + } + break; + case USB_REQ_RECIPIENT_ENDPOINT: + if(setup->wIndex == (USBD_MSC_BULK_IN_EPT | USBD_MSC_BULK_OUT_EPT)) + { + msc_class_setup_handler(udev, setup); + } + else + { + cdc_class_setup_handler(pudev, setup); + } + break; + + } + return status; +} + +/** + * @brief usb device class setup request handler + * @param udev: to the structure of usbd_core_type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) + { + /* class request */ + case USB_REQ_TYPE_CLASS: + if(setup->wLength) + { + if(setup->bmRequestType & USB_REQ_DIR_DTH) + { + usb_vcp_cmd_process(udev, setup->bRequest, pcdc->g_cmd, setup->wLength); + usbd_ctrl_send(pudev, pcdc->g_cmd, setup->wLength); + } + else + { + pcdc->g_req = setup->bRequest; + pcdc->g_len = setup->wLength; + usbd_ctrl_recv(pudev, pcdc->g_cmd, pcdc->g_len); + + } + } + break; + /* standard request */ + case USB_REQ_TYPE_STANDARD: + switch(setup->bRequest) + { + case USB_STD_REQ_GET_DESCRIPTOR: + usbd_ctrl_unsupport(pudev); + break; + case USB_STD_REQ_GET_INTERFACE: + usbd_ctrl_send(pudev, (uint8_t *)&pcdc->alt_setting, 1); + break; + case USB_STD_REQ_SET_INTERFACE: + pcdc->alt_setting = setup->wValue; + break; + default: + break; + } + break; + default: + usbd_ctrl_unsupport(pudev); + break; + } + return status; +} + +/** + * @brief usb device class setup request handler + * @param udev: to the structure of usbd_core_type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +static usb_sts_type msc_class_setup_handler(void *udev, usb_setup_type *setup) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) + { + /* class request */ + case USB_REQ_TYPE_CLASS: + + switch(setup->bRequest) + { + case MSC_REQ_GET_MAX_LUN: + usbd_ctrl_send(pudev, (uint8_t *)&cdc_msc_struct.max_lun, 1); + break; + case MSC_REQ_BO_RESET: + bot_scsi_reset(udev); + usbd_ctrl_send_status(pudev); + break; + default: + usbd_ctrl_unsupport(pudev); + break; + + } + break; + /* standard request */ + case USB_REQ_TYPE_STANDARD: + + switch(setup->bRequest) + { + case USB_STD_REQ_GET_DESCRIPTOR: + usbd_ctrl_unsupport(pudev); + break; + case USB_STD_REQ_GET_INTERFACE: + usbd_ctrl_send(pudev, (uint8_t *)&pmsc->alt_setting, 1); + break; + case USB_STD_REQ_SET_INTERFACE: + pmsc->alt_setting = setup->wValue; + break; + case USB_STD_REQ_CLEAR_FEATURE: + usbd_ept_close(pudev, (uint8_t)setup->wIndex); + + if((setup->wIndex & 0x80) == 0x80) + { + usbd_flush_tx_fifo(pudev, setup->wIndex & 0x7F); + usbd_ept_open(pudev, (uint8_t)setup->wIndex, EPT_BULK_TYPE, USBD_CDC_MSC_IN_MAXPACKET_SIZE); + } + else + { + usbd_ept_open(pudev, (uint8_t)setup->wIndex, EPT_BULK_TYPE, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + } + bot_scsi_clear_feature(udev, setup->wIndex); + break; + default: + break; + } + break; + default: + usbd_ctrl_unsupport(pudev); + break; + } + return status; +} + +/** + * @brief usb device endpoint 0 in status stage complete + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +static usb_sts_type class_ept0_tx_handler(void *udev) +{ + usb_sts_type status = USB_OK; + + /* ...user code... */ + + return status; +} + +/** + * @brief usb device endpoint 0 out status stage complete + * @param udev: usb device core handler type + * @retval status of usb_sts_type + */ +static usb_sts_type class_ept0_rx_handler(void *udev) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint32_t recv_len = usbd_get_recv_len(pudev, 0); + /* ...user code... */ + if( pcdc->g_req == SET_LINE_CODING) + { + /* class process */ + usb_vcp_cmd_process(udev, pcdc->g_req, pcdc->g_cmd, recv_len); + } + + return status; +} + +/** + * @brief usb device transmision complete handler + * @param udev: to the structure of usbd_core_type + * @param ept_num: endpoint number + * @retval status of usb_sts_type + */ +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdcmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + usb_sts_type status = USB_OK; + + /* ...user code... + trans next packet data + */ + usbd_flush_tx_fifo(pudev, ept_num); + + if((ept_num & 0x7F) == (USBD_CDC_BULK_IN_EPT & 0x7F)) + { + pcdcmsc->g_tx_completed = 1; + } + if((ept_num & 0x7F) == (USBD_MSC_BULK_IN_EPT & 0x7F)) + { + bot_scsi_datain_handler(udev, ept_num); + } + + return status; +} + +/** + * @brief usb device endpoint receive data + * @param udev: to the structure of usbd_core_type + * @param ept_num: endpoint number + * @retval status of usb_sts_type + */ +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdcmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + + + if((ept_num & 0x7F) == (USBD_CDC_BULK_OUT_EPT & 0x7F)) + { + /* get endpoint receive data length */ + pcdcmsc->g_rxlen = usbd_get_recv_len(pudev, ept_num); + + /*set recv flag*/ + pcdcmsc->g_rx_completed = 1; + } + if((ept_num & 0x7F) == (USBD_MSC_BULK_OUT_EPT & 0x7F)) + { + bot_scsi_dataout_handler(udev, ept_num); + } + + return status; +} + +/** + * @brief usb device sof handler + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +static usb_sts_type class_sof_handler(void *udev) +{ + usb_sts_type status = USB_OK; + + /* ...user code... */ + + return status; +} + +/** + * @brief usb device event handler + * @param udev: to the structure of usbd_core_type + * @param event: usb device event + * @retval status of usb_sts_type + */ +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) +{ + usb_sts_type status = USB_OK; + switch(event) + { + case USBD_RESET_EVENT: + + /* ...user code... */ + + break; + case USBD_SUSPEND_EVENT: + + /* ...user code... */ + + break; + case USBD_WAKEUP_EVENT: + /* ...user code... */ + + break; + case USBD_INISOINCOM_EVENT: + break; + case USBD_OUTISOINCOM_EVENT: + break; + + default: + break; + } + return status; +} + +/** + * @brief usb device cdc init + * @param pcdc: to the structure of cdc_struct + * @retval status of usb_sts_type + */ +static usb_sts_type cdc_struct_init(cdc_msc_struct_type *pcdc) +{ + pcdc->g_tx_completed = 1; + pcdc->g_rx_completed = 0; + pcdc->alt_setting = 0; + pcdc->linecoding.bitrate = linecoding.bitrate; + pcdc->linecoding.data = linecoding.data; + pcdc->linecoding.format = linecoding.format; + pcdc->linecoding.parity = linecoding.parity; + return USB_OK; +} + +/** + * @brief usb device class rx data process + * @param udev: to the structure of usbd_core_type + * @param recv_data: receive buffer + * @retval receive data len + */ +uint16_t usb_vcp_get_rxdata(void *udev, uint8_t *recv_data) +{ + uint16_t i_index = 0; + uint16_t tmp_len = 0; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + if(pcdc->g_rx_completed == 0) + { + return 0; + } + pcdc->g_rx_completed = 0; + tmp_len = pcdc->g_rxlen; + for(i_index = 0; i_index < pcdc->g_rxlen; i_index ++) + { + recv_data[i_index] = pcdc->g_rx_buff[i_index]; + } + + usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, pcdc->g_rx_buff, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + + return tmp_len; +} + +/** + * @brief usb device class send data + * @param udev: to the structure of usbd_core_type + * @param send_data: send data buffer + * @param len: send length + * @retval error status + */ +error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len) +{ + error_status status = SUCCESS; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + if(pcdc->g_tx_completed) + { + pcdc->g_tx_completed = 0; + usbd_ept_send(pudev, USBD_CDC_BULK_IN_EPT, send_data, len); + } + else + { + status = ERROR; + } + return status; +} + +/** + * @brief usb device function + * @param udev: to the structure of usbd_core_type + * @param cmd: request number + * @param buff: request buffer + * @param len: buffer length + * @retval none + */ +static void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(cmd) + { + case SET_LINE_CODING: + pcdc->linecoding.bitrate = (uint32_t)(buff[0] | (buff[1] << 8) | (buff[2] << 16) | (buff[3] <<24)); + pcdc->linecoding.format = buff[4]; + pcdc->linecoding.parity = buff[5]; + pcdc->linecoding.data = buff[6]; +#ifdef USB_VIRTUAL_COMPORT + /* set hardware usart */ + usb_usart_config(pcdc->linecoding); +#endif + break; + + case GET_LINE_CODING: + buff[0] = (uint8_t)pcdc->linecoding.bitrate; + buff[1] = (uint8_t)(pcdc->linecoding.bitrate >> 8); + buff[2] = (uint8_t)(pcdc->linecoding.bitrate >> 16); + buff[3] = (uint8_t)(pcdc->linecoding.bitrate >> 24); + buff[4] = (uint8_t)(pcdc->linecoding.format); + buff[5] = (uint8_t)(pcdc->linecoding.parity); + buff[6] = (uint8_t)(pcdc->linecoding.data); + break; + + default: + break; + } +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.h b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.h new file mode 100644 index 0000000..5b73304 --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.h @@ -0,0 +1,338 @@ +/** + ************************************************************************** + * @file cdc_msc_class.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief usb cdc class file + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + + /* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __CDC_MSC_CLASS_H +#define __CDC_MSC_CLASS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "usb_std.h" +#include "usbd_core.h" + +/** @addtogroup AT32F415_middlewares_usbd_class + * @{ + */ + +/** @addtogroup USB_cdc_msc_class + * @{ + */ + +/** @defgroup USB_cdc_class_definition + * @{ + */ + +/** + * @brief usb cdc use endpoint define + */ +#define USBD_CDC_INT_EPT 0x82 +#define USBD_CDC_BULK_IN_EPT 0x83 +#define USBD_CDC_BULK_OUT_EPT 0x02 + +#define USBD_MSC_BULK_IN_EPT 0x81 +#define USBD_MSC_BULK_OUT_EPT 0x01 + +/** + * @brief usb cdc in and out max packet size define + */ +#define USBD_CDC_MSC_IN_MAXPACKET_SIZE 0x40 + +#define USBD_CDC_MSC_OUT_MAXPACKET_SIZE 0x40 +#define USBD_CDC_CMD_MAXPACKET_SIZE 0x08 + + + + +/** + * @} + */ + +/** @defgroup USB_cdc_class_exported_types + * @{ + */ + +/** @defgroup USB_msc_bot_scsi_definition + * @{ + */ + +#define MSC_SUPPORT_MAX_LUN 1 +#define MSC_MAX_DATA_BUF_LEN 4096 + +#define MSC_CMD_FORMAT_UNIT 0x04 +#define MSC_CMD_INQUIRY 0x12 +#define MSC_CMD_START_STOP 0x1B +#define MSC_CMD_MODE_SENSE6 0x1A +#define MSC_CMD_MODE_SENSE10 0x5A +#define MSC_CMD_ALLOW_MEDIUM_REMOVAL 0x1E +#define MSC_CMD_READ_10 0x28 +#define MSC_CMD_READ_12 0xA8 +#define MSC_CMD_READ_CAPACITY 0x25 +#define MSC_CMD_READ_FORMAT_CAPACITY 0x23 +#define MSC_CMD_REQUEST_SENSE 0x03 +#define MSC_CMD_TEST_UNIT 0x00 +#define MSC_CMD_VERIFY 0x2F +#define MSC_CMD_WRITE_10 0x2A +#define MSC_CMD_WRITE_12 0xAA +#define MSC_CMD_WRITE_VERIFY 0x2E + +#define MSC_REQ_GET_MAX_LUN 0xFE /*!< get max lun */ +#define MSC_REQ_BO_RESET 0xFF /*!< bulk only mass storage reset */ + +#define SET_LINE_CODING 0x20 +#define GET_LINE_CODING 0x21 + +#define CBW_CMD_LENGTH 31 +#define CBW_DCBWSIGNATURE 0x43425355 +#define CBW_BMCBWFLAGS_DIR_OUT 0x00 +#define CBW_BMCBWFLAGS_DIR_IN 0x80 + +#define CSW_CMD_LENGTH 13 +#define CSW_DCSWSIGNATURE 0x53425355 +#define CSW_BCSWSTATUS_PASS 0x00 +#define CSW_BCSWSTATUS_FAILED 0x01 +#define CSW_BCSWSTATUS_PHASE_ERR 0x02 + +#define MSC_STATE_MACHINE_CMD 0x00 +#define MSC_STATE_MACHINE_DATA_IN 0x01 +#define MSC_STATE_MACHINE_DATA_OUT 0x02 +#define MSC_STATE_MACHINE_SEND_DATA 0x03 +#define MSC_STATE_MACHINE_LAST_DATA 0x04 +#define MSC_STATE_MACHINE_STATUS 0x05 +#define MSC_STATE_MACHINE_FAILED 0x06 +#define MSC_STATE_MACHINE_IDLE 0x07 + +#define MSC_BOT_STATE_IDLE 0x00 +#define MSC_BOT_STATE_RECOVERY 0x01 +#define MSC_BOT_STATE_ERROR 0x02 + +#define REQ_SENSE_STANDARD_DATA_LEN 0x12 +#define SENSE_KEY_NO_SENSE 0x00 +#define SENSE_KEY_RECOVERED_ERROR 0x01 +#define SENSE_KEY_NOT_READY 0x02 +#define SENSE_KEY_MEDIUM_ERROR 0x03 +#define SENSE_KEY_HARDWARE_ERROR 0x04 +#define SENSE_KEY_ILLEGAL_REQUEST 0x05 +#define SENSE_KEY_UNIT_ATTENTION 0x06 +#define SENSE_KEY_DATA_PROTECT 0x07 +#define SENSE_KEY_BLANK_CHECK 0x08 +#define SENSE_KEY_VENDERO_SPECIFIC 0x09 +#define SENSE_KEY_ABORTED_COMMAND 0x0B +#define SENSE_KEY_VOLUME_OVERFLOW 0x0D +#define SENSE_KEY_MISCOMPARE 0x0E + + +#define INVALID_COMMAND 0x20 +#define INVALID_FIELED_IN_COMMAND 0x24 +#define PARAMETER_LIST_LENGTH_ERROR 0x1A +#define INVALID_FIELD_IN_PARAMETER_LIST 0x26 +#define ADDRESS_OUT_OF_RANGE 0x21 +#define MEDIUM_NOT_PRESENT 0x3A +#define MEDIUM_HAVE_CHANGED 0x28 + +#define SCSI_INQUIRY_DATA_LENGTH 36 + +/** + * @brief typical command block description + */ +typedef struct +{ + uint8_t opcode; + uint8_t lun; + uint32_t address; + uint8_t reserved1; + uint32_t alloc_length; + uint16_t reserved2; +}cbd_typical_type; + +/** + * @brief extended command block description + */ +typedef struct +{ + uint8_t opcode; + uint8_t lun; + uint32_t address; + uint8_t reserved1; + uint32_t alloc_length; + uint16_t reserved2; +}cbd_extended_type; + +/** + * @brief command block wrapper + */ +typedef struct +{ + uint32_t dCBWSignature; + uint32_t dCBWTage; + uint32_t dCBWDataTransferLength; + uint8_t bmCBWFlags; + uint8_t bCBWLUN; + uint8_t bCBWCBLength; + uint8_t CBWCB[16]; +}cbw_type; + +/** + * @brief command block wrapper + */ +typedef struct +{ + uint32_t dCSWSignature; + uint32_t dCSWTag; + uint32_t dCSWDataResidue; + uint32_t bCSWStatus; +}csw_type; + +/** + * @brief request sense standard data + */ +typedef struct +{ + uint8_t err_code; + uint8_t reserved1; + uint8_t sense_key; + uint32_t information; + uint8_t as_length; + uint32_t reserved2; + uint8_t asc; + uint8_t ascq; + uint32_t reserved3; +}sense_type; + + +typedef struct +{ + uint8_t msc_state; + uint8_t bot_status; + uint32_t max_lun; + + uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN]; + uint32_t blk_size[MSC_SUPPORT_MAX_LUN]; + + uint32_t blk_addr; + uint32_t blk_len; + + uint32_t data_len; + uint8_t data[MSC_MAX_DATA_BUF_LEN]; + + uint32_t alt_setting; + + cbw_type cbw_struct; + csw_type csw_struct; + +}msc_type; + +/** + * @brief usb cdc class struct + */ +typedef struct +{ + //used for CDC + uint32_t alt_setting; + uint8_t g_rx_buff[USBD_CDC_MSC_OUT_MAXPACKET_SIZE]; + uint8_t g_cmd[USBD_CDC_CMD_MAXPACKET_SIZE]; + uint8_t g_req; + uint16_t g_len, g_rxlen; + __IO uint8_t g_tx_completed, g_rx_completed; + linecoding_type linecoding; + + //used for MSC + uint8_t msc_state; + uint8_t bot_status; + uint32_t max_lun; + + uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN]; + uint32_t blk_size[MSC_SUPPORT_MAX_LUN]; + + uint32_t blk_addr; + uint32_t blk_len; + + uint32_t data_len; + uint8_t data[MSC_MAX_DATA_BUF_LEN]; + + cbw_type cbw_struct; + csw_type csw_struct; +}cdc_msc_struct_type; //cdc_struct_type; + + +/** + * @} + */ + +/** @defgroup USB_cdc_msc_class_exported_functions + * @{ + */ +extern usbd_class_handler cdc_msc_class_handler; //cdc_class_handler; +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); + +void bot_scsi_init(void *udev); +void bot_scsi_reset(void *udev); +void bot_scsi_datain_handler(void *pudev, uint8_t ept_num); +void bot_scsi_dataout_handler(void *pudev, uint8_t ept_num); +void bot_cbw_decode(void *udev); +void bot_scsi_send_data(void *udev, uint8_t *buffer, uint32_t len); +void bot_scsi_send_csw(void *udev, uint8_t status); +void bot_scsi_sense_code(void *udev, uint8_t sense_key, uint8_t asc); +usb_sts_type bot_scsi_check_address(void *udev, uint8_t lun, uint32_t blk_offset, uint32_t blk_count); +void bot_scsi_stall(void *udev); +usb_sts_type bot_scsi_cmd_process(void *udev); + +usb_sts_type bot_scsi_test_unit(void *udev, uint8_t lun); +usb_sts_type bot_scsi_inquiry(void *udev, uint8_t lun); +usb_sts_type bot_scsi_start_stop(void *udev, uint8_t lun); +usb_sts_type bot_scsi_allow_medium_removal(void *udev, uint8_t lun); +usb_sts_type bot_scsi_mode_sense6(void *udev, uint8_t lun); +usb_sts_type bot_scsi_mode_sense10(void *udev, uint8_t lun); +usb_sts_type bot_scsi_read10(void *udev, uint8_t lun); +usb_sts_type bot_scsi_capacity(void *udev, uint8_t lun); +usb_sts_type bot_scsi_format_capacity(void *udev, uint8_t lun); +usb_sts_type bot_scsi_request_sense(void *udev, uint8_t lun); +usb_sts_type bot_scsi_verify(void *udev, uint8_t lun); +usb_sts_type bot_scsi_write10(void *udev, uint8_t lun); +void bot_scsi_clear_feature(void *udev, uint8_t ept_num); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif + + + + diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c new file mode 100644 index 0000000..a7b0bb1 --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c @@ -0,0 +1,498 @@ +/** + ************************************************************************** + * @file cdc_msc_desc.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief usb cdc device descriptor + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ +#include "stdio.h" +#include "usb_std.h" +#include "usbd_sdr.h" +#include "usbd_core.h" +#include "cdc_msc_desc.h" + +/** @addtogroup AT32F415_middlewares_usbd_class + * @{ + */ + +/** @defgroup USB_cdc_msc_desc + * @brief usb device cdc msc descriptor + * @{ + */ + +/** @defgroup USB_cdc_msc_desc_private_functions + * @{ + */ + +#define USB_INTERFACE_ASSOCIATION_TYPE 0x0B + +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); + +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); +static void get_serial_num(void); +static uint8_t g_usbd_desc_buffer[256]; + +/** + * @brief device descriptor handler structure + */ +usbd_desc_handler cdc_msc_desc_handler = +{ + get_device_descriptor, + get_device_qualifier, + get_device_configuration, + get_device_other_speed, + get_device_lang_id, + get_device_manufacturer_string, + get_device_product_string, + get_device_serial_string, + get_device_interface_string, + get_device_config_string, +}; + +/** + * @brief usb device standard descriptor + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +{ + USB_DEVICE_DESC_LEN, /* bLength */ + USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ + 0x00, /* bcdUSB */ + 0x02, + 0xEF, /* bDeviceClass */ + 0x02, /* bDeviceSubClass */ + 0x01, /* bDeviceProtocol */ + USB_MAX_EP0_SIZE, /* bMaxPacketSize */ + LBYTE(USBD_CDC_MSC_VENDOR_ID), /* idVendor */ + HBYTE(USBD_CDC_MSC_VENDOR_ID), /* idVendor */ + LBYTE(USBD_CDC_MSC_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_CDC_MSC_PRODUCT_ID), /* idProduct */ + 0x00, /* bcdDevice rel. 2.00 */ + 0x02, + USB_MFC_STRING, /* Index of manufacturer string */ + USB_PRODUCT_STRING, /* Index of product string */ + USB_SERIAL_STRING, /* Index of serial number string */ + 1 /* bNumConfigurations */ +}; + +/** + * @brief usb configuration standard descriptor + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_CDC_MSC_CONFIG_DESC_SIZE] ALIGNED_TAIL = +{ + USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ + USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ + LBYTE(USBD_CDC_MSC_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_CDC_MSC_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + 0x03, /* bNumInterfaces: 3 interface */ + 0x01, /* bConfigurationValue: configuration value */ + 0x00, /* iConfiguration: index of string descriptor describing + the configuration */ + 0xC0, /* bmAttributes: self powered */ + 0x32, /* MaxPower 100 mA: this current is used for detecting vbus */ + + // IAD (Interface Association Descriptor) for MSC + 0x08, /* bLength */ + USB_INTERFACE_ASSOCIATION_TYPE, /* bDescriptorType */ + 0x00, /* bFirstInterface */ + 0x01, /* bInterfaceCount */ + 0x08, /* bFunctionClass */ + 0x06, /* bFunctionSubClass */ + 0x50, /* bFunctionProtocol */ + 0x00, /* iFunction (Index of string descriptor describing this function) */ + + // Configuration Descriptor for MSC + USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + VCPMSC_MSC_INTERFACE, /* bInterfaceNumber: number of interface */ + 0x00, /* bAlternateSetting: alternate set */ + 0x02, /* bNumEndpoints: number of endpoints */ + USB_CLASS_CODE_MSC, /* bInterfaceClass: msc class code */ + 0x06, /* bInterfaceSubClass: subclass code scsi */ + 0x50, /* bInterfaceProtocol: protocol code BBB */ + 0x00, /* iInterface: index of string descriptor */ + + USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_MSC_BULK_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_CDC_MSC_IN_MAXPACKET_SIZE), + HBYTE(USBD_CDC_MSC_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + 0x00, /* bInterval: interval for polling endpoint for data transfers */ + + USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_MSC_BULK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_CDC_MSC_OUT_MAXPACKET_SIZE), + HBYTE(USBD_CDC_MSC_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + 0x00, /* bInterval: interval for polling endpoint for data transfers */ + + // IAD (Interface Association Descriptor) for CDC + 0x08, /* bLength */ + USB_INTERFACE_ASSOCIATION_TYPE, /* bDescriptorType */ + 0x01, /* bFirstInterface */ + 0x02, /* bInterfaceCount */ + USB_CLASS_CODE_CDC, /* bFunctionClass */ + 0x02, /* bFunctionSubClass */ + 0x01, /* bFunctionProtocol */ + 0x00, /* iFunction (Index of string descriptor describing this function) */ + + // Configuration Descriptor for CDC + USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + VCPMSC_CDC_INTERFACE, /* bInterfaceNumber: number of interface */ + 0x00, /* bAlternateSetting: alternate set */ + 0x01, /* bNumEndpoints: number of endpoints */ + USB_CLASS_CODE_CDC, /* bInterfaceClass: CDC class code */ + 0x02, /* bInterfaceSubClass: subclass code, Abstract Control Model*/ + 0x01, /* bInterfaceProtocol: protocol code, AT Command */ + 0x00, /* iInterface: index of string descriptor */ + + 0x05, /* bFunctionLength: size of this descriptor in bytes */ + USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ + USBD_CDC_SUBTYPE_HEADER, /* bDescriptorSubtype: Header function Descriptor 0x00*/ + LBYTE(CDC_BCD_NUM), + HBYTE(CDC_BCD_NUM), /* bcdCDC: USB class definitions for communications */ + + 0x05, /* bFunctionLength: size of this descriptor in bytes */ + USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ + USBD_CDC_SUBTYPE_CMF, /* bDescriptorSubtype: Call Management function descriptor subtype 0x01 */ + 0x00, /* bmCapabilities: 0x00*/ + 0x01, /* bDataInterface: interface number of data class interface optionally used for call management */ + + 0x04, /* bFunctionLength: size of this descriptor in bytes */ + USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ + USBD_CDC_SUBTYPE_ACM, /* bDescriptorSubtype: Abstract Control Management functional descriptor subtype 0x02 */ + 0x02, /* bmCapabilities: Support Set_Line_Coding and Get_Line_Coding 0x02 */ + + 0x05, /* bFunctionLength: size of this descriptor in bytes */ + USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ + USBD_CDC_SUBTYPE_UFD, /* bDescriptorSubtype: Union Function Descriptor subtype 0x06 */ + 0x00, /* bControlInterface: The interface number of the communications or data class interface 0x00 */ + 0x01, /* bSubordinateInterface0: interface number of first subordinate interface in the union */ + + USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_CDC_INT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_CDC_CMD_MAXPACKET_SIZE), + HBYTE(USBD_CDC_CMD_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + CDC_HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + + + USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + VCPMSC_CDC_DATA_INTERFACE, /* bInterfaceNumber: number of interface */ + 0x00, /* bAlternateSetting: alternate set */ + 0x02, /* bNumEndpoints: number of endpoints */ + USB_CLASS_CODE_CDCDATA, /* bInterfaceClass: CDC-data class code */ + 0x00, /* bInterfaceSubClass: Data interface subclass code 0x00*/ + 0x00, /* bInterfaceProtocol: data class protocol code 0x00 */ + 0x00, /* iInterface: index of string descriptor */ + + USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_CDC_BULK_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_CDC_MSC_IN_MAXPACKET_SIZE), + HBYTE(USBD_CDC_MSC_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + 0x00, /* bInterval: interval for polling endpoint for data transfers */ + + USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_CDC_BULK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_CDC_MSC_OUT_MAXPACKET_SIZE), + HBYTE(USBD_CDC_MSC_OUT_MAXPACKET_SIZE),/* wMaxPacketSize: maximum packe size this endpoint */ + 0x00, /* bInterval: interval for polling endpoint for data transfers */ + + +}; + +/** + * @brief usb string lang id + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_CDC_SIZ_STRING_LANGID] ALIGNED_TAIL = +{ + USBD_CDC_SIZ_STRING_LANGID, + USB_DESCIPTOR_TYPE_STRING, + 0x09, + 0x04, +}; + +/** + * @brief usb string serial + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD static uint8_t g_string_serial[USBD_CDC_SIZ_STRING_SERIAL] ALIGNED_TAIL = +{ + USBD_CDC_SIZ_STRING_SERIAL, + USB_DESCIPTOR_TYPE_STRING, +}; + + +/* device descriptor */ +static usbd_desc_t device_descriptor = +{ + USB_DEVICE_DESC_LEN, + g_usbd_descriptor +}; + +/* config descriptor */ +static usbd_desc_t config_descriptor = +{ + USBD_CDC_MSC_CONFIG_DESC_SIZE, + g_usbd_configuration +}; + +/* langid descriptor */ +static usbd_desc_t langid_descriptor = +{ + USBD_CDC_SIZ_STRING_LANGID, + g_string_lang_id +}; + +/* serial descriptor */ +static usbd_desc_t serial_descriptor = +{ + USBD_CDC_SIZ_STRING_SERIAL, + g_string_serial +}; + +static usbd_desc_t vp_desc; + +/** + * @brief standard usb unicode convert + * @param string: source string + * @param unicode_buf: unicode buffer + * @retval length + */ +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +{ + uint16_t str_len = 0, id_pos = 2; + uint8_t *tmp_str = string; + + while(*tmp_str != '\0') + { + str_len ++; + unicode_buf[id_pos ++] = *tmp_str ++; + unicode_buf[id_pos ++] = 0x00; + } + + str_len = str_len * 2 + 2; + unicode_buf[0] = (uint8_t)str_len; + unicode_buf[1] = USB_DESCIPTOR_TYPE_STRING; + + return str_len; +} + +/** + * @brief usb int convert to unicode + * @param value: int value + * @param pbus: unicode buffer + * @param len: length + * @retval none + */ +static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len) +{ + uint8_t idx = 0; + + for( idx = 0 ; idx < len ; idx ++) + { + if( ((value >> 28)) < 0xA ) + { + pbuf[ 2 * idx] = (value >> 28) + '0'; + } + else + { + pbuf[2 * idx] = (value >> 28) + 'A' - 10; + } + + value = value << 4; + + pbuf[2 * idx + 1] = 0; + } +} + +/** + * @brief usb get serial number + * @param none + * @retval none + */ +static void get_serial_num(void) +{ + uint32_t serial0, serial1, serial2; + + serial0 = *(uint32_t*)MCU_ID1; + serial1 = *(uint32_t*)MCU_ID2; + serial2 = *(uint32_t*)MCU_ID3; + + serial0 += serial2; + + if (serial0 != 0) + { + usbd_int_to_unicode (serial0, &g_string_serial[2] ,8); + usbd_int_to_unicode (serial1, &g_string_serial[18] ,4); + } +} + +/** + * @brief get device descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_descriptor(void) +{ + return &device_descriptor; +} + +/** + * @brief get device qualifier + * @param none + * @retval usbd_desc + */ +static usbd_desc_t * get_device_qualifier(void) +{ + return NULL; +} + +/** + * @brief get config descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_configuration(void) +{ + return &config_descriptor; +} + +/** + * @brief get other speed descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_other_speed(void) +{ + return NULL; +} + +/** + * @brief get lang id descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_lang_id(void) +{ + return &langid_descriptor; +} + + +/** + * @brief get manufacturer descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_manufacturer_string(void) +{ + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CDC_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.descriptor = g_usbd_desc_buffer; + return &vp_desc; +} + +/** + * @brief get product descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_product_string(void) +{ + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CDC_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.descriptor = g_usbd_desc_buffer; + return &vp_desc; +} + +/** + * @brief get serial descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_serial_string(void) +{ + get_serial_num(); + return &serial_descriptor; +} + +/** + * @brief get interface descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_interface_string(void) +{ + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CDC_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.descriptor = g_usbd_desc_buffer; + return &vp_desc; +} + +/** + * @brief get device config descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_config_string(void) +{ + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CDC_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.descriptor = g_usbd_desc_buffer; + return &vp_desc; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.h b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.h new file mode 100644 index 0000000..7c6eb5d --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.h @@ -0,0 +1,113 @@ +/** + ************************************************************************** + * @file cdc_msc_desc.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief usb cdc descriptor header file + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __CDC_MSC_DESC_H +#define __CDC_MSC_DESC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "cdc_msc_class.h" +#include "usbd_core.h" + +/** @addtogroup AT32F415_middlewares_usbd_class + * @{ + */ + +/** @addtogroup USB_cdc_msc_desc + * @{ + */ + +/** @defgroup USB_cdc_desc_definition + * @{ + */ +/** + * @brief usb bcd number define + */ +#define CDC_BCD_NUM 0x0110 + +/** + * @brief usb vendor id and product id define + */ +#define USBD_CDC_MSC_VENDOR_ID 0x2E3C +#define USBD_CDC_MSC_PRODUCT_ID 0x5760 + +/** + * @brief usb descriptor size define + */ + +#define USBD_CDC_MSC_CONFIG_DESC_SIZE 106 +#define USBD_CDC_SIZ_STRING_LANGID 4 +#define USBD_CDC_SIZ_STRING_SERIAL 0x1A + +/** + * @brief usb string define(vendor, product configuration, interface) + */ +#define USBD_CDC_DESC_MANUFACTURER_STRING "Artery" +#define USBD_CDC_DESC_PRODUCT_STRING "AT32 Composite VCP and MSC " +#define USBD_CDC_DESC_CONFIGURATION_STRING "Composite VCP and MSC Config" +#define USBD_CDC_DESC_INTERFACE_STRING "Composite VCP and MSC Interface" + +/** + * @brief usb endpoint interval define + */ +#define CDC_HID_BINTERVAL_TIME 0xFF + +/** + * @brief usb interface define + */ +#define VCPMSC_MSC_INTERFACE 0x00 +#define VCPMSC_CDC_INTERFACE 0x01 +#define VCPMSC_CDC_DATA_INTERFACE 0x02 + + +/** + * @brief usb mcu id address deine + */ +#define MCU_ID1 (0x1FFFF7E8) +#define MCU_ID2 (0x1FFFF7EC) +#define MCU_ID3 (0x1FFFF7F0) +/** + * @} + */ + +extern usbd_desc_handler cdc_msc_desc_handler; + + +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c b/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c new file mode 100644 index 0000000..593345f --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c @@ -0,0 +1,827 @@ +/** + ************************************************************************** + * @file msc_bot_scsi.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief usb mass storage bulk-only transport and scsi command + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ +// #include "msc_bot_scsi.h" +#include "cdc_msc_class.h" +#include "msc_diskio.h" + +/** @addtogroup AT32F415_middlewares_usbd_class + * @{ + */ + +/** @defgroup USB_msc_bot_scsi + * @brief usb device class mass storage demo + * @{ + */ + +/** @defgroup USB_msc_bot_functions + * @{ + */ + + +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = { + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + +}; +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD sense_type sense_data ALIGNED_TAIL = +{ + 0x70, + 0x00, + SENSE_KEY_ILLEGAL_REQUEST, + 0x00000000, + 0x0A, + 0x00000000, + 0x20, + 0x00, + 0x00000000 +}; + +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t mode_sense6_data[8] ALIGNED_TAIL = +{ + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00 +}; + +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t mode_sense10_data[8] ALIGNED_TAIL = +{ + 0x00, + 0x06, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00 +}; +/** + * @brief initialize bulk-only transport and scsi + * @param udev: to the structure of usbd_core_type + * @retval none + */ +void bot_scsi_init(void *udev) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->msc_state = MSC_STATE_MACHINE_IDLE; + pmsc->bot_status = MSC_BOT_STATE_IDLE; + pmsc->max_lun = MSC_SUPPORT_MAX_LUN - 1; + + pmsc->csw_struct.dCSWSignature = CSW_DCSWSIGNATURE; + pmsc->csw_struct.dCSWDataResidue = 0; + pmsc->csw_struct.dCSWSignature = 0; + pmsc->csw_struct.dCSWTag = CSW_BCSWSTATUS_PASS; + + usbd_flush_tx_fifo(pudev, USBD_MSC_BULK_IN_EPT&0x7F); + + /* set out endpoint to receive status */ + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); +} + +/** + * @brief reset bulk-only transport and scsi + * @param udev: to the structure of usbd_core_type + * @retval none + */ +void bot_scsi_reset(void *udev) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->msc_state = MSC_STATE_MACHINE_IDLE; + pmsc->bot_status = MSC_BOT_STATE_RECOVERY; + pmsc->max_lun = MSC_SUPPORT_MAX_LUN - 1; + usbd_flush_tx_fifo(pudev, USBD_MSC_BULK_IN_EPT&0x7F); + + /* set out endpoint to receive status */ + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); +} + +/** + * @brief bulk-only transport data in handler + * @param udev: to the structure of usbd_core_type + * @param ept_num: endpoint number + * @retval none + */ +void bot_scsi_datain_handler(void *udev, uint8_t ept_num) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(pmsc->msc_state) + { + case MSC_STATE_MACHINE_DATA_IN: + if(bot_scsi_cmd_process(udev) != USB_OK) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_FAILED); + } + break; + + case MSC_STATE_MACHINE_LAST_DATA: + case MSC_STATE_MACHINE_SEND_DATA: + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_PASS); + break; + + default: + break; + } +} + +/** + * @brief bulk-only transport data out handler + * @param udev: to the structure of usbd_core_type + * @param ept_num: endpoint number + * @retval none + */ +void bot_scsi_dataout_handler(void *udev, uint8_t ept_num) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(pmsc->msc_state) + { + case MSC_STATE_MACHINE_IDLE: + bot_cbw_decode(udev); + break; + + case MSC_STATE_MACHINE_DATA_OUT: + if(bot_scsi_cmd_process(udev) != USB_OK) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_FAILED); + } + break; + } +} + +/** + * @brief bulk-only cbw decode + * @param udev: to the structure of usbd_core_type + * @retval none + */ +void bot_cbw_decode(void *udev) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + pmsc->csw_struct.dCSWTag = pmsc->cbw_struct.dCBWTage; + pmsc->csw_struct.dCSWDataResidue = pmsc->cbw_struct.dCBWDataTransferLength; + + /* check param */ + if((pmsc->cbw_struct.dCBWSignature != CBW_DCBWSIGNATURE) || + (usbd_get_recv_len(pudev, USBD_MSC_BULK_OUT_EPT) != CBW_CMD_LENGTH) + || (pmsc->cbw_struct.bCBWLUN > MSC_SUPPORT_MAX_LUN) || + (pmsc->cbw_struct.bCBWCBLength < 1) || (pmsc->cbw_struct.bCBWCBLength > 16)) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + pmsc->bot_status = MSC_BOT_STATE_ERROR; + bot_scsi_stall(udev); + } + else + { + if(bot_scsi_cmd_process(udev) != USB_OK) + { + bot_scsi_stall(udev); + } + else if((pmsc->msc_state != MSC_STATE_MACHINE_DATA_IN) && + (pmsc->msc_state != MSC_STATE_MACHINE_DATA_OUT) && + (pmsc->msc_state != MSC_STATE_MACHINE_LAST_DATA)) + { + if(pmsc->data_len == 0) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_PASS); + } + else if(pmsc->data_len > 0) + { + bot_scsi_send_data(udev, pmsc->data, pmsc->data_len); + } + } + } +} + +/** + * @brief send bot data + * @param udev: to the structure of usbd_core_type + * @param buffer: data buffer + * @param len: data len + * @retval none + */ +void bot_scsi_send_data(void *udev, uint8_t *buffer, uint32_t len) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint32_t data_len = MIN(len, pmsc->cbw_struct.dCBWDataTransferLength); + + pmsc->csw_struct.dCSWDataResidue -= data_len; + pmsc->csw_struct.bCSWStatus = CSW_BCSWSTATUS_PASS; + + pmsc->msc_state = MSC_STATE_MACHINE_SEND_DATA; + + usbd_ept_send(pudev, USBD_MSC_BULK_IN_EPT, + buffer, data_len); +} + +/** + * @brief send command status + * @param udev: to the structure of usbd_core_type + * @param status: csw status + * @retval none + */ +void bot_scsi_send_csw(void *udev, uint8_t status) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + pmsc->csw_struct.bCSWStatus = status; + pmsc->csw_struct.dCSWSignature = CSW_DCSWSIGNATURE; + pmsc->msc_state = MSC_STATE_MACHINE_IDLE; + + usbd_ept_send(pudev, USBD_MSC_BULK_IN_EPT, + (uint8_t *)&pmsc->csw_struct, CSW_CMD_LENGTH); + + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, + (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); +} + + +/** + * @brief send scsi sense code + * @param udev: to the structure of usbd_core_type + * @param sense_key: sense key + * @param asc: asc + * @retval none + */ +void bot_scsi_sense_code(void *udev, uint8_t sense_key, uint8_t asc) +{ + sense_data.sense_key = sense_key; + sense_data.asc = asc; +} + + +/** + * @brief check address + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @param blk_offset: blk offset address + * @param blk_count: blk number + * @retval usb_sts_type + */ +usb_sts_type bot_scsi_check_address(void *udev, uint8_t lun, uint32_t blk_offset, uint32_t blk_count) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + if((blk_offset + blk_count) > pmsc->blk_nbr[lun]) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, ADDRESS_OUT_OF_RANGE); + return USB_FAIL; + } + return USB_OK; +} + +/** + * @brief bot endpoint stall + * @param udev: to the structure of usbd_core_type + * @retval none + */ +void bot_scsi_stall(void *udev) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + if((pmsc->cbw_struct.dCBWDataTransferLength != 0) && + (pmsc->cbw_struct.bmCBWFlags == 0) && + pmsc->bot_status == MSC_BOT_STATE_IDLE) + { + usbd_set_stall(pudev, USBD_MSC_BULK_OUT_EPT); + } + usbd_set_stall(pudev, USBD_MSC_BULK_IN_EPT); + + if(pmsc->bot_status == MSC_BOT_STATE_ERROR) + { + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, + (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); + } +} + +/** + * @brief bulk-only transport scsi command test unit + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_test_unit(void *udev, uint8_t lun) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + if(pmsc->cbw_struct.dCBWDataTransferLength != 0) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + + pmsc->data_len = 0; + return status; +} + +/** + * @brief bulk-only transport scsi command inquiry + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_inquiry(void *udev, uint8_t lun) +{ + uint8_t *pdata; + uint32_t trans_len = 0; + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + if(pmsc->cbw_struct.CBWCB[1] & 0x01) + { + pdata = page00_inquiry_data; + trans_len = 5; + } + else + { + pdata = get_inquiry(lun); + if(pmsc->cbw_struct.dCBWDataTransferLength < SCSI_INQUIRY_DATA_LENGTH) + { + trans_len = pmsc->cbw_struct.dCBWDataTransferLength; + } + else + { + trans_len = SCSI_INQUIRY_DATA_LENGTH; + } + } + + pmsc->data_len = trans_len; + while(trans_len) + { + trans_len --; + pmsc->data[trans_len] = pdata[trans_len]; + } + return status; +} + +/** + * @brief bulk-only transport scsi command start stop + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_start_stop(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->data_len = 0; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command meidum removal + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_allow_medium_removal(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->data_len = 0; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command mode sense6 + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_mode_sense6(void *udev, uint8_t lun) +{ + uint8_t data_len = 8; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->data_len = 8; + while(data_len) + { + data_len --; + pmsc->data[data_len] = mode_sense6_data[data_len]; + }; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command mode sense10 + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_mode_sense10(void *udev, uint8_t lun) +{ + uint8_t data_len = 8; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->data_len = 8; + while(data_len) + { + data_len --; + pmsc->data[data_len] = mode_sense10_data[data_len]; + }; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command capacity + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_capacity(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *pdata = pmsc->data; + msc_disk_capacity(lun, &pmsc->blk_nbr[lun], &pmsc->blk_size[lun]); + + pdata[0] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 24); + pdata[1] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 16); + pdata[2] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 8); + pdata[3] = (uint8_t)((pmsc->blk_nbr[lun] - 1)); + + pdata[4] = (uint8_t)((pmsc->blk_size[lun]) >> 24); + pdata[5] = (uint8_t)((pmsc->blk_size[lun]) >> 16); + pdata[6] = (uint8_t)((pmsc->blk_size[lun]) >> 8); + pdata[7] = (uint8_t)((pmsc->blk_size[lun])); + + pmsc->data_len = 8; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command format capacity + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_format_capacity(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *pdata = pmsc->data; + + pdata[0] = 0; + pdata[1] = 0; + pdata[2] = 0; + pdata[3] = 0x08; + + msc_disk_capacity(lun, &pmsc->blk_nbr[lun], &pmsc->blk_size[lun]); + + pdata[4] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 24); + pdata[5] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 16); + pdata[6] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 8); + pdata[7] = (uint8_t)((pmsc->blk_nbr[lun] - 1)); + + pdata[8] = 0x02; + + pdata[9] = (uint8_t)((pmsc->blk_size[lun]) >> 16); + pdata[10] = (uint8_t)((pmsc->blk_size[lun]) >> 8); + pdata[11] = (uint8_t)((pmsc->blk_size[lun])); + + pmsc->data_len = 12; + + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command request sense + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_request_sense(void *udev, uint8_t lun) +{ + uint32_t trans_len = 0x12; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *pdata = pmsc->data; + uint8_t *sdata = (uint8_t *)&sense_data; + + while(trans_len) + { + trans_len --; + pdata[trans_len] = sdata[trans_len]; + } + + if(pmsc->cbw_struct.dCBWDataTransferLength < REQ_SENSE_STANDARD_DATA_LEN) + { + pmsc->data_len = pmsc->cbw_struct.dCBWDataTransferLength; + } + else + { + pmsc->data_len = REQ_SENSE_STANDARD_DATA_LEN; + } + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command verify + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_verify(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *cmd = pmsc->cbw_struct.CBWCB; + if((pmsc->cbw_struct.CBWCB[1] & 0x02) == 0x02) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_FIELED_IN_COMMAND); + return USB_FAIL; + } + + pmsc->blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; + pmsc->blk_len = cmd[7] << 8 | cmd[8]; + + if(bot_scsi_check_address(udev, lun, pmsc->blk_addr, pmsc->blk_len) != USB_OK) + { + return USB_FAIL; + } + pmsc->data_len = 0; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command read10 + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_read10(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *cmd = pmsc->cbw_struct.CBWCB; + uint32_t len; + + if(pmsc->msc_state == MSC_STATE_MACHINE_IDLE) + { + if((pmsc->cbw_struct.bmCBWFlags & 0x80) != 0x80) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + + pmsc->blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; + pmsc->blk_len = cmd[7] << 8 | cmd[8]; + + if(bot_scsi_check_address(udev, lun, pmsc->blk_addr, pmsc->blk_len) != USB_OK) + { + return USB_FAIL; + } + + pmsc->blk_addr *= pmsc->blk_size[lun]; + pmsc->blk_len *= pmsc->blk_size[lun]; + + if(pmsc->cbw_struct.dCBWDataTransferLength != pmsc->blk_len) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + pmsc->msc_state = MSC_STATE_MACHINE_DATA_IN; + } + pmsc->data_len = MSC_MAX_DATA_BUF_LEN; + + len = MIN(pmsc->blk_len, MSC_MAX_DATA_BUF_LEN); + if( msc_disk_read(lun, pmsc->blk_addr, pmsc->data, len) != USB_OK) + { + bot_scsi_sense_code(udev, SENSE_KEY_HARDWARE_ERROR, MEDIUM_NOT_PRESENT); + return USB_FAIL; + } + usbd_ept_send(pudev, USBD_MSC_BULK_IN_EPT, pmsc->data, len); + pmsc->blk_addr += len; + pmsc->blk_len -= len; + + pmsc->csw_struct.dCSWDataResidue -= len; + if(pmsc->blk_len == 0) + { + pmsc->msc_state = MSC_STATE_MACHINE_LAST_DATA; + } + + return USB_OK; +} + + +/** + * @brief bulk-only transport scsi command write10 + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_write10(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *cmd = pmsc->cbw_struct.CBWCB; + uint32_t len; + + if(pmsc->msc_state == MSC_STATE_MACHINE_IDLE) + { + if((pmsc->cbw_struct.bmCBWFlags & 0x80) == 0x80) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + + pmsc->blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; + pmsc->blk_len = cmd[7] << 8 | cmd[8]; + + if(bot_scsi_check_address(udev, lun, pmsc->blk_addr, pmsc->blk_len) != USB_OK) + { + return USB_FAIL; + } + + pmsc->blk_addr *= pmsc->blk_size[lun]; + pmsc->blk_len *= pmsc->blk_size[lun]; + + if(pmsc->cbw_struct.dCBWDataTransferLength != pmsc->blk_len) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + + pmsc->msc_state = MSC_STATE_MACHINE_DATA_OUT; + len = MIN(pmsc->blk_len, MSC_MAX_DATA_BUF_LEN); + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)pmsc->data, len); + + } + else + { + len = MIN(pmsc->blk_len, MSC_MAX_DATA_BUF_LEN); + if(msc_disk_write(lun, pmsc->blk_addr, pmsc->data, len) != USB_OK) + { + bot_scsi_sense_code(udev, SENSE_KEY_HARDWARE_ERROR, MEDIUM_NOT_PRESENT); + return USB_FAIL; + } + + pmsc->blk_addr += len; + pmsc->blk_len -= len; + + pmsc->csw_struct.dCSWDataResidue -= len; + + if(pmsc->blk_len == 0) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_PASS); + } + else + { + len = MIN(pmsc->blk_len, MSC_MAX_DATA_BUF_LEN); + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)pmsc->data, len); + } + } + return USB_OK; +} + +/** + * @brief clear feature + * @param udev: to the structure of usbd_core_type + * @param etp_num: endpoint number + * @retval status of usb_sts_type + */ +void bot_scsi_clear_feature(void *udev, uint8_t ept_num) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + if(pmsc->bot_status == MSC_BOT_STATE_ERROR) + { + usbd_set_stall(pudev, USBD_MSC_BULK_IN_EPT); + pmsc->bot_status = MSC_BOT_STATE_IDLE; + } + else if(((ept_num & 0x80) == 0x80) && (pmsc->bot_status != MSC_BOT_STATE_RECOVERY)) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_FAILED); + } +} + +/** + * @brief bulk-only transport scsi command process + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_cmd_process(void *udev) +{ + usb_sts_type status = USB_FAIL; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(pmsc->cbw_struct.CBWCB[0]) + { + case MSC_CMD_INQUIRY: + status = bot_scsi_inquiry(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_START_STOP: + status = bot_scsi_start_stop(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_MODE_SENSE6: + status = bot_scsi_mode_sense6(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_MODE_SENSE10: + status = bot_scsi_mode_sense10(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_ALLOW_MEDIUM_REMOVAL: + status = bot_scsi_allow_medium_removal(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_READ_10: + status = bot_scsi_read10(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_READ_CAPACITY: + status = bot_scsi_capacity(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_REQUEST_SENSE: + status = bot_scsi_request_sense(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_TEST_UNIT: + status = bot_scsi_test_unit(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_VERIFY: + status = bot_scsi_verify(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_WRITE_10: + status = bot_scsi_write10(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_READ_FORMAT_CAPACITY: + status = bot_scsi_format_capacity(udev, pmsc->cbw_struct.bCBWLUN); + break; + + default: + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + status = USB_FAIL; + break; + } + return status; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.c b/middlewares/usbd_class/custom_hid/custom_hid_class.c index 458bf2e..7869666 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb custom hid class type ************************************************************************** * Copyright notice & Disclaimer @@ -375,6 +375,7 @@ static void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) pcshid->g_txhid_buff[i_index] = report[i_index]; } usbd_ept_send(pudev, USBD_CUSTOM_HID_IN_EPT, pcshid->g_txhid_buff, len); + break; default: break; } diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.h b/middlewares/usbd_class/custom_hid/custom_hid_class.h index bcff881..03a715c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ba7812f..d467ba2 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb hid device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/custom_hid/custom_hid_desc.h b/middlewares/usbd_class/custom_hid/custom_hid_desc.h index 5b4eb7e..e591624 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9bef29e..baafe2a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 33808ad..506af2d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a64f793..9c0a214 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb hid iap device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.h b/middlewares/usbd_class/hid_iap/hid_iap_desc.h index 5240127..cb8c71d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 229aaf4..d5020f2 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb hid keyboard class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/keyboard/keyboard_class.h b/middlewares/usbd_class/keyboard/keyboard_class.h index b84b0bc..a9e4b40 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb hid keyboard header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.c b/middlewares/usbd_class/keyboard/keyboard_desc.c index 35feab4..1c63f0b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb hid keyboard device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.h b/middlewares/usbd_class/keyboard/keyboard_desc.h index 266a623..d79f8b0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 59f1c78..8885545 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb hid mouse class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/mouse/mouse_class.h b/middlewares/usbd_class/mouse/mouse_class.h index 6a5059c..4454775 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 fba424e..f1640f3 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb hid mouse device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/mouse/mouse_desc.h b/middlewares/usbd_class/mouse/mouse_desc.h index a2210d4..cbafe98 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4060ec6..6824551 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb mass storage bulk-only transport and scsi command ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.h b/middlewares/usbd_class/msc/msc_bot_scsi.h index 6a42ae9..9293779 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb mass storage bulk-only transport and scsi command header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_class.c b/middlewares/usbd_class/msc/msc_class.c index ac79c19..d41ca42 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb msc class type ************************************************************************** * Copyright notice & Disclaimer @@ -127,7 +127,7 @@ static 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, (uint8_t *)&msc_struct.max_lun, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pmsc->max_lun, 1); break; case MSC_REQ_BO_RESET: bot_scsi_reset(udev); diff --git a/middlewares/usbd_class/msc/msc_class.h b/middlewares/usbd_class/msc/msc_class.h index 178eed8..d69df0d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4b5253c..7118ced 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb msc device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_desc.h b/middlewares/usbd_class/msc/msc_desc.h index 0fdcc63..de6634a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a385d2e..2350066 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb printer class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_class.h b/middlewares/usbd_class/printer/printer_class.h index 1f6f22e..38411f8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 da73898..eb135de 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb printer device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_desc.h b/middlewares/usbd_class/printer/printer_desc.h index 83fd0f1..ec33c2d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 632e8df..f1da869 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb host hid class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_class.h b/middlewares/usbh_class/usbh_hid/usbh_hid_class.h index 3c9c9ba..07a9cb7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb host hid class header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c index f1264b7..8ea6391 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9380868..f35d4d5 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b8807eb..4a4b824 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9fa82b5..36f443d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8fb9169..b35a38a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb host msc bulk-only transfer and scsi type ************************************************************************** * Copyright notice & Disclaimer @@ -405,6 +405,7 @@ usb_sts_type usbh_msc_bot_scsi_get_inquiry(void *uhost, msc_bot_trans_type *bot { case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, MSC_INQUIRY_DATA_LEN, MSC_INQUIRY_CMD_LEN, MSC_CBW_FLAG_IN); + bot_trans->cbw.bCBWLUN = lun; usbh_cmd_inquiry(bot_trans, bot_trans->cbw.CBWCB, lun); bot_trans->cmd_state = CMD_STATE_WAIT; bot_trans->bot_state = BOT_STATE_SEND_CBW; @@ -443,6 +444,7 @@ usb_sts_type usbh_msc_bot_scsi_capacity(void *uhost, msc_bot_trans_type *bot_tra { case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, MSC_CAPACITY10_DATA_LEN, MSC_CAPACITY10_CMD_LEN, MSC_CBW_FLAG_IN); + bot_trans->cbw.bCBWLUN = lun; usbh_cmd_capacity10(bot_trans, bot_trans->cbw.CBWCB, lun); bot_trans->cmd_state = CMD_STATE_WAIT; bot_trans->bot_state = BOT_STATE_SEND_CBW; @@ -484,6 +486,7 @@ usb_sts_type usbh_msc_bot_scsi_test_unit_ready(void *uhost, msc_bot_trans_type * case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, MSC_TEST_UNIT_READY_DATA_LEN, MSC_TEST_UNIT_READY_CMD_LEN, MSC_CBW_FLAG_OUT); + bot_trans->cbw.bCBWLUN = lun; usbh_cmd_test_unit_ready(bot_trans, bot_trans->cbw.CBWCB, lun); bot_trans->cmd_state = CMD_STATE_WAIT; bot_trans->bot_state = BOT_STATE_SEND_CBW; @@ -522,6 +525,7 @@ usb_sts_type usbh_msc_bot_scsi_request_sense(void *uhost, msc_bot_trans_type *bo case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, MSC_REQUEST_SENSE_DATA_LEN, MSC_REQUEST_SENSE_CMD_LEN, MSC_CBW_FLAG_IN); + bot_trans->cbw.bCBWLUN = lun; usbh_cmd_requset_sense(bot_trans, bot_trans->cbw.CBWCB, lun); bot_trans->cmd_state = CMD_STATE_WAIT; bot_trans->bot_state = BOT_STATE_SEND_CBW; @@ -564,6 +568,7 @@ usb_sts_type usbh_msc_bot_scsi_write(void *uhost, msc_bot_trans_type *bot_trans, case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, write_len * 512, MSC_WRITE_CMD_LEN, MSC_CBW_FLAG_OUT); + bot_trans->cbw.bCBWLUN = lun; usbh_cmd_write(bot_trans, bot_trans->cbw.CBWCB, lun, write_len, address, write_data); bot_trans->cmd_state = CMD_STATE_WAIT; bot_trans->bot_state = BOT_STATE_SEND_CBW; @@ -606,6 +611,7 @@ usb_sts_type usbh_msc_bot_scsi_read(void *uhost, msc_bot_trans_type *bot_trans, case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, read_len * 512, MSC_READ_CMD_LEN, MSC_CBW_FLAG_IN); + bot_trans->cbw.bCBWLUN = lun; usbh_cmd_read(bot_trans, bot_trans->cbw.CBWCB, lun, read_len, address, read_data); bot_trans->cmd_state = CMD_STATE_WAIT; bot_trans->bot_state = BOT_STATE_SEND_CBW; 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 b1b85c0..8931459 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 374126c..37a8caa 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb host msc class type ************************************************************************** * Copyright notice & Disclaimer @@ -261,7 +261,6 @@ static usb_sts_type uhost_process_handler(void *uhost) USBH_DEBUG("Block num: %d ", pmsc->l_unit_n[pmsc->cur_lun].capacity.blk_nbr); USBH_DEBUG("Block size: %d Byte", pmsc->l_unit_n[pmsc->cur_lun].capacity.blk_size); pmsc->l_unit_n[pmsc->cur_lun].state = USBH_MSC_IDLE; - pmsc->state = USBH_MSC_IDLE; pmsc->cur_lun ++; } else if(status == USB_FAIL) @@ -289,6 +288,11 @@ static usb_sts_type uhost_process_handler(void *uhost) default: break; } + + } + else + { + pmsc->state = USBH_MSC_IDLE; } break; case USBH_MSC_IDLE: diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_class.h b/middlewares/usbh_class/usbh_msc/usbh_msc_class.h index f328f45..13c2782 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 45a8215..3b6f621 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief set of firmware functions to manage leds and push-button. * initialize delay function. ************************************************************************** @@ -267,7 +267,7 @@ void at32_led_off(led_type led) } /** - * @brief turns selected led tooggle. + * @brief turns selected led toggle. * @param led: specifies the led to be set off. * this parameter can be one of following parameters: * @arg LED2 diff --git a/project/at32f415_board/at32f415_board.h b/project/at32f415_board/at32f415_board.h index 56c09c3..9d958fa 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file for at-start board. set of firmware functions to * manage leds and push-button. initialize delay function. ************************************************************************** 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 437c33c..d53cbb9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,3 +11,4 @@ the adc1 internal channel17 to check vref value. the convert data as follow: - adc1_ordinary_value ---> adc1_channel_17 + for more detailed information. please refer to the application note document AN0115. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a5db277..2d0d516 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 634d693..3ddd4e6 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 2458280..3ae0d02 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -19,3 +19,4 @@ trigger source: - ordinary --> exint line11(pc11) - preempt --> exint line15(pa15) + for more detailed information. please refer to the application note document AN0115. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 91e5242..29c87cf 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a3e573e..9d705fb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 f852d68..03f8afe 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,3 +11,4 @@ the internal_temperature_sensor. the convert data as follow: - adc1_ordinary_value ---> adc1_channel_16 + for more detailed information. please refer to the application note document AN0115. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a32e2a2..322f18d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e967cc3..69d4ba1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 b0c56a0..d1ad3c9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,3 +13,4 @@ - adc1_ordinary_valuetab[n][0] ---> adc1_channel_4 - adc1_ordinary_valuetab[n][1] ---> adc1_channel_5 - adc1_ordinary_valuetab[n][2] ---> adc1_channel_6 + for more detailed information. please refer to the application note document AN0115. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d9a70a9..b203f65 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 83d2c7c..a8b8f22 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 7d19e28..d5fc15a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -17,3 +17,4 @@ - adc1_preempt_valuetab[n][0] ---> adc1_channel_7 - adc1_preempt_valuetab[n][1] ---> adc1_channel_8 - adc1_preempt_valuetab[n][2] ---> adc1_channel_9 + for more detailed information. please refer to the application note document AN0115. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ce5fc7b..dda8c28 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a4029f3..0dba261 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 319a776..272b823 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,4 @@ - adc1_ordinary_valuetab[1] ---> adc1_channel_5 - adc1_ordinary_valuetab[2] ---> adc1_channel_6 the voltage monitoring channel is: adc1_channel_5 + for more detailed information. please refer to the application note document AN0115. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 12c9671..6c068df 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 63ad50e..790b811 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 9732b2b..150095f 100644 --- a/project/at_start_f415/examples/can/communication_mode/readme.txt +++ b/project/at_start_f415/examples/can/communication_mode/readme.txt @@ -1,16 +1,18 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, shows how to use the - can communication mode. every 1s transmit one message and the led4 blink, - if receive a message, les2 blink(message id is 0x400) or led3 blink(message - id is not equal to 0x400). + this demo is based on the at-start board and at32-comm-ev, in this demo, + shows how to use the can communication mode. every 1s transmit one message + and the led4 blink, if receive a message, led2 blink(message id is 0x400) or led3 + blink(message id is not equal to 0x400). set-up - can tx ---> pb9 - - can rx ---> pb8 \ No newline at end of file + - can rx ---> pb8 + + for more detailed information. please refer to the application note document AN0095. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 434416a..2248543 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 46f5c1d..17b7a56 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -87,9 +87,9 @@ static void can_configuration(void) can_base_struct.mmssr_selection = CAN_SENDING_BY_ID; can_base_init(CAN1, &can_base_struct); - /* can baudrate, set baudrate = pclk/(baudrate_div *(3 + bts1_size + bts2_size)) */ - can_baudrate_struct.baudrate_div = 10; - can_baudrate_struct.rsaw_size = CAN_RSAW_1TQ; + /* can baudrate, set baudrate = pclk/(baudrate_div *(1 + bts1_size + bts2_size)) */ + can_baudrate_struct.baudrate_div = 6; + can_baudrate_struct.rsaw_size = CAN_RSAW_3TQ; can_baudrate_struct.bts1_size = CAN_BTS1_8TQ; can_baudrate_struct.bts2_size = CAN_BTS2_3TQ; can_baudrate_set(CAN1, &can_baudrate_struct); @@ -110,6 +110,8 @@ static void can_configuration(void) nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00); nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00); can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE); + + /* error interrupt enable */ can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE); can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE); } @@ -170,10 +172,11 @@ void CAN1_SE_IRQHandler(void) { err_index = CAN1->ests & 0x70; can_flag_clear(CAN1, CAN_ETR_FLAG); + /* error type is stuff error */ if(err_index == 0x00000010) { - can_reset(CAN1); - can_configuration(); + /* when stuff error occur: in order to ensure communication normally, + user must restart can or send a frame of highest priority message here */ } } } 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/can/filter/readme.txt b/project/at_start_f415/examples/can/filter/readme.txt index 8beae9b..78e12cf 100644 --- a/project/at_start_f415/examples/can/filter/readme.txt +++ b/project/at_start_f415/examples/can/filter/readme.txt @@ -1,17 +1,19 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, shows how to use - the can filter funciton. the can tool transmit 6 specified messages in total - (3 extended-id messages and 3 standard-id messages), when mcu receive one - expect id message, test_result will add one, if test success, only 4 filter - messages will be received, the three leds will toggle. + this demo is based on the at-start board and at32-comm-ev, in this demo, + shows how to use the can filter funciton. the can tool transmit 6 specified + messages in total (3 extended-id messages and 3 standard-id messages), + when mcu receive one expect id message, test_result will add one, if test + success, only 4 filter messages will be received, the three leds will toggle. set-up - can tx ---> pb9 - can rx ---> pb8 + + for more detailed information. please refer to the application note document AN0095. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 505aafa..372751d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 686c032..1c78ab2 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -100,9 +100,9 @@ static void can_configuration(void) can_base_struct.mmssr_selection = CAN_SENDING_BY_ID; can_base_init(CAN1, &can_base_struct); - /* can baudrate, set baudrate = pclk/(baudrate_div *(3 + bts1_size + bts2_size)) */ - can_baudrate_struct.baudrate_div = 10; - can_baudrate_struct.rsaw_size = CAN_RSAW_1TQ; + /* can baudrate, set baudrate = pclk/(baudrate_div *(1 + bts1_size + bts2_size)) */ + can_baudrate_struct.baudrate_div = 6; + can_baudrate_struct.rsaw_size = CAN_RSAW_3TQ; can_baudrate_struct.bts1_size = CAN_BTS1_8TQ; can_baudrate_struct.bts2_size = CAN_BTS2_3TQ; can_baudrate_set(CAN1, &can_baudrate_struct); @@ -135,6 +135,8 @@ static void can_configuration(void) nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00); nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00); can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE); + + /* error interrupt enable */ can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE); can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE); } @@ -292,10 +294,11 @@ void CAN1_SE_IRQHandler(void) { err_index = CAN1->ests & 0x70; can_flag_clear(CAN1, CAN_ETR_FLAG); + /* error type is stuff error */ if(err_index == 0x00000010) { - can_reset(CAN1); - can_configuration(); + /* when stuff error occur: in order to ensure communication normally, + user must restart can or send a frame of highest priority message here */ } } } 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 f6952b9..fbe2906 100644 --- a/project/at_start_f415/examples/can/loopback_mode/readme.txt +++ b/project/at_start_f415/examples/can/loopback_mode/readme.txt @@ -1,17 +1,19 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, shows how to use - the can loopback mode. every 1s transmit one message and the led4 blink, if - the message can be received, led2 blink. + this demo is based on the at-start board and at32-comm-ev, in this demo, + shows how to use the can loopback mode. every 1s transmit one message + and the led4 blink, if the message can be received, led2 blink. set-up - can tx ---> pb9 - can rx ---> pb8 + for more detailed information. please refer to the application note document AN0095. + 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 dd19578..7c6d78b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 514ade6..39a1c28 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -87,9 +87,9 @@ static void can_configuration(void) can_base_struct.mmssr_selection = CAN_SENDING_BY_ID; can_base_init(CAN1, &can_base_struct); - /* can baudrate, set baudrate = pclk/(baudrate_div *(3 + bts1_size + bts2_size)) */ - can_baudrate_struct.baudrate_div = 10; - can_baudrate_struct.rsaw_size = CAN_RSAW_1TQ; + /* can baudrate, set baudrate = pclk/(baudrate_div *(1 + bts1_size + bts2_size)) */ + can_baudrate_struct.baudrate_div = 6; + can_baudrate_struct.rsaw_size = CAN_RSAW_3TQ; can_baudrate_struct.bts1_size = CAN_BTS1_8TQ; can_baudrate_struct.bts2_size = CAN_BTS2_3TQ; can_baudrate_set(CAN1, &can_baudrate_struct); @@ -110,6 +110,8 @@ static void can_configuration(void) nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00); nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00); can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE); + + /* error interrupt enable */ can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE); can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE); } @@ -168,10 +170,11 @@ void CAN1_SE_IRQHandler(void) { err_index = CAN1->ests & 0x70; can_flag_clear(CAN1, CAN_ETR_FLAG); + /* error type is stuff error */ if(err_index == 0x00000010) { - can_reset(CAN1); - can_configuration(); + /* when stuff error occur: in order to ensure communication normally, + user must restart can or send a frame of highest priority message here */ } } } 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 af63011..d5fb505 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,12 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this example shows how to configure cmp to wakeup deep sleep mode, if wakeup from deep sleep mode, usart1 will print some messages(pa9). the cmp_out(pa6) will - output the result of compare too. + output the result of compare too.for more detailed information. please refer to + the application note document AN0046. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d7a0b45..bb4957b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 de6fd43..02339af 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cmp/output/readme.txt b/project/at_start_f415/examples/cmp/output/readme.txt index 9f3bddb..686e0ef 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,4 +10,5 @@ this example shows how to configure comp to get the comparison result, and inernally connected to the input channel 1 of the tmr1. by input pwm(3khz - 1mhz) to the cmp_in(pa1), the cmp_out(pa0) will output the result, and tmr1_ic1 will - also capture this cmp_out and print its pwm frequency through the usart1. + also capture this cmp_out and print its pwm frequency through the usart1.for more + detailed information. please refer to the application note document AN0046. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3f3df06..5cd5f67 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 52088a5..bd1ce72 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 7e33302..c6721cd 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,4 @@ this demo is based on the at-start board, in this demo, modify the variables by its bitband address and then read from bitband address. if the variables is not the expected, led4 blink every 1s, else using bitband make the led2 toggle. + for more detailed information. please refer to the application note document AN0083. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7e9edae..8e033c1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1f5faeb..5306f45 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_clock.h b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_clock.h index 6b86c06..ca77a1e 100644 --- a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_clock.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_conf.h b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_conf.h index 877b876..2044f04 100644 --- a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_int.h b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_int.h index 2884c5a..6210e55 100644 --- a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/readme.txt b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/readme.txt index 5cee9c8..efe6d55 100644 --- a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/readme.txt +++ b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/readme.txt @@ -1,12 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, demonstrates the use the maximum, minimum, mean, standard deviation, variance and matrix functions to calculate - statistical values of marks obtained in a class. \ No newline at end of file + statistical values of marks obtained in a class.for more detailed information. + please refer to the application note document AN0036. \ No newline at end of file diff --git a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/at32f415_clock.c b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/at32f415_clock.c index 8e9f03e..dddab9c 100644 --- a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_clock.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/at32f415_int.c b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/at32f415_int.c index 1e93125..b2b1367 100644 --- a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/at32f415_int.c +++ b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/main.c b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/main.c index 0f301d6..444dc95 100644 --- a/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/main.c +++ b/project/at_start_f415/examples/cortex_m4/cmsis_dsp/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 f4f23f3..e097458 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,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, systick interrupt - per milisecond and led2 fresh per 200 ms. + per milisecond and led2 fresh per 200 ms.for more detailed information. + please refer to the application note document AN0083. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3b1d4f7..c0fee76 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8946269..1168a80 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crc/calculation/readme.txt b/project/at_start_f415/examples/crc/calculation/readme.txt index a10ae54..f2a96ca 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,4 @@ this demo is based on the at-start board, in this demo, shows how to use crc calculation unit to get a crc code of a given buffer of data word(32-bit), if get a correct crc value led3 will be turn on, else led4 will be turn on. + for more detailed information. please refer to the application note document AN0109. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e17751e..89faf04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ad49794..77b3c3a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 b9280cd..6f4116f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,4 @@ this demo is based on the at-start board, in this demo, swith sclk to pll based hick when hext clock failure occured. pa8 output crm_clkout_pll_div_4 and led2 fresh per 200 ms. + for more detailed information. please refer to the application note document AN0117. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 da6cef2..a90dbd7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 73201d6..5205c6b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 826311f..d30b172 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,4 @@ this demo is based on the at-start board, in this demo, 150 mhz sysclk configed by crm_pll_config2 function. pa8 output crm_clkout_pll_div_4. led2 fresh per 100 ms. + for more detailed information. please refer to the application note document AN0117. \ No newline at end of file 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 7f3309d..35f97d8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a8a19e8..240e58f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5728e02..693a6fd 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 5628095..8d40235 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/readme.txt +++ b/project/at_start_f415/examples/crm/sysclk_switch/readme.txt @@ -1,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, swith sclk by pressed button. led4 toggle, pa8 output crm_clkout_pll_div_4. led2 fresh per 100 ms. + for more detailed information. please refer to the application note document AN0117. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a8a19e8..240e58f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 f253c39..0f33434 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/debug/tmr1/readme.txt b/project/at_start_f415/examples/debug/tmr1/readme.txt index 53a97af..f8543e9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 69648c7..fce0638 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9b9767b..0980c0d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 9b2ca4b..8f47786 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,4 +13,5 @@ channel1 is configured to transfer the contents of a 16-halfword data buffer stored in embedded sram memory to the gpiob. if transfer full data, the three leds will turn on, and dma2 enabled the flexible function. user can use logic - analyzer get waveform. + analyzer get waveform.for more detailed information. please refer to the + application note document AN0009. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d345de9..30fa032 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 0aa9dc9..f5c4811 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 344a097..e51fbf8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 dd0d983..bc1388c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 12c78e7..3419032 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 e8fbf70..63558a5 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/readme.txt +++ b/project/at_start_f415/examples/ertc/bpr_domain/readme.txt @@ -1,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to use - the bpr data registers. + the bpr data registers.for more detailed information. please refer to + the application note document AN0047. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d909c6c..d7b45bb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2ee79de..40410bb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/calendar/readme.txt b/project/at_start_f415/examples/ertc/calendar/readme.txt index 871c1a6..cae7723 100644 --- a/project/at_start_f415/examples/ertc/calendar/readme.txt +++ b/project/at_start_f415/examples/ertc/calendar/readme.txt @@ -1,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows to use the - calendar function and alarm function. + calendar function and alarm function.for more detailed information. please + refer to the application note document AN0047. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 14f4141..0ce7dd8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 bfcda7c..340696e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 a33b97d..dd37acf 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/readme.txt +++ b/project/at_start_f415/examples/ertc/lick_calibration/readme.txt @@ -1,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to use - timer to calibrate the lick clock. use usart1 to view calibrate information. \ No newline at end of file + timer to calibrate the lick clock. use usart1 to view calibrate information. + for more detailed information. please refer to the application note document AN0047. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3e37ffe..58f9903 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 dae7849..6e409d4 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/tamper/readme.txt b/project/at_start_f415/examples/ertc/tamper/readme.txt index dadcb8d..5189f41 100644 --- a/project/at_start_f415/examples/ertc/tamper/readme.txt +++ b/project/at_start_f415/examples/ertc/tamper/readme.txt @@ -1,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to use the - tamper detection, the rising edge of the pc13 pin triggers an tamper event. \ No newline at end of file + tamper detection, the rising edge of the pc13 pin triggers an tamper event. + for more detailed information. please refer to the application note document AN0047. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d8804a1..7563d6a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 bf5c5ff..dcf0d6d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 78943f1..44447a8 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/readme.txt +++ b/project/at_start_f415/examples/ertc/time_stamp/readme.txt @@ -1,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to use the time stamp, the rising edge of the pc13 pin triggers an time stamp event. + for more detailed information. please refer to the application note document AN0047. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 08a5985..9cc2653 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 512fbf7..81ed635 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 337ef36..3949691 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/readme.txt +++ b/project/at_start_f415/examples/ertc/wakeup_timer/readme.txt @@ -1,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to use - the wakeup timer. + the wakeup timer.for more detailed information. please refer to the application + note document AN0047. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d275090..0607af0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 178ceb5..16e760c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 18efb2b..4198c1a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,4 @@ this demo is based on the at-start board, in this demo, shows how to configure external interrupt lines. exint line (exint line0 pa0) are configured to generate an interrupt on each rising edge. in the interrupt routine a led2/3/4 is toggled. + for more detailed information. please refer to the application note document AN0104. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 690022a..622593f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ac9aa1b..ce087c1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 6c7b3ff..065f542 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -12,3 +12,4 @@ software trigger will be generate in tmr1 overflow interrupt. led2 toggle means tmr1 overflow interrupt respond. led3 and led4 toggle means exint line 4 interrupt respond. + for more detailed information. please refer to the application note document AN0104. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2cbe05c..8088dc7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1e54303..5bf2ed8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 bf8b327..ab9862c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief flash header file ************************************************************************** * Copyright notice & Disclaimer 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 ee858f9..13b57e0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 096414e..89d575a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1c02cb8..5d90e79 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b997b15..ec7bce4 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 13ed56d..792d147 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/readme.txt +++ b/project/at_start_f415/examples/gpio/led_toggle/readme.txt @@ -1,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, configure systick timer used for delay function. + for more detailed information. please refer to the application note document AN0119. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a8cf9c8..8fd0ae6 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e37894f..9981719 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 32ad4cc..1468c9e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,4 @@ pb2 is pressed the swj-dp will be disabled. the swj-dp pins are configured as output push-pull. the pa13(jtms/swdat), pa14(jtck/swclk), pa15(jtdi), pb3(jtdo) and pb4(jtrst) pins are toggled in an infinite loop. + for more detailed information. please refer to the application note document AN0119. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 02243e2..cd944c8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 62f0b8d..ae6eea7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 9a16c1a..5b48ae3 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 f12dfa9..2922f66 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3d0d7af..2d5ab99 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 096e689..4eafa03 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5dfa53b..9df7ef4 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e0b0373..f734c57 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 7e8b720..4bf6b87 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 bc92dca..bd048ac 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 eb76cc0..45d9b8c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/eeprom/readme.txt b/project/at_start_f415/examples/i2c/eeprom/readme.txt index f32fbe5..abe2d26 100644 --- a/project/at_start_f415/examples/i2c/eeprom/readme.txt +++ b/project/at_start_f415/examples/i2c/eeprom/readme.txt @@ -1,13 +1,13 @@ /** ************************************************************************** * @file eeprom/readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, use hardware i2c1 + this demo is based on the at-start board and AT32-Comm-EV, in this demo, use hardware i2c1 write or read data based on the memory device. if the communication is successful, led3 will turn on, if the communication fails, led2 will keep flashing. @@ -16,7 +16,7 @@ 2. press the slave button first, then press the master button to start communication. pin used: - 1. scl --- pb6 - 2. sda --- pb7 + 1. scl --- pb10 + 2. sda --- pb11 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7311430..970cf23 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer @@ -30,10 +30,10 @@ extern i2c_handle_type hi2cx; -#define I2Cx_DMA_TX_IRQHandler DMA1_Channel6_IRQHandler -#define I2Cx_DMA_RX_IRQHandler DMA1_Channel7_IRQHandler -#define I2Cx_EVT_IRQHandler I2C1_EVT_IRQHandler -#define I2Cx_ERR_IRQHandler I2C1_ERR_IRQHandler +#define I2Cx_DMA_TX_IRQHandler DMA1_Channel4_IRQHandler +#define I2Cx_DMA_RX_IRQHandler DMA1_Channel5_IRQHandler +#define I2Cx_EVT_IRQHandler I2C2_EVT_IRQHandler +#define I2Cx_ERR_IRQHandler I2C2_ERR_IRQHandler /** @addtogroup AT32F415_periph_examples * @{ 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 ea32235..b0f1a1d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -41,26 +41,26 @@ #define I2Cx_SPEED 100000 #define I2Cx_ADDRESS 0xA0 -#define I2Cx_PORT I2C1 -#define I2Cx_CLK CRM_I2C1_PERIPH_CLOCK +#define I2Cx_PORT I2C2 +#define I2Cx_CLK CRM_I2C2_PERIPH_CLOCK -#define I2Cx_SCL_PIN GPIO_PINS_6 +#define I2Cx_SCL_PIN GPIO_PINS_10 #define I2Cx_SCL_GPIO_PORT GPIOB #define I2Cx_SCL_GPIO_CLK CRM_GPIOB_PERIPH_CLOCK -#define I2Cx_SDA_PIN GPIO_PINS_7 +#define I2Cx_SDA_PIN GPIO_PINS_11 #define I2Cx_SDA_GPIO_PORT GPIOB #define I2Cx_SDA_GPIO_CLK CRM_GPIOB_PERIPH_CLOCK #define I2Cx_DMA_CLK CRM_DMA1_PERIPH_CLOCK -#define I2Cx_DMA_TX_CHANNEL DMA1_CHANNEL6 -#define I2Cx_DMA_TX_IRQn DMA1_Channel6_IRQn +#define I2Cx_DMA_TX_CHANNEL DMA1_CHANNEL4 +#define I2Cx_DMA_TX_IRQn DMA1_Channel4_IRQn -#define I2Cx_DMA_RX_CHANNEL DMA1_CHANNEL7 -#define I2Cx_DMA_RX_IRQn DMA1_Channel7_IRQn +#define I2Cx_DMA_RX_CHANNEL DMA1_CHANNEL5 +#define I2Cx_DMA_RX_IRQn DMA1_Channel5_IRQn -#define I2Cx_EVT_IRQn I2C1_EVT_IRQn -#define I2Cx_ERR_IRQn I2C1_ERR_IRQn +#define I2Cx_EVT_IRQn I2C2_EVT_IRQn +#define I2Cx_ERR_IRQn I2C2_ERR_IRQn #define BUF_SIZE 8 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 e71b50b..a4a0565 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -15,3 +15,5 @@ - pb12 <---> pa4(ws) - pb13 <---> pa5(ck) - pb15 <---> pa7(sd) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 acf5218..4dd7219 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2a548d8..9a41fae 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 84fe44f..d436aed 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -15,3 +15,5 @@ - pb12 <---> pa4(ws) - pb13 <---> pa5(ck) - pb15 <---> pa7(sd) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7a7ee31..893747c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 007ff9a..6a4aedd 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 ae8f13a..0e95d85 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -16,3 +16,5 @@ - pb12 <---> pa4(ws) - pb13 <---> pa5(ck) - pb15 <---> pa7(sd) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 fb8a561..a5d4427 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 c560bb1..4a3733c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 47f2206..ddb3d90 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,11 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to exit deepsleep mode by interrupt of rtc alarm. + + for more detailed information. please refer to the application note document AN0100. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 865504e..d1df27b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 21b4ee9..108f4ff 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 f1b2c7e..06b2589 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,3 +11,5 @@ deepsleep mode by interrupt of ertc tamper. the rising edge on pc13 will wake up deepsleep mode + + for more detailed information. please refer to the application note document AN0100. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 88fe695..d6d9285 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 50db89f..3c7e84e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 0128a13..9ac91a3 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,11 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to configure the power voltage monitoring using external interrupt line. + + for more detailed information. please refer to the application note document AN0100. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7ab0481..e5146f0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 087ad1e..d1b1e80 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 04ba849..0d155e7 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/readme.txt +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/readme.txt @@ -1,11 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to exit sleep mode by interrupt of timer2 overflow. + + for more detailed information. please refer to the application note document AN0100. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 18aa3b5..aa5175c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b7d8307..3265fb6 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 5822dcc..7661608 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/readme.txt +++ b/project/at_start_f415/examples/pwc/sleep_usart1/readme.txt @@ -1,11 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to exit sleep mode by interrupt of usart1 receive data buffer full. + + for more detailed information. please refer to the application note document AN0100. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 eb2466a..9a061e9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5e448d4..0189828 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 ca51823..241533a 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,11 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to exit standby mode by ertc alarm. + + for more detailed information. please refer to the application note document AN0100. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b754db4..eb4a373 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 427c52c..ae8918d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 f26c3f8..02908ec 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,11 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to exit standby mode by wake-up pin. + + for more detailed information. please refer to the application note document AN0100. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 969dae9..381c47c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 923dc11..21f74f8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 34417f0..6d72b47 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief this file contains all the functions prototypes for the sd/mmc * card at32_sdio driver firmware library. ************************************************************************** @@ -73,8 +73,8 @@ typedef enum typedef enum { /* sdio specific error defines ------------------------------------------*/ - SD_CMD_FAIL = 1, /*!< command response received (but crc check failed) */ - SD_DATA_FAIL = 2, /*!< data bock sent/received (crc check failed) */ + SD_CMD_FAIL = 1, /*!< command response received (but crc check error) */ + SD_DATA_FAIL = 2, /*!< data bock sent/received (crc check error) */ SD_CMD_RSP_TIMEOUT = 3, /*!< command response timeout */ SD_DATA_TIMEOUT = 4, /*!< data time out */ SD_TX_UNDERRUN = 5, /*!< transmit fifo under-run */ @@ -86,10 +86,10 @@ typedef enum SD_ERASE_SEQ_ERR = 11, /*!< an error in the sequence of erase command occurs. */ SD_INVALID_ERASE_PARAM = 12, /*!< an invalid selection for erase groups */ SD_WR_PROTECT_VIOLATION = 13, /*!< attempt to program a write protect block */ - SD_LOCK_UNLOCK_FAILED = 14, /*!< sequence or password error has been detected in unlock command or if there was an attempt to access a locked card */ - SD_CMD_CRC_FAILED = 15, /*!< crc check of the previous command failed */ + SD_LOCK_UNLOCK_ERROR = 14, /*!< sequence or password error has been detected in unlock command or if there was an attempt to access a locked card */ + SD_CMD_CRC_ERROR = 15, /*!< crc check of the previous command error */ SD_ILLEGAL_CMD = 16, /*!< command is not legal for the card state */ - SD_CARD_ECC_FAILED = 17, /*!< card internal ecc was applied but failed to correct the data */ + SD_CARD_ECC_ERROR = 17, /*!< card internal ecc was applied but error to correct the data */ SD_CARD_CONTROLLER_ERR = 18, /*!< internal card controller error */ SD_GENERAL_UNKNOWN_ERROR = 19, /*!< general or unknown error */ SD_STREAM_RD_UNDERRUN = 20, /*!< the card could not sustain data transfer in stream read operation. */ @@ -104,7 +104,7 @@ typedef enum SD_SWITCH_ERROR = 29, /*!< switch error */ SD_SDIO_DISABLED = 30, /*!< sdio disabled */ SD_SDIO_FUNC_BUSY = 31, /*!< function busy */ - SD_SDIO_FUNC_FAILED = 32, /*!< function failed */ + SD_SDIO_FUNC_ERROR = 32, /*!< function error */ SD_SDIO_UNKNOWN_FUNC = 33, /*!< unknown function */ /* standard error defines --------------------------------------------*/ @@ -359,10 +359,10 @@ typedef struct #define SD_OCR_ERASE_SEQ_ERR ((uint32_t)0x10000000) #define SD_OCR_INVALID_ERASE_PARAM ((uint32_t)0x08000000) #define SD_OCR_WR_PROTECT_VIOLATION ((uint32_t)0x04000000) -#define SD_OCR_LOCK_UNLOCK_FAILED ((uint32_t)0x01000000) -#define SD_OCR_CMD_CRC_FAILED ((uint32_t)0x00800000) +#define SD_OCR_LOCK_UNLOCK_ERROR ((uint32_t)0x01000000) +#define SD_OCR_CMD_CRC_ERROR ((uint32_t)0x00800000) #define SD_OCR_ILLEGAL_CMD ((uint32_t)0x00400000) -#define SD_OCR_CARD_ECC_FAILED ((uint32_t)0x00200000) +#define SD_OCR_CARD_ECC_ERROR ((uint32_t)0x00200000) #define SD_OCR_CARD_CONTROLLER_ERR ((uint32_t)0x00100000) #define SD_OCR_GENERAL_UNKNOWN_ERROR ((uint32_t)0x00080000) #define SD_OCR_STREAM_RD_UNDERRUN ((uint32_t)0x00040000) @@ -387,13 +387,13 @@ typedef struct */ #define SD_R6_GENERAL_UNKNOWN_ERROR ((uint32_t)0x00002000) #define SD_R6_ILLEGAL_CMD ((uint32_t)0x00004000) -#define SD_R6_CMD_CRC_FAILED ((uint32_t)0x00008000) +#define SD_R6_CMD_CRC_ERROR ((uint32_t)0x00008000) #define SD_VOLTAGE_WINDOW_SD ((uint32_t)0x80100000) #define SD_HIGH_CAPACITY ((uint32_t)0x40000000) #define SD_STD_CAPACITY ((uint32_t)0x00000000) #define SD_CHECK_PATTERN ((uint32_t)0x000001AA) #define SD_VOLTAGE_WINDOW_MMC ((uint32_t)0x80FF8000) -#define SD_MAX_VOLT_TRIAL ((uint32_t)0x0000FFFF) +#define SD_MAX_VOLT_TRIAL ((uint32_t)0x000000FF) #define SD_ALLZERO ((uint32_t)0x00000000) #define SD_WIDE_BUS_SUPPORT ((uint32_t)0x00040000) #define SD_SINGLE_BUS_SUPPORT ((uint32_t)0x00010000) 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 cccf550..bc7339c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -17,4 +17,5 @@ - sdio1_d2 pc10 ---> dat2 - sdio1_d3 pc11 ---> dat3 - sdio1_ck pc12 ---> clk - - sdio1_cmd pd2 ---> cmd \ No newline at end of file + - sdio1_cmd pd2 ---> cmd + for more detailed information. please refer to the application note document AN0105. \ No newline at end of file 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 bff1308..514aa75 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief this file provides a set of functions needed to manage the * sdio/mmc card memory. ************************************************************************** @@ -26,6 +26,7 @@ */ #include "at32_sdio.h" +#include "at32f415_board.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -73,6 +74,7 @@ sd_error_status_type sd_init(void) uint16_t clkdiv = 0; sd_error_status_type status = SD_OK; gpio_init_type gpio_init_struct = {0}; + uint8_t retry = 0; /* gpioc and gpiod periph clock enable */ crm_periph_clock_enable(CRM_GPIOC_PERIPH_CLOCK, TRUE); @@ -93,12 +95,17 @@ sd_error_status_type sd_init(void) gpio_init_struct.gpio_pins = GPIO_PINS_2; gpio_init(GPIOD, &gpio_init_struct); -/* reset sdio */ - sdio_reset(SDIOx); - - /* power on */ - status = sd_power_on(); - + retry = 3; + while(retry--){ + /* reset sdio */ + sdio_reset(SDIOx); + /* power on */ + status = sd_power_on(); + + if(status == SD_OK) + break; + } + if(status == SD_OK) { /* sdio card initialize */ @@ -138,8 +145,8 @@ sd_error_status_type sd_init(void) { if(sd_card_info.card_type == SDIO_STD_CAPACITY_SD_CARD_V1_1 || sd_card_info.card_type == SDIO_STD_CAPACITY_SD_CARD_V2_0) { - /* set sdio_ck to 4MHz */ - clkdiv = system_core_clock / 4000000; + /* set sdio_ck to 12mhz */ + clkdiv = system_core_clock / 12000000; if(clkdiv >= 2) { @@ -148,8 +155,8 @@ sd_error_status_type sd_init(void) } else { - /* set sdio_ck to 4MHz */ - clkdiv = system_core_clock / 4000000; + /* set sdio_ck to 48mhz */ + clkdiv = system_core_clock / 48000000; if(clkdiv >= 2) { @@ -217,7 +224,7 @@ sd_error_status_type sd_power_on(void) /* enable to output sdio_ck */ sdio_clock_enable(SDIOx, TRUE); - for(retry = 0; retry < 10; retry++) + for(retry = 0; retry < 5; retry++) { /* send cmd0, get in idle stage */ sdio_command_init_struct.argument = 0x0; @@ -227,21 +234,11 @@ sd_error_status_type sd_power_on(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); /* get command status */ status = command_error(); - - if(status == SD_OK) - { - break; - } - } - /* if any errors occured, return status */ - if(status != SD_OK) - { - return status; } /* send cmd8, check card interface feature */ @@ -252,7 +249,7 @@ sd_error_status_type sd_power_on(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); /* waiting R7 */ @@ -273,7 +270,7 @@ sd_error_status_type sd_power_on(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); /* waiting R1 */ @@ -285,6 +282,8 @@ sd_error_status_type sd_power_on(void) /* send acmd41, check voltage operation range */ while((!valid_voltage) && (count < SD_MAX_VOLT_TRIAL)) { + delay_ms(10); + /* send cmd55 before acmd41 */ sdio_command_init_struct.argument = 0x00; sdio_command_init_struct.cmd_index = SD_CMD_APP_CMD; @@ -293,7 +292,7 @@ sd_error_status_type sd_power_on(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); /* waiting R1 */ @@ -313,7 +312,7 @@ sd_error_status_type sd_power_on(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); /* waiting R3 */ @@ -350,6 +349,8 @@ sd_error_status_type sd_power_on(void) /* send cmd1 */ while((!valid_voltage) && (count < SD_MAX_VOLT_TRIAL)) { + delay_ms(10); + sdio_command_init_struct.argument = SD_VOLTAGE_WINDOW_MMC; sdio_command_init_struct.cmd_index = SD_CMD_SEND_OP_COND; sdio_command_init_struct.rsp_type = SDIO_RESPONSE_SHORT; @@ -357,7 +358,7 @@ sd_error_status_type sd_power_on(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); /* waiting R3 */ @@ -428,7 +429,7 @@ sd_error_status_type sd_card_init(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp2_error(); @@ -455,7 +456,7 @@ sd_error_status_type sd_card_init(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp6_error(SD_CMD_SET_REL_ADDR, &rca_temp); @@ -476,7 +477,7 @@ sd_error_status_type sd_card_init(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp2_error(); @@ -497,7 +498,7 @@ sd_error_status_type sd_card_init(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp2_error(); @@ -806,7 +807,7 @@ sd_error_status_type sd_deselect_select(uint32_t addr) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); return command_rsp1_error(SD_CMD_SEL_DESEL_CARD); @@ -836,7 +837,7 @@ sd_error_status_type sdio_command_data_send(sdio_command_struct_type *sdio_cmd_i /* sdio command config */ sdio_data_config(SDIOx, sdio_data_init_t); - /* enable DCSM */ + /* enable dcsm */ sdio_data_state_machine_enable(SDIOx, TRUE); length = sdio_data_init_t->data_length; @@ -855,7 +856,7 @@ sd_error_status_type sdio_command_data_send(sdio_command_struct_type *sdio_cmd_i /* sdio command config */ sdio_command_config(SDIOx, sdio_cmd_init_t); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(sdio_cmd_init_t->cmd_index); @@ -964,7 +965,7 @@ sd_error_status_type sdio_command_data_send(sdio_command_struct_type *sdio_cmd_i /* sdio command config */ sdio_command_config(SDIOx, sdio_cmd_init_t); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_STOP_TRANSMISSION); @@ -1037,7 +1038,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) end_addr = start_addr + (nblks - 1) * 512; } - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = SDIO_DATA_BLOCK_SIZE_1B; sdio_data_init_struct.data_length = 0 ; sdio_data_init_struct.timeout = SD_DATATIMEOUT ; @@ -1052,7 +1053,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if(card_type == SDIO_MULTIMEDIA_CARD || card_type == SDIO_HIGH_SPEED_MULTIMEDIA_CARD) @@ -1065,7 +1066,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_ERASE_GRP_START); @@ -1081,7 +1082,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_ERASE_GRP_END); @@ -1097,7 +1098,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_ERASE); @@ -1117,7 +1118,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SD_ERASE_GRP_START); @@ -1133,7 +1134,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); if(status != SD_OK) @@ -1147,7 +1148,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_ERASE); @@ -1196,7 +1197,7 @@ sd_error_status_type sd_block_read(uint8_t *buf, long long addr, uint16_t blk_si addr >>= 9; } - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = SDIO_DATA_BLOCK_SIZE_1B; sdio_data_init_struct.data_length = 0; sdio_data_init_struct.timeout = SD_DATATIMEOUT; @@ -1211,7 +1212,7 @@ sd_error_status_type sd_block_read(uint8_t *buf, long long addr, uint16_t blk_si /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if((blk_size > 0) && (blk_size <= 2048) && ((blk_size & (blk_size - 1)) == 0)) @@ -1226,7 +1227,7 @@ sd_error_status_type sd_block_read(uint8_t *buf, long long addr, uint16_t blk_si /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SET_BLOCKLEN); @@ -1266,7 +1267,6 @@ sd_error_status_type sd_block_read(uint8_t *buf, long long addr, uint16_t blk_si * @param nblks: number of blocks to be read. * @retval sd_error_status_type: sd card error code. */ -__align(4) uint32_t *tempbuff; sd_error_status_type sd_mult_blocks_read(uint8_t *buf, long long addr, uint16_t blk_size, uint32_t nblks) { sd_error_status_type status = SD_OK; @@ -1281,7 +1281,7 @@ sd_error_status_type sd_mult_blocks_read(uint8_t *buf, long long addr, uint16_t addr >>= 9; } - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = (sdio_block_size_type)0; sdio_data_init_struct.data_length = 0; sdio_data_init_struct.timeout = SD_DATATIMEOUT; @@ -1296,7 +1296,7 @@ sd_error_status_type sd_mult_blocks_read(uint8_t *buf, long long addr, uint16_t /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if((blk_size > 0) && (blk_size <= 2048) && ((blk_size & (blk_size - 1)) == 0)) @@ -1311,7 +1311,7 @@ sd_error_status_type sd_mult_blocks_read(uint8_t *buf, long long addr, uint16_t /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SET_BLOCKLEN); @@ -1370,7 +1370,7 @@ sd_error_status_type sd_block_write(const uint8_t *buf, long long addr, uint16_t SDIOx->dtctrl = 0x0; - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = (sdio_block_size_type)0; sdio_data_init_struct.data_length = 0; sdio_data_init_struct.timeout = SD_DATATIMEOUT; @@ -1385,7 +1385,7 @@ sd_error_status_type sd_block_write(const uint8_t *buf, long long addr, uint16_t /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if(card_type == SDIO_HIGH_CAPACITY_SD_CARD) @@ -1406,7 +1406,7 @@ sd_error_status_type sd_block_write(const uint8_t *buf, long long addr, uint16_t /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SET_BLOCKLEN); @@ -1492,7 +1492,7 @@ sd_error_status_type sd_mult_blocks_write(const uint8_t *buf, long long addr, ui SDIOx->dtctrl = 0x0; - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = (sdio_block_size_type)0; sdio_data_init_struct.data_length = 0; sdio_data_init_struct.timeout = SD_DATATIMEOUT; @@ -1507,7 +1507,7 @@ sd_error_status_type sd_mult_blocks_write(const uint8_t *buf, long long addr, ui /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if(card_type == SDIO_HIGH_CAPACITY_SD_CARD) @@ -1528,7 +1528,7 @@ sd_error_status_type sd_mult_blocks_write(const uint8_t *buf, long long addr, ui /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SET_BLOCKLEN); @@ -1574,7 +1574,7 @@ sd_error_status_type sd_mult_blocks_write(const uint8_t *buf, long long addr, ui /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_APP_CMD); @@ -1592,7 +1592,7 @@ sd_error_status_type sd_mult_blocks_write(const uint8_t *buf, long long addr, ui /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SET_BLOCK_COUNT); @@ -1649,7 +1649,7 @@ sd_error_status_type mmc_stream_read(uint8_t *buf, long long addr, uint32_t len) SDIOx->dtctrl = 0x0; - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = SDIO_DATA_BLOCK_SIZE_1B; sdio_data_init_struct.data_length = 0 ; sdio_data_init_struct.timeout = SD_DATATIMEOUT ; @@ -1664,7 +1664,7 @@ sd_error_status_type mmc_stream_read(uint8_t *buf, long long addr, uint32_t len) /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } /* send cmd11, read data */ sdio_command_init_struct.argument = addr; @@ -1703,7 +1703,7 @@ sd_error_status_type mmc_stream_write(uint8_t *buf, long long addr, uint32_t len SDIOx->dtctrl = 0x0; - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = SDIO_DATA_BLOCK_SIZE_1B; sdio_data_init_struct.data_length = 0; sdio_data_init_struct.timeout = SD_DATATIMEOUT; @@ -1718,7 +1718,7 @@ sd_error_status_type mmc_stream_write(uint8_t *buf, long long addr, uint32_t len /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } /* send cmd20, write data */ sdio_command_init_struct.argument = addr; @@ -1792,7 +1792,7 @@ sd_error_status_type sd_irq_service(void) sdio_command_init_struct.wait_type = SDIO_WAIT_FOR_NO; /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); transfer_error = command_rsp1_error(SD_CMD_STOP_TRANSMISSION); } @@ -2183,7 +2183,7 @@ sd_error_status_type command_rsp6_error(uint8_t cmd, uint16_t *prca) response = sdio_response_get(SDIOx, SDIO_RSP1_INDEX); - if(SD_ALLZERO == (response & (SD_R6_GENERAL_UNKNOWN_ERROR | SD_R6_ILLEGAL_CMD | SD_R6_CMD_CRC_FAILED))) + if(SD_ALLZERO == (response & (SD_R6_GENERAL_UNKNOWN_ERROR | SD_R6_ILLEGAL_CMD | SD_R6_CMD_CRC_ERROR))) { *prca = (uint16_t)(response >> 16); return status; @@ -2199,9 +2199,9 @@ sd_error_status_type command_rsp6_error(uint8_t cmd, uint16_t *prca) return SD_ILLEGAL_CMD; } - if(response & SD_R6_CMD_CRC_FAILED) + if(response & SD_R6_CMD_CRC_ERROR) { - return SD_CMD_CRC_FAILED; + return SD_CMD_CRC_ERROR; } return status; @@ -2233,7 +2233,7 @@ sd_error_status_type sd_bus_wide_enable(confirm_state new_state) /* check card locked or not */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if(sd_card_info.sd_scr_reg.sd_bus_width) @@ -2245,7 +2245,7 @@ sd_error_status_type sd_bus_wide_enable(confirm_state new_state) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_APP_CMD); @@ -2262,7 +2262,7 @@ sd_error_status_type sd_bus_wide_enable(confirm_state new_state) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_APP_SD_SET_BUSWIDTH); @@ -2293,7 +2293,7 @@ sd_error_status_type mmc_switch(uint8_t set, uint8_t index, uint8_t value) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_HS_SWITCH); @@ -2355,7 +2355,7 @@ sd_error_status_type sd_switch(uint32_t mode, uint32_t group, uint8_t value, uin /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SET_BLOCKLEN); @@ -2400,7 +2400,7 @@ sd_error_status_type check_card_programming(uint8_t *p_status) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); sts_reg = SDIOx->sts; @@ -2459,7 +2459,7 @@ sd_error_status_type sd_status_send(uint32_t *p_card_status) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SEND_STATUS); @@ -2513,7 +2513,7 @@ sd_error_status_type scr_find(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SET_BLOCKLEN); @@ -2531,7 +2531,7 @@ sd_error_status_type scr_find(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_APP_CMD); @@ -2558,7 +2558,7 @@ sd_error_status_type scr_find(void) /* sdio command config */ sdio_command_config(SDIOx, &sdio_command_init_struct); - /* enable CCSM */ + /* enable ccsm */ sdio_command_state_machine_enable(SDIOx, TRUE); status = command_rsp1_error(SD_CMD_SD_APP_SEND_SCR); 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 13633dc..e107c0c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1247465..946ce3e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 133465b..cf23a7a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief this file contains all the functions prototypes for the sd/mmc * card at32_sdio driver firmware library. ************************************************************************** @@ -73,8 +73,8 @@ typedef enum typedef enum { /* sdio specific error defines ------------------------------------------*/ - SD_CMD_FAIL = 1, /*!< command response received (but crc check failed) */ - SD_DATA_FAIL = 2, /*!< data bock sent/received (crc check failed) */ + SD_CMD_FAIL = 1, /*!< command response received (but crc check error) */ + SD_DATA_FAIL = 2, /*!< data bock sent/received (crc check error) */ SD_CMD_RSP_TIMEOUT = 3, /*!< command response timeout */ SD_DATA_TIMEOUT = 4, /*!< data time out */ SD_TX_UNDERRUN = 5, /*!< transmit fifo under-run */ @@ -86,10 +86,10 @@ typedef enum SD_ERASE_SEQ_ERR = 11, /*!< an error in the sequence of erase command occurs. */ SD_INVALID_ERASE_PARAM = 12, /*!< an invalid selection for erase groups */ SD_WR_PROTECT_VIOLATION = 13, /*!< attempt to program a write protect block */ - SD_LOCK_UNLOCK_FAILED = 14, /*!< sequence or password error has been detected in unlock command or if there was an attempt to access a locked card */ - SD_CMD_CRC_FAILED = 15, /*!< crc check of the previous command failed */ + SD_LOCK_UNLOCK_ERROR = 14, /*!< sequence or password error has been detected in unlock command or if there was an attempt to access a locked card */ + SD_CMD_CRC_ERROR = 15, /*!< crc check of the previous command error */ SD_ILLEGAL_CMD = 16, /*!< command is not legal for the card state */ - SD_CARD_ECC_FAILED = 17, /*!< card internal ecc was applied but failed to correct the data */ + SD_CARD_ECC_ERROR = 17, /*!< card internal ecc was applied but error to correct the data */ SD_CARD_CONTROLLER_ERR = 18, /*!< internal card controller error */ SD_GENERAL_UNKNOWN_ERROR = 19, /*!< general or unknown error */ SD_STREAM_RD_UNDERRUN = 20, /*!< the card could not sustain data transfer in stream read operation. */ @@ -104,7 +104,7 @@ typedef enum SD_SWITCH_ERROR = 29, /*!< switch error */ SD_SDIO_DISABLED = 30, /*!< sdio disabled */ SD_SDIO_FUNC_BUSY = 31, /*!< function busy */ - SD_SDIO_FUNC_FAILED = 32, /*!< function failed */ + SD_SDIO_FUNC_ERROR = 32, /*!< function error */ SD_SDIO_UNKNOWN_FUNC = 33, /*!< unknown function */ /* standard error defines --------------------------------------------*/ @@ -359,10 +359,10 @@ typedef struct #define SD_OCR_ERASE_SEQ_ERR ((uint32_t)0x10000000) #define SD_OCR_INVALID_ERASE_PARAM ((uint32_t)0x08000000) #define SD_OCR_WR_PROTECT_VIOLATION ((uint32_t)0x04000000) -#define SD_OCR_LOCK_UNLOCK_FAILED ((uint32_t)0x01000000) -#define SD_OCR_CMD_CRC_FAILED ((uint32_t)0x00800000) +#define SD_OCR_LOCK_UNLOCK_ERROR ((uint32_t)0x01000000) +#define SD_OCR_CMD_CRC_ERROR ((uint32_t)0x00800000) #define SD_OCR_ILLEGAL_CMD ((uint32_t)0x00400000) -#define SD_OCR_CARD_ECC_FAILED ((uint32_t)0x00200000) +#define SD_OCR_CARD_ECC_ERROR ((uint32_t)0x00200000) #define SD_OCR_CARD_CONTROLLER_ERR ((uint32_t)0x00100000) #define SD_OCR_GENERAL_UNKNOWN_ERROR ((uint32_t)0x00080000) #define SD_OCR_STREAM_RD_UNDERRUN ((uint32_t)0x00040000) @@ -387,13 +387,13 @@ typedef struct */ #define SD_R6_GENERAL_UNKNOWN_ERROR ((uint32_t)0x00002000) #define SD_R6_ILLEGAL_CMD ((uint32_t)0x00004000) -#define SD_R6_CMD_CRC_FAILED ((uint32_t)0x00008000) +#define SD_R6_CMD_CRC_ERROR ((uint32_t)0x00008000) #define SD_VOLTAGE_WINDOW_SD ((uint32_t)0x80100000) #define SD_HIGH_CAPACITY ((uint32_t)0x40000000) #define SD_STD_CAPACITY ((uint32_t)0x00000000) #define SD_CHECK_PATTERN ((uint32_t)0x000001AA) #define SD_VOLTAGE_WINDOW_MMC ((uint32_t)0x80FF8000) -#define SD_MAX_VOLT_TRIAL ((uint32_t)0x0000FFFF) +#define SD_MAX_VOLT_TRIAL ((uint32_t)0x000000FF) #define SD_ALLZERO ((uint32_t)0x00000000) #define SD_WIDE_BUS_SUPPORT ((uint32_t)0x00040000) #define SD_SINGLE_BUS_SUPPORT ((uint32_t)0x00010000) 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e623f1f..fa4c181 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -17,3 +17,4 @@ - sdio1_d3 pc11 ---> dat3 - sdio1_ck pc12 ---> clk - sdio1_cmd pd2 ---> cmd + for more detailed information. please refer to the application note document AN0105. 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 d46e7c3..7153905 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief this file provides a set of functions needed to manage the * sdio/mmc card memory. ************************************************************************** @@ -27,6 +27,7 @@ #include #include "at32_sdio.h" +#include "at32f415_board.h" /** @addtogroup AT32F415_periph_examples * @{ @@ -74,6 +75,7 @@ sd_error_status_type sd_init(void) uint16_t clkdiv = 0; sd_error_status_type status = SD_OK; gpio_init_type gpio_init_struct = {0}; + uint8_t retry = 0; /* gpioc and gpiod periph clock enable */ crm_periph_clock_enable(CRM_GPIOC_PERIPH_CLOCK, TRUE); @@ -94,12 +96,17 @@ sd_error_status_type sd_init(void) gpio_init_struct.gpio_pins = GPIO_PINS_2; gpio_init(GPIOD, &gpio_init_struct); - /* reset sdio */ - sdio_reset(SDIOx); - - /* power on */ - status = sd_power_on(); - + retry = 3; + while(retry--){ + /* reset sdio */ + sdio_reset(SDIOx); + /* power on */ + status = sd_power_on(); + + if(status == SD_OK) + break; + } + if(status == SD_OK) { /* sdio card initialize */ @@ -139,8 +146,8 @@ sd_error_status_type sd_init(void) { if(sd_card_info.card_type == SDIO_STD_CAPACITY_SD_CARD_V1_1 || sd_card_info.card_type == SDIO_STD_CAPACITY_SD_CARD_V2_0) { - /* set sdio_ck to 4mhz */ - clkdiv = system_core_clock / 4000000; + /* set sdio_ck to 12mhz */ + clkdiv = system_core_clock / 12000000; if(clkdiv >= 2) { @@ -149,8 +156,8 @@ sd_error_status_type sd_init(void) } else { - /* set sdio_ck to 4mhz */ - clkdiv = system_core_clock / 4000000; + /* set sdio_ck to 48mhz */ + clkdiv = system_core_clock / 48000000; if(clkdiv >= 2) { @@ -224,7 +231,7 @@ sd_error_status_type sd_power_on(void) /* enable to output sdio_ck */ sdio_clock_enable(SDIOx, TRUE); - for(retry = 0; retry < 10; retry++) + for(retry = 0; retry < 5; retry++) { /* send cmd0, get in idle stage */ sdio_command_init_struct.argument = 0x0; @@ -239,16 +246,6 @@ sd_error_status_type sd_power_on(void) /* get command status */ status = command_error(); - - if(status == SD_OK) - { - break; - } - } - /* if any errors occured, return status */ - if(status != SD_OK) - { - return status; } /* send cmd8, check card interface feature */ @@ -292,6 +289,8 @@ sd_error_status_type sd_power_on(void) /* send acmd41, check voltage operation range */ while((!valid_voltage) && (count < SD_MAX_VOLT_TRIAL)) { + delay_ms(10); + /* send cmd55 before acmd41 */ sdio_command_init_struct.argument = 0x00; sdio_command_init_struct.cmd_index = SD_CMD_APP_CMD; @@ -357,6 +356,8 @@ sd_error_status_type sd_power_on(void) /* send cmd1 */ while((!valid_voltage) && (count < SD_MAX_VOLT_TRIAL)) { + delay_ms(10); + sdio_command_init_struct.argument = SD_VOLTAGE_WINDOW_MMC; sdio_command_init_struct.cmd_index = SD_CMD_SEND_OP_COND; sdio_command_init_struct.rsp_type = SDIO_RESPONSE_SHORT; @@ -1044,7 +1045,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) end_addr = start_addr + (nblks - 1) * 512; } - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = SDIO_DATA_BLOCK_SIZE_1B; sdio_data_init_struct.data_length = 0 ; sdio_data_init_struct.timeout = SD_DATATIMEOUT ; @@ -1059,7 +1060,7 @@ sd_error_status_type sd_blocks_erase(long long addr, uint32_t nblks) /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if(card_type == SDIO_MULTIMEDIA_CARD || card_type == SDIO_HIGH_SPEED_MULTIMEDIA_CARD) @@ -1218,7 +1219,7 @@ sd_error_status_type sd_block_read(uint8_t *buf, long long addr, uint16_t blk_si /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if((blk_size > 0) && (blk_size <= 2048) && ((blk_size & (blk_size - 1)) == 0)) @@ -1302,7 +1303,7 @@ sd_error_status_type sd_mult_blocks_read(uint8_t *buf, long long addr, uint16_t /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if((blk_size > 0) && (blk_size <= 2048) && ((blk_size & (blk_size - 1)) == 0)) @@ -1391,7 +1392,7 @@ sd_error_status_type sd_block_write(const uint8_t *buf, long long addr, uint16_t /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if(card_type == SDIO_HIGH_CAPACITY_SD_CARD) @@ -1513,7 +1514,7 @@ sd_error_status_type sd_mult_blocks_write(const uint8_t *buf, long long addr, ui /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if(card_type == SDIO_HIGH_CAPACITY_SD_CARD) @@ -1655,7 +1656,7 @@ sd_error_status_type mmc_stream_read(uint8_t *buf, long long addr, uint32_t len) SDIOx->dtctrl = 0x0; - /* clear DCSM configuration */ + /* clear dcsm configuration */ sdio_data_init_struct.block_size = SDIO_DATA_BLOCK_SIZE_1B; sdio_data_init_struct.data_length = 0 ; sdio_data_init_struct.timeout = SD_DATATIMEOUT ; @@ -1670,7 +1671,7 @@ sd_error_status_type mmc_stream_read(uint8_t *buf, long long addr, uint32_t len) /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } /* send cmd11, read data */ sdio_command_init_struct.argument = addr; @@ -1724,7 +1725,7 @@ sd_error_status_type mmc_stream_write(uint8_t *buf, long long addr, uint32_t len /* check card locked */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } /* send cmd20, write data */ sdio_command_init_struct.argument = addr; @@ -2189,7 +2190,7 @@ sd_error_status_type command_rsp6_error(uint8_t cmd, uint16_t *prca) response = sdio_response_get(SDIOx, SDIO_RSP1_INDEX); - if(SD_ALLZERO == (response & (SD_R6_GENERAL_UNKNOWN_ERROR | SD_R6_ILLEGAL_CMD | SD_R6_CMD_CRC_FAILED))) + if(SD_ALLZERO == (response & (SD_R6_GENERAL_UNKNOWN_ERROR | SD_R6_ILLEGAL_CMD | SD_R6_CMD_CRC_ERROR))) { *prca = (uint16_t)(response >> 16); return status; @@ -2205,9 +2206,9 @@ sd_error_status_type command_rsp6_error(uint8_t cmd, uint16_t *prca) return SD_ILLEGAL_CMD; } - if(response & SD_R6_CMD_CRC_FAILED) + if(response & SD_R6_CMD_CRC_ERROR) { - return SD_CMD_CRC_FAILED; + return SD_CMD_CRC_ERROR; } return status; @@ -2239,7 +2240,7 @@ sd_error_status_type sd_bus_wide_enable(confirm_state new_state) /* check card locked or not */ if(response & SD_CARD_LOCKED) { - return SD_LOCK_UNLOCK_FAILED; + return SD_LOCK_UNLOCK_ERROR; } if(sd_card_info.sd_scr_reg.sd_bus_width) 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b2ec453..d1dc8a9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 387a434..c0b0b4b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 f1bc1ff..bfe0963 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ pb13(sck) <---> pa5(sck) pb14(miso) <---> pa6(miso) pb15(mosi) <---> pa7(mosi) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 bdb8c3e..68164b0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 17e9068..4b4bf8e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 6e7a2e7..e77a6b5 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ pb13(sck) <---> pa5(sck) pb14(miso) <---> pa6(miso) pb15(mosi) <---> pa7(mosi) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ef2152d..f0f4455 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a920918..3ddfd24 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 77c55d5..65cf92e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,3 +13,5 @@ - spi2 slaver spi1 master pb13(sck) <---> pa5(sck) pb14(miso) <---> pa7(mosi) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 606f7cc..fa75b99 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 bcaa2ca..e1c0472 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 b80966d..9ef179d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ - spi2 slaver spi1 master pb13(sck) <---> pa5(sck) pb14(miso) <---> pa7(mosi) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8b9fdf5..a685a2a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b66298c..f4172b3 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 4b59a41..8b4fa7a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,3 +13,5 @@ - spi2 slaver spi1 master pb13(sck) <---> pa5(sck) pb15(mosi) <---> pa7(mosi) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1007cba..6a934d5 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1e2bfe2..16e6bc9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 07d4dd1..e28b9cd 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,4 +14,6 @@ - spi2 slaver spi1 master - pb12(cs) <---> pa15(cs) pb13(sck) <---> pb3(sck) - pb14(miso) <---> pb5(mosi) \ No newline at end of file + pb14(miso) <---> pb5(mosi) + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4e44629..6dc5dc1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 c335c48..f4ccf63 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -192,6 +192,10 @@ int main(void) { system_clock_config(); at32_board_init(); + + /* button press:ensure code canbe download normally */ + while(at32_button_press() == NO_BUTTON); + gpio_config(); spi_config(); dma_channel_enable(DMA1_CHANNEL4, TRUE); 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1ee9faa..0043946 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of spi_flash ************************************************************************** * Copyright notice & Disclaimer @@ -43,14 +43,14 @@ extern "C" { /* use dma transfer spi data */ -//#define SPI_TRANS_DMA +#define SPI_TRANS_DMA /** @defgroup SPI_flash_cs_pin_definition * @{ */ -#define FLASH_CS_HIGH() gpio_bits_set(GPIOA, GPIO_PINS_4) -#define FLASH_CS_LOW() gpio_bits_reset(GPIOA, GPIO_PINS_4) +#define FLASH_CS_HIGH() gpio_bits_set(GPIOB, GPIO_PINS_12) +#define FLASH_CS_LOW() gpio_bits_reset(GPIOB, GPIO_PINS_12) /** * @} 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 9a3a97a..95a4b40 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/readme.txt +++ b/project/at_start_f415/examples/spi/w25q_flash/readme.txt @@ -1,17 +1,19 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, shows how to use - spi access the w25q flash chip. + this demo is based on the at-start board and AT32-Comm-EV board, in this demo, + shows how to use spi access the w25q flash chip. the pins use as follow: - - cs <---> pa4(software cs, pa4 as a general io to control flash cs) - - sck <---> pa5 - - miso <---> pa6 - - mosi <---> pa7 + - cs <---> pb12(software cs, pb12 as a general io to control flash cs) + - sck <---> pb13 + - miso <---> pb14 + - mosi <---> pb15 - usart1_tx <---> pa9 + + for more detailed information. please refer to the application note document AN0102. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2c20daa..2d7fa11 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6d1aa0a..668336b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -96,7 +96,7 @@ int main(void) uart_print_init(115200); spiflash_init(); flash_id_index = spiflash_read_id(); - if(flash_id_index != W25Q128) + if((flash_id_index != W25Q128)&&(flash_id_index != W25Q80)&&(flash_id_index != W25Q16)&&(flash_id_index != W25Q32)&&(flash_id_index != W25Q64)) { printf("flash id check error!\r\n"); for(index = 0; index < 50; index++) 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 7672a7c..d812fc9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief spi_flash source code ************************************************************************** * Copyright notice & Disclaimer @@ -46,36 +46,36 @@ void spiflash_init(void) gpio_init_type gpio_initstructure; spi_init_type spi_init_struct; - crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); + crm_periph_clock_enable(CRM_GPIOB_PERIPH_CLOCK, TRUE); crm_periph_clock_enable(CRM_DMA1_PERIPH_CLOCK, TRUE); - /* software cs, pa4 as a general io to control flash cs */ + /* software cs, pb12 as a general io to control flash cs */ gpio_initstructure.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_initstructure.gpio_pull = GPIO_PULL_UP; gpio_initstructure.gpio_mode = GPIO_MODE_OUTPUT; gpio_initstructure.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_initstructure.gpio_pins = GPIO_PINS_4; - gpio_init(GPIOA, &gpio_initstructure); + gpio_initstructure.gpio_pins = GPIO_PINS_12; + gpio_init(GPIOB, &gpio_initstructure); /* sck */ gpio_initstructure.gpio_pull = GPIO_PULL_UP; gpio_initstructure.gpio_mode = GPIO_MODE_MUX; - gpio_initstructure.gpio_pins = GPIO_PINS_5; - gpio_init(GPIOA, &gpio_initstructure); + gpio_initstructure.gpio_pins = GPIO_PINS_13; + gpio_init(GPIOB, &gpio_initstructure); /* miso */ gpio_initstructure.gpio_pull = GPIO_PULL_UP; gpio_initstructure.gpio_mode = GPIO_MODE_INPUT; - gpio_initstructure.gpio_pins = GPIO_PINS_6; - gpio_init(GPIOA, &gpio_initstructure); + gpio_initstructure.gpio_pins = GPIO_PINS_14; + gpio_init(GPIOB, &gpio_initstructure); /* mosi */ gpio_initstructure.gpio_pull = GPIO_PULL_UP; gpio_initstructure.gpio_mode = GPIO_MODE_MUX; - gpio_initstructure.gpio_pins = GPIO_PINS_7; - gpio_init(GPIOA, &gpio_initstructure); + gpio_initstructure.gpio_pins = GPIO_PINS_15; + gpio_init(GPIOB, &gpio_initstructure); FLASH_CS_HIGH(); - crm_periph_clock_enable(CRM_SPI1_PERIPH_CLOCK, TRUE); + crm_periph_clock_enable(CRM_SPI2_PERIPH_CLOCK, TRUE); spi_default_para_init(&spi_init_struct); spi_init_struct.transmission_mode = SPI_TRANSMIT_FULL_DUPLEX; spi_init_struct.master_slave_mode = SPI_MODE_MASTER; @@ -85,8 +85,8 @@ void spiflash_init(void) spi_init_struct.clock_polarity = SPI_CLOCK_POLARITY_HIGH; spi_init_struct.clock_phase = SPI_CLOCK_PHASE_2EDGE; spi_init_struct.cs_mode_selection = SPI_CS_SOFTWARE_MODE; - spi_init(SPI1, &spi_init_struct); - spi_enable(SPI1, TRUE); + spi_init(SPI2, &spi_init_struct); + spi_enable(SPI2, TRUE); } /** @@ -306,54 +306,54 @@ void spi_bytes_write(uint8_t *pbuffer, uint32_t length) #if defined(SPI_TRANS_DMA) dma_init_type dma_init_struct; - dma_reset(DMA1_CHANNEL2); - dma_reset(DMA1_CHANNEL3); + dma_reset(DMA1_CHANNEL4); + dma_reset(DMA1_CHANNEL5); dma_default_para_init(&dma_init_struct); dma_init_struct.buffer_size = length; dma_init_struct.direction = DMA_DIR_PERIPHERAL_TO_MEMORY; dma_init_struct.memory_base_addr = (uint32_t)&dummy_data; dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_BYTE; dma_init_struct.memory_inc_enable = FALSE; - dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI1->dt); + dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI2->dt); dma_init_struct.peripheral_data_width = DMA_PERIPHERAL_DATA_WIDTH_BYTE; dma_init_struct.peripheral_inc_enable = FALSE; dma_init_struct.priority = DMA_PRIORITY_VERY_HIGH; dma_init_struct.loop_mode_enable = FALSE; - dma_init(DMA1_CHANNEL2, &dma_init_struct); + dma_init(DMA1_CHANNEL4, &dma_init_struct); dma_init_struct.buffer_size = length; dma_init_struct.direction = DMA_DIR_MEMORY_TO_PERIPHERAL; dma_init_struct.memory_base_addr = (uint32_t)pbuffer; dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_BYTE; dma_init_struct.memory_inc_enable = TRUE; - dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI1->dt); + dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI2->dt); dma_init_struct.peripheral_data_width = DMA_PERIPHERAL_DATA_WIDTH_BYTE; dma_init_struct.peripheral_inc_enable = FALSE; dma_init_struct.priority = DMA_PRIORITY_VERY_HIGH; dma_init_struct.loop_mode_enable = FALSE; - dma_init(DMA1_CHANNEL3, &dma_init_struct); + dma_init(DMA1_CHANNEL5, &dma_init_struct); - spi_i2s_dma_transmitter_enable(SPI1, TRUE); - spi_i2s_dma_receiver_enable(SPI1, TRUE); + spi_i2s_dma_transmitter_enable(SPI2, TRUE); + spi_i2s_dma_receiver_enable(SPI2, TRUE); - dma_channel_enable(DMA1_CHANNEL2, TRUE); - dma_channel_enable(DMA1_CHANNEL3, TRUE); + dma_channel_enable(DMA1_CHANNEL4, TRUE); + dma_channel_enable(DMA1_CHANNEL5, TRUE); - while(dma_flag_get(DMA1_FDT2_FLAG) == RESET); - dma_flag_clear(DMA1_FDT2_FLAG); + while(dma_flag_get(DMA1_FDT4_FLAG) == RESET); + dma_flag_clear(DMA1_FDT4_FLAG); - dma_channel_enable(DMA1_CHANNEL2, FALSE); - dma_channel_enable(DMA1_CHANNEL3, FALSE); + dma_channel_enable(DMA1_CHANNEL4, FALSE); + dma_channel_enable(DMA1_CHANNEL5, FALSE); - spi_i2s_dma_transmitter_enable(SPI1, FALSE); - spi_i2s_dma_receiver_enable(SPI1, FALSE); + spi_i2s_dma_transmitter_enable(SPI2, FALSE); + spi_i2s_dma_receiver_enable(SPI2, FALSE); #else while(length--) { - while(spi_i2s_flag_get(SPI1, SPI_I2S_TDBE_FLAG) == RESET); - spi_i2s_data_transmit(SPI1, *pbuffer); - while(spi_i2s_flag_get(SPI1, SPI_I2S_RDBF_FLAG) == RESET); - dummy_data = spi_i2s_data_receive(SPI1); + while(spi_i2s_flag_get(SPI2, SPI_I2S_TDBE_FLAG) == RESET); + spi_i2s_data_transmit(SPI2, *pbuffer); + while(spi_i2s_flag_get(SPI2, SPI_I2S_RDBF_FLAG) == RESET); + dummy_data = spi_i2s_data_receive(SPI2); pbuffer++; } #endif @@ -371,53 +371,53 @@ void spi_bytes_read(uint8_t *pbuffer, uint32_t length) #if defined(SPI_TRANS_DMA) dma_init_type dma_init_struct; - dma_reset(DMA1_CHANNEL2); - dma_reset(DMA1_CHANNEL3); + dma_reset(DMA1_CHANNEL4); + dma_reset(DMA1_CHANNEL5); dma_default_para_init(&dma_init_struct); dma_init_struct.buffer_size = length; dma_init_struct.direction = DMA_DIR_MEMORY_TO_PERIPHERAL; dma_init_struct.memory_base_addr = (uint32_t)&write_value; dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_BYTE; dma_init_struct.memory_inc_enable = FALSE; - dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI1->dt); + dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI2->dt); dma_init_struct.peripheral_data_width = DMA_PERIPHERAL_DATA_WIDTH_BYTE; dma_init_struct.peripheral_inc_enable = FALSE; dma_init_struct.priority = DMA_PRIORITY_VERY_HIGH; dma_init_struct.loop_mode_enable = FALSE; - dma_init(DMA1_CHANNEL3, &dma_init_struct); + dma_init(DMA1_CHANNEL5, &dma_init_struct); dma_init_struct.buffer_size = length; dma_init_struct.direction = DMA_DIR_PERIPHERAL_TO_MEMORY; dma_init_struct.memory_base_addr = (uint32_t)pbuffer; dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_BYTE; dma_init_struct.memory_inc_enable = TRUE; - dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI1->dt); + dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI2->dt); dma_init_struct.peripheral_data_width = DMA_PERIPHERAL_DATA_WIDTH_BYTE; dma_init_struct.peripheral_inc_enable = FALSE; dma_init_struct.priority = DMA_PRIORITY_VERY_HIGH; dma_init_struct.loop_mode_enable = FALSE; - dma_init(DMA1_CHANNEL2, &dma_init_struct); + dma_init(DMA1_CHANNEL4, &dma_init_struct); - spi_i2s_dma_transmitter_enable(SPI1, TRUE); - spi_i2s_dma_receiver_enable(SPI1, TRUE); - dma_channel_enable(DMA1_CHANNEL2, TRUE); - dma_channel_enable(DMA1_CHANNEL3, TRUE); + spi_i2s_dma_transmitter_enable(SPI2, TRUE); + spi_i2s_dma_receiver_enable(SPI2, TRUE); + dma_channel_enable(DMA1_CHANNEL4, TRUE); + dma_channel_enable(DMA1_CHANNEL5, TRUE); - while(dma_flag_get(DMA1_FDT2_FLAG) == RESET); - dma_flag_clear(DMA1_FDT2_FLAG); + while(dma_flag_get(DMA1_FDT4_FLAG) == RESET); + dma_flag_clear(DMA1_FDT4_FLAG); - dma_channel_enable(DMA1_CHANNEL2, FALSE); - dma_channel_enable(DMA1_CHANNEL3, FALSE); + dma_channel_enable(DMA1_CHANNEL4, FALSE); + dma_channel_enable(DMA1_CHANNEL5, FALSE); - spi_i2s_dma_transmitter_enable(SPI1, FALSE); - spi_i2s_dma_receiver_enable(SPI1, FALSE); + spi_i2s_dma_transmitter_enable(SPI2, FALSE); + spi_i2s_dma_receiver_enable(SPI2, FALSE); #else while(length--) { - while(spi_i2s_flag_get(SPI1, SPI_I2S_TDBE_FLAG) == RESET); - spi_i2s_data_transmit(SPI1, write_value); - while(spi_i2s_flag_get(SPI1, SPI_I2S_RDBF_FLAG) == RESET); - *pbuffer = spi_i2s_data_receive(SPI1); + while(spi_i2s_flag_get(SPI2, SPI_I2S_TDBE_FLAG) == RESET); + spi_i2s_data_transmit(SPI2, write_value); + while(spi_i2s_flag_get(SPI2, SPI_I2S_RDBF_FLAG) == RESET); + *pbuffer = spi_i2s_data_receive(SPI2); pbuffer++; } #endif @@ -487,12 +487,12 @@ uint16_t spiflash_read_id(void) uint8_t spi_byte_write(uint8_t data) { uint8_t brxbuff; - spi_i2s_dma_transmitter_enable(SPI1, FALSE); - spi_i2s_dma_receiver_enable(SPI1, FALSE); - spi_i2s_data_transmit(SPI1, data); - while(spi_i2s_flag_get(SPI1, SPI_I2S_RDBF_FLAG) == RESET); - brxbuff = spi_i2s_data_receive(SPI1); - while(spi_i2s_flag_get(SPI1, SPI_I2S_BF_FLAG) != RESET); + spi_i2s_dma_transmitter_enable(SPI2, FALSE); + spi_i2s_dma_receiver_enable(SPI2, FALSE); + spi_i2s_data_transmit(SPI2, data); + while(spi_i2s_flag_get(SPI2, SPI_I2S_RDBF_FLAG) == RESET); + brxbuff = spi_i2s_data_receive(SPI2); + while(spi_i2s_flag_get(SPI2, SPI_I2S_BF_FLAG) != RESET); return brxbuff; } 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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.uvprojx b/project/at_start_f415/examples/tmr/6_steps/mdk_v5/6_steps.uvprojx index b1177ab..625410c 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 @@ -10,7 +10,7 @@ 6_steps 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::.\ARMCC + 5060750::V5.06 update 6 (build 750)::ARMCC 0 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 e8947c1..7f1fead 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -33,4 +33,6 @@ - tmr1_ch2 ---> pa9 - tmr1_ch3c ---> pb15 - tmr1_ch1 ---> pa8 - - tmr1_ch2c ---> pb14 \ No newline at end of file + - tmr1_ch2c ---> pb14 + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a79c098..190ae4d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 12385a7..a139e85 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -89,7 +89,7 @@ int main(void) gpio_init_struct.gpio_pins = GPIO_PINS_12; gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; - gpio_init_struct.gpio_pull = GPIO_PULL_NONE; + gpio_init_struct.gpio_pull = GPIO_PULL_DOWN; gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init(GPIOB, &gpio_init_struct); 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 fd6c10a..9c989b4 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -29,4 +29,6 @@ - tmr1_ch2c ---> pb14 - tmr1_ch3 ---> pa10 - tmr1_ch3c ---> pb15 - - tmr1_ch4 ---> pa11 \ No newline at end of file + - tmr1_ch4 ---> pa11 + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 903e24e..6d7b989 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 69fac95..e9f13b9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 c764dac..5e7c38b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -48,3 +48,5 @@ - tmr2 ch1 (pa.00) - tmr3 ch1 (pa.06) - tmr4 ch1 (pb.06) + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e65f7aa..1684e67 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 901dbf6..b916a30 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 75a14b0..3fb0f66 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -47,3 +47,5 @@ - connect the tmr1 break pin tmr1_brkin pin (pb.12) to the gnd. to generate a break event, switch this pin level from 0v to 3.3v. + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7b7ceae..fa619d9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5fdcef4..e725508 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/dma/readme.txt b/project/at_start_f415/examples/tmr/dma/readme.txt index 7eaad5e..5c036d0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -15,4 +15,5 @@ connect the following pins to an oscilloscope to monitor the different waveforms: - tmr1 ch3 ---> pa10 - - tmr1 ch3c ---> pb15 \ No newline at end of file + - tmr1 ch3c ---> pb15 + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d9c9364..26d173d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 f1bfbbd..a192a38 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 a4b6eee..0c19f03 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -27,3 +27,5 @@ connect the following pins to an oscilloscope to monitor the different waveforms: - tim1 ch1 ---> pa8 + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7eafa35..95cf615 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 c94dcb4..9a03f88 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 bf572ee..fd63fe5 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,4 +11,6 @@ added 4 each period. pin connection: - pa0 <---> pa2 - - pa1 <---> pa3 \ No newline at end of file + - pa1 <---> pa3 + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 438470d..a555c14 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1997465..cc6f250 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 329253b..c947c48 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,3 +11,5 @@ connection : - pa0 <---> pa7 - pb0 output 100 hz pwm waveform + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1b8b039..912d1e7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 34b5b97..762e213 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 fa20279..4098a8a 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,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,3 +13,5 @@ - pa0 <---> pa3 - pa1 <---> pa6 - pa2 <---> pa7 + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 95c7b96..7f9d71b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4a25e20..de3f18c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 61f82a1..c391524 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -25,3 +25,5 @@ set-up connect the following pins to an oscilloscope to monitor the different waveforms: - tim1 ch1 ---> pa8 + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9f5fc56..e98104c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7e22210..f94ed43 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e835b1e..d0e674d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -12,3 +12,5 @@ the minimum frequency value to measure is 2.19 khz(144m/65536). set-up - connect the external signal to measure to the tim3 ch2 pin (pa7). + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d81236c..2cc6772 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 35ff57d..669a6b6 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 df41eea..a75b32b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -26,3 +26,5 @@ - pc7 - pc8 - pc9 + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 48a320f..27e9c5e 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,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 446b094..de33260 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 0321292..ff19c93 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -26,3 +26,5 @@ - pc7 - pc8 - pc9 + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 70da113..9254e02 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,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 4f26495..3915fe0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 de76f11..011085b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,3 +13,5 @@ cc2 overflow rate = tmr3 counter clock / ch2_val = 732.4 hz cc3 overflow rate = tmr3 counter clock / ch3_val = 1464.8 hz cc4 overflow rate = tmr3 counter clock / ch4_val = 2929.6 hz + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8991e89..96509af 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 46746d3..8b85f5f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 14b7c24..422841a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,3 +11,5 @@ waveform. tmr9_ch1 toggling with frequency = 366.2 hz tmr9_ch2 toggling with frequency = 732.4 hz + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5df0fab..d293349 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 6053a0d..2cd0e38 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 964cecb..b4d4b2c 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/readme.txt +++ b/project/at_start_f415/examples/tmr/one_cycle/readme.txt @@ -1,11 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, pb7 connect to a key, press the key then pb6 output a pulse. pulse width = 2.048 ms. + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e43360..aff257a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5f9b45e..5424700 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 d0dde15..14f2284 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -16,3 +16,5 @@ the tmr4 is running: - at (tmr2 frequency)/ (tmr4 period + 1) = 200 khz and a duty cycle equal to tmr4_c1dt/(tmr4_pr + 1) = 60% + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 eba6128..21b3fc9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 dcdea0b..4bdab5b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3fe2265..8c769d9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,5 @@ this demo is based on the at-start board, in this demo, pa7 input external signal,debug view to see frequency and duty_cycle or use uasrt1 to see frequency and duty_cycle(pa9:usart1_tx). + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 08254cd..208842e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 75c3629..296589b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 df82643..b4df562 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,5 @@ this demo is based on the at-start board, in this demo, pa8 input external signal,debug view to see frequency and duty_cycle or use uasrt1 to see frequency and duty_cycle(pa9:usart1_tx). + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a9057ce..4c35025 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 897d436..95c9807 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 21fa8f2..024e920 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -12,4 +12,6 @@ ch1 overflow rate = tmr2 counter clock / c1dt_val = 146.48 hz ch2 overflow rate = tmr2 counter clock / c2dt_val = 219.7 hz ch3 overflow rate = tmr2 counter clock / c3dt_val = 439.4 hz - ch4 overflow rate = tmr2 counter clock / c4dt_val = 878.9 hz + ch4 overflow rate = tmr2 counter clock / c4dt_val = 878.9 hz + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 cff6300..dbaed9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 6d4428a..e6a5300 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 21f924b..e0f627e 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,10 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, pb8 output pwm waveform. \ No newline at end of file + this demo is based on the at-start board, in this demo, pb8 output pwm waveform. + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 db9e295..74afa57 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ad34e40..c046567 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 9f65945..48f0d7d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -12,4 +12,6 @@ tmr3 channel1 duty cycle = (tmr3_c1dt/ tmr3_pr)* 100 = 50% tmr3 channel2 duty cycle = (tmr3_c2dt/ tmr3_pr)* 100 = 37.5% tmr3 channel3 duty cycle = (tmr3_c3dt/ tmr3_pr)* 100 = 25% - tmr3 channel4 duty cycle = (tmr3_c4dt/ tmr3_pr)* 100 = 12.5% \ No newline at end of file + tmr3 channel4 duty cycle = (tmr3_c4dt/ tmr3_pr)* 100 = 12.5% + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 15273c8..7758265 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4a52e1a..3f65971 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 15c0e40..b625c14 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,5 @@ this demo is based on the at-start board, in this demo, shows how to configure the tmr1 peripheral to a base interrupt. when systermclock/14400/10000 = 1hz will generater overflow interrupt and toggle led3. + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a65355d..fce7918 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 02f1ae9..0a60c17 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 9f2d330..1c202ea 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -20,3 +20,5 @@ the tmr4 is running at: (tmr1 frequency)/ ((tmr4 period +1)* (repetition_counter+1)) = 100 khz and a duty cycle equal to tmr4_ch1/(tmr4_pr + 1) = 50% + + for more detailed information. please refer to the application note document AN0085. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 66c161e..a81b634 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 076918a..59ee663 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 38b235d..e535bb9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,4 +14,6 @@ ch1 duty_cycle = 50% ch2 duty_cycle = 25% ch3 duty_cycle = 12.5% - ch4 duty_cycle = 6.25% \ No newline at end of file + ch4 duty_cycle = 6.25% + + for more detailed information. please refer to the application note document AN0085. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 11f92a4..e29d7ff 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5e63376..e2694c4 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9a36ed3..6e9ffa8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ set-up - connect usart2 tx pin (pa2) to usart3 tx pin (pb10) - connect a pull-up resistor to this line (10k). + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e9049a1..4ade148 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 f4daf88..8cdcfb1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9e51228..aaceec3 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,4 @@ set-up - connect usart2 tx pin(pa2)/rx pin(pa3)/cts pin(pa0)/rts pin(pa1) + for more detailed information. please refer to the application note document AN0099. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7d3d930..f6caa65 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6d3777b..e1eba5c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e391c13..f9a1179 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ set-up - connect usart2 tx pin(pa2) to rx pin(pa3) + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 96691f5..a7c1a19 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2f574af..ac003a0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 88108be..48fd189 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ set-up - connect usart2 tx pin (pa2) to usart3 rx pin (pb11) - connect usart2 rx pin (pa3) to usart3 tx pin (pb10) + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3ce0186..1b375ca 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8281098..6a892cf 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 f51e040..21b0b7b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,3 +13,5 @@ set-up - use usart2 tx pin (pa2) and rx pin (pa3) + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6824a2e..93e183b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4c99ce2..d4ff16b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 677458b..755e50c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ set-up - connect usart2 tx pin (pa2) to usart3 rx pin (pb11) - connect usart2 rx pin (pa3) to usart3 tx pin (pb10) + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 23bea46..bdbd2ff 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e60cf94..b851973 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 77bd513..f68fa42 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,5 @@ this demo is based on the at-start board, in this demo, shows how to retarget the c library printf function to the usart. this implementation output the printf message on the hyperterminal using usart1. using pa9 to transmit data(printf). + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 0e56bff..0e1a230 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 92532f1..3fd550a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a90cd71..91aa532 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -16,3 +16,5 @@ set-up - connect usart2 tx pin (pa2) -> usart3 rx pin (pb11) + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2a6e141..9112136 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e0fd99c..f99736c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/rs485/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/rs485/inc/at32f415_clock.h new file mode 100644 index 0000000..ca77a1e --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/inc/at32f415_clock.h @@ -0,0 +1,46 @@ +/** + ************************************************************************** + * @file at32f415_clock.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief header file of clock program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F415_CLOCK_H +#define __AT32F415_CLOCK_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f415.h" + +/* exported functions ------------------------------------------------------- */ +void system_clock_config(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F415_CLOCK_H */ + diff --git a/project/at_start_f415/examples/usart/rs485/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/rs485/inc/at32f415_conf.h new file mode 100644 index 0000000..2044f04 --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/inc/at32f415_conf.h @@ -0,0 +1,146 @@ +/** + ************************************************************************** + * @file at32f415_conf.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief at32f415 config header file + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F415_CONF_H +#define __AT32F415_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief in the following line adjust the value of high speed exernal crystal (hext) + * used in your application + * tip: to avoid modifying this file each time you need to use different hext, you + * can define the hext value in your toolchain compiler preprocessor. + */ +#if !defined HEXT_VALUE +#define HEXT_VALUE ((uint32_t)8000000) /*!< value of the high speed exernal crystal in hz */ +#endif + +/** + * @brief in the following line adjust the high speed exernal crystal (hext) startup + * timeout value + */ +#define HEXT_STARTUP_TIMEOUT ((uint16_t)0x3000) /*!< time out for hext start up */ +#define HICK_VALUE ((uint32_t)8000000) /*!< value of the high speed internal clock in hz */ + +/* module define -------------------------------------------------------------*/ +#define CRM_MODULE_ENABLED +#define CMP_MODULE_ENABLED +#define TMR_MODULE_ENABLED +#define ERTC_MODULE_ENABLED +#define GPIO_MODULE_ENABLED +#define I2C_MODULE_ENABLED +#define USART_MODULE_ENABLED +#define PWC_MODULE_ENABLED +#define CAN_MODULE_ENABLED +#define ADC_MODULE_ENABLED +#define SPI_MODULE_ENABLED +#define DMA_MODULE_ENABLED +#define DEBUG_MODULE_ENABLED +#define FLASH_MODULE_ENABLED +#define CRC_MODULE_ENABLED +#define WWDT_MODULE_ENABLED +#define WDT_MODULE_ENABLED +#define EXINT_MODULE_ENABLED +#define SDIO_MODULE_ENABLED +#define USB_MODULE_ENABLED +#define MISC_MODULE_ENABLED + +/* includes ------------------------------------------------------------------*/ +#ifdef CRM_MODULE_ENABLED +#include "at32f415_crm.h" +#endif +#ifdef CMP_MODULE_ENABLED +#include "at32f415_cmp.h" +#endif +#ifdef TMR_MODULE_ENABLED +#include "at32f415_tmr.h" +#endif +#ifdef ERTC_MODULE_ENABLED +#include "at32f415_ertc.h" +#endif +#ifdef GPIO_MODULE_ENABLED +#include "at32f415_gpio.h" +#endif +#ifdef I2C_MODULE_ENABLED +#include "at32f415_i2c.h" +#endif +#ifdef USART_MODULE_ENABLED +#include "at32f415_usart.h" +#endif +#ifdef PWC_MODULE_ENABLED +#include "at32f415_pwc.h" +#endif +#ifdef CAN_MODULE_ENABLED +#include "at32f415_can.h" +#endif +#ifdef ADC_MODULE_ENABLED +#include "at32f415_adc.h" +#endif +#ifdef SPI_MODULE_ENABLED +#include "at32f415_spi.h" +#endif +#ifdef DMA_MODULE_ENABLED +#include "at32f415_dma.h" +#endif +#ifdef DEBUG_MODULE_ENABLED +#include "at32f415_debug.h" +#endif +#ifdef FLASH_MODULE_ENABLED +#include "at32f415_flash.h" +#endif +#ifdef CRC_MODULE_ENABLED +#include "at32f415_crc.h" +#endif +#ifdef WWDT_MODULE_ENABLED +#include "at32f415_wwdt.h" +#endif +#ifdef WDT_MODULE_ENABLED +#include "at32f415_wdt.h" +#endif +#ifdef EXINT_MODULE_ENABLED +#include "at32f415_exint.h" +#endif +#ifdef SDIO_MODULE_ENABLED +#include "at32f415_sdio.h" +#endif +#ifdef MISC_MODULE_ENABLED +#include "at32f415_misc.h" +#endif +#ifdef USB_MODULE_ENABLED +#include "at32f415_usb.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F415_CONF_H */ + + diff --git a/project/at_start_f415/examples/usart/rs485/inc/at32f415_int.h b/project/at_start_f415/examples/usart/rs485/inc/at32f415_int.h new file mode 100644 index 0000000..6210e55 --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/inc/at32f415_int.h @@ -0,0 +1,58 @@ +/** + ************************************************************************** + * @file at32f415_int.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief header file of main interrupt service routines. + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F415_INT_H +#define __AT32F415_INT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f415.h" + +/* exported types ------------------------------------------------------------*/ +/* exported constants --------------------------------------------------------*/ +/* exported macro ------------------------------------------------------------*/ +/* exported functions ------------------------------------------------------- */ + +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/project/at_start_f415/examples/usart/rs485/mdk_v5/rs485.uvoptx b/project/at_start_f415/examples/usart/rs485/mdk_v5/rs485.uvoptx new file mode 100644 index 0000000..73d61f1 --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/mdk_v5/rs485.uvoptx @@ -0,0 +1,344 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + rs485 + 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_usart.c + at32f415_usart.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/usart/rs485/mdk_v5/rs485.uvprojx b/project/at_start_f415/examples/usart/rs485/mdk_v5/rs485.uvprojx new file mode 100644 index 0000000..d780863 --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/mdk_v5/rs485.uvprojx @@ -0,0 +1,487 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + rs485 + 0x4 + ARM-ADS + 5060750::V5.06 update 6 (build 750)::ARMCC + 0 + + + -AT32F415RCT7 + ArteryTek + ArteryTek.AT32F415_DFP.2.0.0 + IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM)) + 0 + $$Device:-AT32F415RCT7$Device\Include\at32f415.h + + + + + + + + + + $$Device:-AT32F415RCT7$SVD\AT32F415xx_v2.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\objects\ + rs485 + 1 + 0 + 1 + 1 + 1 + .\listings\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 0 + + + SARMCM3.DLL + -REMAP + DCM.DLL + -pCM4 + SARMCM3.DLL + + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4096 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 1 + 0x8000000 + 0x40000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x40000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + + + AT32F415RCT7,USE_STDPERIPH_DRIVER,AT_START_F415_V1 + + ..\..\..\..\..\..\libraries\drivers\inc;..\..\..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\..\..\libraries\cmsis\cm4\device_support;..\inc;..\..\..\..\..\at32f415_board + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + + user + + + at32f415_clock.c + 1 + ..\src\at32f415_clock.c + + + at32f415_int.c + 1 + ..\src\at32f415_int.c + + + main.c + 1 + ..\src\main.c + + + + + bsp + + + at32f415_board.c + 1 + ..\..\..\..\..\at32f415_board\at32f415_board.c + + + + + firmware + + + at32f415_gpio.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + + + at32f415_crm.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + + + at32f415_misc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + + + + + cmsis + + + system_at32f415.c + 1 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + + + startup_at32f415.s + 2 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + + + + + readme + + + readme.txt + 5 + ..\readme.txt + + + + + + + + + + + + + + + + + <Project Info> + + + + + + 0 + 1 + + + + +
diff --git a/project/at_start_f415/examples/usart/rs485/readme.txt b/project/at_start_f415/examples/usart/rs485/readme.txt new file mode 100644 index 0000000..3699a30 --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/readme.txt @@ -0,0 +1,16 @@ +/** + ************************************************************************** + * @file readme.txt + * @version v2.0.5 + * @date 2022-05-20 + * @brief readme + ************************************************************************** + */ + + this demo is based on the at-start board and AT32-Comm-EV, in this demo, + shows how to use usart to achieve rs485 communication. + + set-up + - usart tx ---> pa2 + - usart rx ---> pa3 + - usart de ---> pa1 \ No newline at end of file diff --git a/project/at_start_f415/examples/usart/rs485/src/at32f415_clock.c b/project/at_start_f415/examples/usart/rs485/src/at32f415_clock.c new file mode 100644 index 0000000..dddab9c --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/src/at32f415_clock.c @@ -0,0 +1,99 @@ +/** + ************************************************************************** + * @file at32f415_clock.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief system clock config program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f415_clock.h" + +/** + * @brief system clock config program + * @note the system clock is configured as follow: + * - system clock = hext / 2 * pll_mult + * - system clock source = pll (hext) + * - hext = 8000000 + * - sclk = 144000000 + * - ahbdiv = 1 + * - ahbclk = 144000000 + * - apb2div = 2 + * - apb2clk = 72000000 + * - apb1div = 2 + * - apb1clk = 72000000 + * - pll_mult = 36 + * - flash_wtcyc = 4 cycle + * @param none + * @retval none + */ +void system_clock_config(void) +{ + /* config flash psr register */ + flash_psr_set(FLASH_WAIT_CYCLE_4); + + /* reset crm */ + crm_reset(); + + crm_clock_source_enable(CRM_CLOCK_SOURCE_HEXT, TRUE); + + /* wait till hext is ready */ + while(crm_hext_stable_wait() == ERROR) + { + } + + /* config pll clock resource */ + crm_pll_config(CRM_PLL_SOURCE_HEXT_DIV, CRM_PLL_MULT_36); + + /* enable pll */ + crm_clock_source_enable(CRM_CLOCK_SOURCE_PLL, TRUE); + + /* wait till pll is ready */ + while(crm_flag_get(CRM_PLL_STABLE_FLAG) != SET) + { + } + + /* config ahbclk */ + crm_ahb_div_set(CRM_AHB_DIV_1); + + /* config apb2clk */ + crm_apb2_div_set(CRM_APB2_DIV_2); + + /* config apb1clk */ + crm_apb1_div_set(CRM_APB1_DIV_2); + + /* enable auto step mode */ + crm_auto_step_mode_enable(TRUE); + + /* select pll as system clock source */ + crm_sysclk_switch(CRM_SCLK_PLL); + + /* wait till pll is used as system clock source */ + while(crm_sysclk_switch_status_get() != CRM_SCLK_PLL) + { + } + + /* disable auto step mode */ + crm_auto_step_mode_enable(FALSE); + + /* update system_core_clock global variable */ + system_core_clock_update(); +} diff --git a/project/at_start_f415/examples/usart/rs485/src/at32f415_int.c b/project/at_start_f415/examples/usart/rs485/src/at32f415_int.c new file mode 100644 index 0000000..5e83c52 --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/src/at32f415_int.c @@ -0,0 +1,141 @@ +/** + ************************************************************************** + * @file at32f415_int.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief main interrupt service routines. + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f415_int.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_USART_rs485 + * @{ + */ + +/** + * @brief this function handles nmi exception. + * @param none + * @retval none + */ +void NMI_Handler(void) +{ +} + +/** + * @brief this function handles hard fault exception. + * @param none + * @retval none + */ +void HardFault_Handler(void) +{ + /* go to infinite loop when hard fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles memory manage exception. + * @param none + * @retval none + */ +void MemManage_Handler(void) +{ + /* go to infinite loop when memory manage exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles bus fault exception. + * @param none + * @retval none + */ +void BusFault_Handler(void) +{ + /* go to infinite loop when bus fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles usage fault exception. + * @param none + * @retval none + */ +void UsageFault_Handler(void) +{ + /* go to infinite loop when usage fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles svcall exception. + * @param none + * @retval none + */ +void SVC_Handler(void) +{ +} + +/** + * @brief this function handles debug monitor exception. + * @param none + * @retval none + */ +void DebugMon_Handler(void) +{ +} + +/** + * @brief this function handles pendsv_handler exception. + * @param none + * @retval none + */ +void PendSV_Handler(void) +{ +} + +/** + * @brief this function handles systick handler. + * @param none + * @retval none + */ +void SysTick_Handler(void) +{ +} + +/** + * @} + */ + +/** + * @} + */ diff --git a/project/at_start_f415/examples/usart/rs485/src/main.c b/project/at_start_f415/examples/usart/rs485/src/main.c new file mode 100644 index 0000000..4ded315 --- /dev/null +++ b/project/at_start_f415/examples/usart/rs485/src/main.c @@ -0,0 +1,165 @@ +/** + ************************************************************************** + * @file main.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief main program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +#include "at32f415_board.h" +#include "at32f415_clock.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_USART_rs485 + * @{ + */ + +#define RS485_BAUDRATE 9600 +#define RS485_BUFFER_SIZE 128 + +uint8_t rs485_buffer_rx[RS485_BUFFER_SIZE]; +uint8_t rs485_buffer_rx_cnt = 0; + +/** + * @brief rs485 configiguration. + * @param none + * @retval none + */ +static void rs485_config(void) +{ + gpio_init_type gpio_init_struct; + + /* enable the uart2 and gpio clock */ + crm_periph_clock_enable(CRM_USART2_PERIPH_CLOCK, TRUE); + crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); + + gpio_default_para_init(&gpio_init_struct); + + /* configure the uart2 tx,rx,de 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_2; + gpio_init_struct.gpio_pull = GPIO_PULL_NONE; + gpio_init(GPIOA, &gpio_init_struct); + + gpio_init_struct.gpio_pins = GPIO_PINS_3; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init_struct.gpio_pull = GPIO_PULL_UP; + gpio_init(GPIOA, &gpio_init_struct); + + gpio_init_struct.gpio_pins = GPIO_PINS_1; + gpio_init_struct.gpio_mode = GPIO_MODE_OUTPUT; + gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; + gpio_init(GPIOA, &gpio_init_struct); + + gpio_bits_reset(GPIOA, GPIO_PINS_1); + + /* configure uart2 param */ + usart_init(USART2, RS485_BAUDRATE, USART_DATA_8BITS, USART_STOP_1_BIT); + + usart_flag_clear(USART2, USART_RDBF_FLAG); + usart_interrupt_enable(USART2, USART_RDBF_INT, TRUE); + + usart_receiver_enable(USART2, TRUE); + usart_transmitter_enable(USART2, TRUE); + usart_enable(USART2, TRUE); + + nvic_irq_enable(USART2_IRQn, 1, 0); +} + +/** + * @brief rs485 send data + * @param buf: pointer to the buffer that contain the data to be transferred. + * @param cnt: size of buffer in bytes. + * @retval none + */ +static void rs485_send_data(u8* buf, u8 cnt) +{ + gpio_bits_set(GPIOA, GPIO_PINS_1); + while(cnt--){ + while(usart_flag_get(USART2, USART_TDBE_FLAG) == RESET); + usart_data_transmit(USART2, *buf++); + } + while(usart_flag_get(USART2, USART_TDC_FLAG) == RESET); + gpio_bits_reset(GPIOA, GPIO_PINS_1); +} + +/** + * @brief main function. + * @param none + * @retval none + */ +int main(void) +{ + char str[]="start test..\r\n"; + u8 len = 0; + + system_clock_config(); + at32_board_init(); + nvic_priority_group_config(NVIC_PRIORITY_GROUP_4); + + rs485_config(); + + len = sizeof(str); + rs485_send_data((u8*)str, len); + while(1) + { + if(usart_flag_get(USART2, USART_IDLEF_FLAG) != RESET) + { + usart_data_receive(USART2); + usart_interrupt_enable(USART2, USART_RDBF_INT, FALSE); + rs485_send_data(rs485_buffer_rx, rs485_buffer_rx_cnt); + rs485_buffer_rx_cnt = 0; + usart_interrupt_enable(USART2, USART_RDBF_INT, TRUE); + } + } +} + +/** + * @brief usart2 interrupt handler + * @param none + * @retval none + */ +void USART2_IRQHandler(void) +{ + uint16_t tmp; + + if(usart_flag_get(USART2, USART_RDBF_FLAG) != RESET) + { + tmp = usart_data_receive(USART2); + if(rs485_buffer_rx_cnt < RS485_BUFFER_SIZE) + { + rs485_buffer_rx[rs485_buffer_rx_cnt++] = tmp; + } + } +} + +/** + * @} + */ + +/** + * @} + */ 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 c05e24e..dc320d1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4721afd..4116be8 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -17,3 +17,5 @@ - sc usart reset ---> pa6 - sc usart cmdvcc ---> pa7 - sc usart off ---> pa8 + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 800af49..725c8df 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a6aa270..6289312 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -39,7 +39,10 @@ #define T0_PROTOCOL 0x00 /* t0 protocol */ #define SETUP_LENGTH 20 #define HIST_LENGTH 20 -#define SC_RECEIVE_TIMEOUT 0x4000 /* direction to reader */ +#define SC_RECEIVE_TIMEOUT 0xA000 /* direction to reader */ + +#define SC_USART_DIV_VAL 20 /* ISO 7816-3 protocol: SC_CLOCK_FREQ(PCLK/(2*USART_DIV_VAL)) is between 1 and 5 MHz */ +#define SC_F_DIV_D 372 /* ISO 7816-3 protocol: F/D = 372 */ /* atr structure - answer to reset */ typedef struct @@ -53,13 +56,15 @@ typedef struct } sc_atr_type; sc_atr_type sc_a2r_struct; +uint32_t sc_baud_rate = 0; +uint32_t sc_clock_freq = 0; uint32_t counter = 0; error_status atr_decode_status = ERROR; uint32_t card_inserted = 0, card_protocol = 1; uint8_t dst_buffer[50]= { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; /** @@ -71,7 +76,8 @@ void usart_configuration(void) { gpio_init_type gpio_init_struct; exint_init_type exint_init_struct; - + crm_clocks_freq_type crm_clocks_struct; + /* enable gpio_3_5v, sc_usart_gpio_clk, gpio_reset, gpio_cmdvcc, gpio_off and iomux clocks */ crm_periph_clock_enable(SC_3_5V_CLK, TRUE); crm_periph_clock_enable(SC_USART_GPIO_CLK, TRUE); @@ -160,8 +166,8 @@ void usart_configuration(void) /* clear sc exint line pending bit */ exint_flag_clear(SC_OFF_EXINT); - /* sc_usart clock set to 4mhz (apbclk = 72 mhz / 18) */ - usart_irda_smartcard_division_set(SC_USART, 9); + /* sc_usart clock set to (apbclk / (2 * SC_USART_DIV_VAL)) */ + usart_irda_smartcard_division_set(SC_USART, SC_USART_DIV_VAL); /* sc_usart guard time set to 2 bit */ usart_smartcard_guard_time_set(SC_USART, 0x2); @@ -169,8 +175,11 @@ void usart_configuration(void) usart_clock_config(SC_USART, USART_CLOCK_POLARITY_LOW, USART_CLOCK_PHASE_1EDGE, USART_CLOCK_LAST_BIT_OUTPUT); usart_clock_enable(SC_USART, TRUE); + crm_clocks_freq_get(&crm_clocks_struct); + sc_clock_freq = crm_clocks_struct.apb1_freq / (2 * SC_USART_DIV_VAL); /* ISO 7816-3 protocol: the CLK frequency is between 1 and 5 MHz */ + sc_baud_rate = sc_clock_freq / SC_F_DIV_D; /* configure sc usart param */ - usart_init(SC_USART, 12096, USART_DATA_9BITS, USART_STOP_1_5_BIT); + usart_init(SC_USART, sc_baud_rate, USART_DATA_9BITS, USART_STOP_1_5_BIT); usart_parity_selection_config(SC_USART, USART_PARITY_EVEN); usart_transmitter_enable(SC_USART, TRUE); usart_receiver_enable(SC_USART, TRUE); 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e88a3b2..8704f38 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -36,3 +36,5 @@ - connect usart2_tx(pa2) to spi2_mosi(pb15) - connect usart2_rx(pa3) to spi2_miso(pb14) - connect usart2_ck(pa4) to spi2_sck(pb13) + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 74d11c8..98bd25a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9bb4bdc..3d7dcb9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 911dfc6..e1611f2 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ set-up - connect usart2 tx pin (pa2) to usart3 rx pin (pb11) - connect usart2 rx pin (pa3) to usart3 tx pin (pb10) + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 678d05d..1490de9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 fc19b8f..947475c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7560d43..64991bf 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -14,3 +14,5 @@ set-up - connect usart2 tx pin (pa2) to usart3 rx pin (pb11) - connect usart2 rx pin (pa3) to usart3 tx pin (pb10) + + for more detailed information. please refer to the application note document AN0099. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9c1afd7..30f3ab1 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7677d11..c1ce83a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b0bfaae..1df8ff3 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief audio codec header file ************************************************************************** * Copyright notice & Disclaimer 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 4adee16..577e745 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 41dc016..6a5f3b4 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,4 +13,5 @@ 1. microphone and speaker 2. frequency 16k and 48k 3. bit width 16bit, - 4. speaker feedback \ No newline at end of file + 4. speaker feedback + for more detailed information, please refer to the application note document AN0097. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 a83fab8..97a9bc9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ff6f20b..2e842f3 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief audio codec function ************************************************************************** * Copyright notice & Disclaimer 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 e894487..f8bb785 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 049aea4..d06446f 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief audio codec header file ************************************************************************** * Copyright notice & Disclaimer 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 4009a5b..29556f0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 536d3c6..4b3cb3b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -13,4 +13,5 @@ 1. microphone and speaker 2. frequency 16k and 48k 3. bit width 16bit, - 4. speaker feedback \ No newline at end of file + 4. speaker feedback + for more detailed information, please refer to the application note document AN0097. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7eb1a9c..4e24192 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7b3dea2..f4157e0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief audio codec function ************************************************************************** * Copyright notice & Disclaimer 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 721a608..306d235 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 96450a6..5684b56 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 228bf4f..ac09ea0 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,12 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, show how to build a composite device of usb cdc class and hid keyboard protocol. + for more detailed information, please refer to the application note document AN0097. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 b276630..13d4e76 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 27302c0..03639cb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_clock.h new file mode 100644 index 0000000..f83cc23 --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_clock.h @@ -0,0 +1,46 @@ +/** + ************************************************************************** + * @file at32f415_clock.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief header file of clock program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F415_CLOCK_H +#define __AT32F415_CLOCK_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f415.h" + +/* exported functions ------------------------------------------------------- */ +void system_clock_config(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F415_CLOCK_H */ + diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_conf.h new file mode 100644 index 0000000..f358a1d --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_conf.h @@ -0,0 +1,146 @@ +/** + ************************************************************************** + * @file at32f415_conf.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief at32f415 config header file + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F415_CONF_H +#define __AT32F415_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief in the following line adjust the value of high speed exernal crystal (hext) + * used in your application + * tip: to avoid modifying this file each time you need to use different hext, you + * can define the hext value in your toolchain compiler preprocessor. + */ +#if !defined HEXT_VALUE +#define HEXT_VALUE ((uint32_t)8000000) /*!< value of the high speed exernal crystal in hz */ +#endif + +/** + * @brief in the following line adjust the high speed exernal crystal (hext) startup + * timeout value + */ +#define HEXT_STARTUP_TIMEOUT ((uint16_t)0x3000) /*!< time out for hext start up */ +#define HICK_VALUE ((uint32_t)8000000) /*!< value of the high speed internal clock in hz */ + +/* module define -------------------------------------------------------------*/ +#define CRM_MODULE_ENABLED +#define CMP_MODULE_ENABLED +#define TMR_MODULE_ENABLED +#define ERTC_MODULE_ENABLED +#define GPIO_MODULE_ENABLED +#define I2C_MODULE_ENABLED +#define USART_MODULE_ENABLED +#define PWC_MODULE_ENABLED +#define CAN_MODULE_ENABLED +#define ADC_MODULE_ENABLED +#define SPI_MODULE_ENABLED +#define DMA_MODULE_ENABLED +#define DEBUG_MODULE_ENABLED +#define FLASH_MODULE_ENABLED +#define CRC_MODULE_ENABLED +#define WWDT_MODULE_ENABLED +#define WDT_MODULE_ENABLED +#define EXINT_MODULE_ENABLED +#define SDIO_MODULE_ENABLED +#define USB_MODULE_ENABLED +#define MISC_MODULE_ENABLED + +/* includes ------------------------------------------------------------------*/ +#ifdef CRM_MODULE_ENABLED +#include "at32f415_crm.h" +#endif +#ifdef CMP_MODULE_ENABLED +#include "at32f415_cmp.h" +#endif +#ifdef TMR_MODULE_ENABLED +#include "at32f415_tmr.h" +#endif +#ifdef ERTC_MODULE_ENABLED +#include "at32f415_ertc.h" +#endif +#ifdef GPIO_MODULE_ENABLED +#include "at32f415_gpio.h" +#endif +#ifdef I2C_MODULE_ENABLED +#include "at32f415_i2c.h" +#endif +#ifdef USART_MODULE_ENABLED +#include "at32f415_usart.h" +#endif +#ifdef PWC_MODULE_ENABLED +#include "at32f415_pwc.h" +#endif +#ifdef CAN_MODULE_ENABLED +#include "at32f415_can.h" +#endif +#ifdef ADC_MODULE_ENABLED +#include "at32f415_adc.h" +#endif +#ifdef SPI_MODULE_ENABLED +#include "at32f415_spi.h" +#endif +#ifdef DMA_MODULE_ENABLED +#include "at32f415_dma.h" +#endif +#ifdef DEBUG_MODULE_ENABLED +#include "at32f415_debug.h" +#endif +#ifdef FLASH_MODULE_ENABLED +#include "at32f415_flash.h" +#endif +#ifdef CRC_MODULE_ENABLED +#include "at32f415_crc.h" +#endif +#ifdef WWDT_MODULE_ENABLED +#include "at32f415_wwdt.h" +#endif +#ifdef WDT_MODULE_ENABLED +#include "at32f415_wdt.h" +#endif +#ifdef EXINT_MODULE_ENABLED +#include "at32f415_exint.h" +#endif +#ifdef SDIO_MODULE_ENABLED +#include "at32f415_sdio.h" +#endif +#ifdef MISC_MODULE_ENABLED +#include "at32f415_misc.h" +#endif +#ifdef USB_MODULE_ENABLED +#include "at32f415_usb.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F415_CONF_H */ + + diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_int.h new file mode 100644 index 0000000..b74400f --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/at32f415_int.h @@ -0,0 +1,58 @@ +/** + ************************************************************************** + * @file at32f415_int.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief header file of main interrupt service routines. + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F415_INT_H +#define __AT32F415_INT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f415.h" + +/* exported types ------------------------------------------------------------*/ +/* exported constants --------------------------------------------------------*/ +/* exported macro ------------------------------------------------------------*/ +/* exported functions ------------------------------------------------------- */ + +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/msc_diskio.h b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/msc_diskio.h new file mode 100644 index 0000000..a7fe7be --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/msc_diskio.h @@ -0,0 +1,74 @@ +/** + ************************************************************************** + * @file msc_diskio.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief usb mass storage disk interface 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 __MSC_DISKIO_H +#define __MSC_DISKIO_H + +#ifdef __cplusplus +extern "C" { +#endif + + +#include "usb_conf.h" +#include "usb_std.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_USB_device_msc + * @{ + */ +#define INTERNAL_FLASH_LUN 0 +#define SPI_FLASH_LUN 1 +#define SD_LUN 2 + +#define USB_FLASH_ADDR_OFFSET 0x08005000 + +#define SECTOR_SIZE_1K 1024 +#define SECTOR_SIZE_2K 2048 +#define SECTOR_SIZE_4K 4096 + +uint8_t *get_inquiry(uint8_t lun); +usb_sts_type msc_disk_read(uint8_t lun, uint32_t addr, uint8_t *read_buf, uint32_t len); +usb_sts_type msc_disk_write(uint8_t lun, uint32_t addr, uint8_t *buf, uint32_t len); +usb_sts_type msc_disk_capacity(uint8_t lun, uint32_t *blk_nbr, uint32_t *blk_size); + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/usb_conf.h new file mode 100644 index 0000000..238f80f --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/inc/usb_conf.h @@ -0,0 +1,149 @@ +/** + ************************************************************************** + * @file usb_conf.h + * @version v2.0.5 + * @date 2022-05-20 + * @brief usb config header file + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __USB_CONF_H +#define __USB_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "at32f415_usb.h" +#include "at32f415.h" +#include "stdio.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_USB_device_vcp_loopback + * @{ + */ + +/** + * @brief enable usb device mode + */ +#define USE_OTG_DEVICE_MODE + +/** + * @brief enable usb host mode + */ +/* #define USE_OTG_HOST_MODE */ + +#define USB_ID 0 +#define OTG_CLOCK CRM_OTGFS1_PERIPH_CLOCK +#define OTG_IRQ OTGFS1_IRQn +#define OTG_IRQ_HANDLER OTGFS1_IRQHandler +#define OTG_WKUP_IRQ OTGFS1_WKUP_IRQn + +#define OTG_WKUP_HANDLER OTGFS1_WKUP_IRQHandler +#define OTG_WKUP_EXINT_LINE EXINT_LINE_18 + +#define OTG_PIN_GPIO GPIOA +#define OTG_PIN_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK +#define OTG_PIN_VBUS GPIO_PINS_9 +#define OTG_PIN_ID GPIO_PINS_10 + +#define OTG_PIN_SOF_GPIO GPIOA +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK +#define OTG_PIN_SOF GPIO_PINS_8 + +/** + * @brief usb device mode config + */ +#ifdef USE_OTG_DEVICE_MODE +/** + * @brief usb device mode fifo + */ +/* otg1 device fifo */ +#define USBD_RX_SIZE 128 +#define USBD_EP0_TX_SIZE 24 +#define USBD_EP1_TX_SIZE 20 +#define USBD_EP2_TX_SIZE 20 +#define USBD_EP3_TX_SIZE 20 + +/** + * @brief usb endpoint max num define + */ +#ifndef USB_EPT_MAX_NUM +#define USB_EPT_MAX_NUM 4 +#endif +#endif + +/** + * @brief usb host mode config + */ +#ifdef USE_OTG_HOST_MODE +#ifndef USB_HOST_CHANNEL_NUM +#define USB_HOST_CHANNEL_NUM 8 +#endif + +/** + * @brief usb host mode fifo + */ +/* otg1 host fifo */ +#define USBH_RX_FIFO_SIZE 128 +#define USBH_NP_TX_FIFO_SIZE 96 +#define USBH_P_TX_FIFO_SIZE 96 +#endif + +/** + * @brief usb sof output enable + */ +/* #define USB_SOF_OUTPUT_ENABLE */ + +/** + * @brief ignore vbus detection, only available in at32f415xx revision C. + * at32f415xx revision B: (not support) + * the vbus detection pin (pa9) can not be used for other functionality. + * vbus pin must kept at VBUS or VDD. + * + * at32f415xx revision C: (support) + * ignore vbus detection, the internal vbus is always valid. + * the vbus pin (pa9) can be used for other functionality. + */ +/* #define USB_VBUS_IGNORE */ + +/** + * @brief usb low power wakeup handler enable + */ +/* #define USB_LOW_POWER_WAKUP */ + +void usb_delay_ms(uint32_t ms); +void usb_delay_us(uint32_t us); +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/mdk_v5/composite_vcp_msc.uvoptx b/project/at_start_f415/examples/usb_device/composite_vcp_msc/mdk_v5/composite_vcp_msc.uvoptx new file mode 100644 index 0000000..9ff48bc --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/mdk_v5/composite_vcp_msc.uvoptx @@ -0,0 +1,496 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + vcp_msc + 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 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\msc_diskio.c + msc_diskio.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 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_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_flash.c + at32f415_flash.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + at32f415_tmr.c + 0 + 0 + + + 3 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 14 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usb.c + at32f415_usb.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 15 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 16 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.s + 0 + 0 + + + + + usbd_driver + 0 + 0 + 0 + 0 + + 5 + 17 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usb_core.c + usb_core.c + 0 + 0 + + + 5 + 18 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_core.c + usbd_core.c + 0 + 0 + + + 5 + 19 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_int.c + usbd_int.c + 0 + 0 + + + 5 + 20 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_sdr.c + usbd_sdr.c + 0 + 0 + + + + + usbd_class + 0 + 0 + 0 + 0 + + 6 + 21 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\composite_cdc_msc\msc_bot_scsi.c + msc_bot_scsi.c + 0 + 0 + + + 6 + 22 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\composite_cdc_msc\cdc_msc_class.c + cdc_msc_class.c + 0 + 0 + + + 6 + 23 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\composite_cdc_msc\cdc_msc_desc.c + cdc_msc_desc.c + 0 + 0 + + + +
diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/mdk_v5/composite_vcp_msc.uvprojx b/project/at_start_f415/examples/usb_device/composite_vcp_msc/mdk_v5/composite_vcp_msc.uvprojx new file mode 100644 index 0000000..bb955a5 --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/mdk_v5/composite_vcp_msc.uvprojx @@ -0,0 +1,552 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + vcp_msc + 0x4 + ARM-ADS + 5060960::V5.06 update 7 (build 960)::.\ARMCC + 0 + + + -AT32F415RCT7 + ArteryTek + ArteryTek.AT32F415_DFP.2.0.0 + IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL03F0000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM)) + 0 + $$Device:- + + + + + + + + + + $$Device:-AT32F415RCT7$SVD\AT32F415xx_v2.svd + 0 + 0 + + + + AT32F415RCT7$Device\Include\at32f415.h\ + AT32F415RCT7$Device\Include\at32f415.h\ + + 0 + 0 + 0 + 0 + 1 + + .\objects\ + vcp_msc + 1 + 0 + 1 + 1 + 1 + .\listings\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 0 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4096 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 1 + 0x8000000 + 0x40000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x40000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + + + AT32F415RCT7,USE_STDPERIPH_DRIVER,AT_START_F415_V1 + + ..\..\..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\..\..\libraries\cmsis\cm4\device_support;..\..\..\..\..\..\libraries\drivers\inc;..\..\..\..\..\at32f415_board;..\inc;..\..\..\..\..\..\middlewares\usb_drivers\inc;..\..\..\..\..\..\middlewares\usbd_class\composite_cdc_msc + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + + user + + + at32f415_clock.c + 1 + ..\src\at32f415_clock.c + + + at32f415_int.c + 1 + ..\src\at32f415_int.c + + + main.c + 1 + ..\src\main.c + + + msc_diskio.c + 1 + ..\src\msc_diskio.c + + + + + bsp + + + at32f415_board.c + 1 + ..\..\..\..\..\at32f415_board\at32f415_board.c + + + + + firmware + + + at32f415_crm.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + + at32f415_exint.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + + + at32f415_flash.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_flash.c + + + at32f415_gpio.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + + + at32f415_misc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + + + at32f415_pwc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + + + at32f415_tmr.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + + + at32f415_usb.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usb.c + + + + + cmsis + + + system_at32f415.c + 1 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + + + startup_at32f415.s + 2 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + + + + + usbd_driver + + + usb_core.c + 1 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usb_core.c + + + usbd_core.c + 1 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_core.c + + + usbd_int.c + 1 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_int.c + + + usbd_sdr.c + 1 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_sdr.c + + + + + usbd_class + + + msc_bot_scsi.c + 1 + ..\..\..\..\..\..\middlewares\usbd_class\composite_cdc_msc\msc_bot_scsi.c + + + cdc_msc_class.c + 1 + ..\..\..\..\..\..\middlewares\usbd_class\composite_cdc_msc\cdc_msc_class.c + + + cdc_msc_desc.c + 1 + ..\..\..\..\..\..\middlewares\usbd_class\composite_cdc_msc\cdc_msc_desc.c + + + + + + + + + + + + + + + + + <Project Info> + + + + + + 0 + 1 + + + + +
diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/readme.txt b/project/at_start_f415/examples/usb_device/composite_vcp_msc/readme.txt new file mode 100644 index 0000000..42fc61e --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/readme.txt @@ -0,0 +1,14 @@ +/** + ************************************************************************** + * @file readme.txt + * @version v2.0.5 + * @date 2022-05-20 + * @brief readme + ************************************************************************** + */ + + This demo is based on the at-start board, in this demo, show how to build + composite device of usb cdc class and usb mass storage protocol. + for more detailed information, please refer to the application note document AN0097. + + diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/at32f415_clock.c new file mode 100644 index 0000000..bd18af2 --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/at32f415_clock.c @@ -0,0 +1,99 @@ +/** + ************************************************************************** + * @file at32f415_clock.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief system clock config program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f415_clock.h" + +/** + * @brief system clock config program + * @note the system clock is configured as follow: + * - system clock = hext / 2 * pll_mult + * - system clock source = pll (hext) + * - hext = 8000000 + * - sclk = 144000000 + * - ahbdiv = 1 + * - ahbclk = 144000000 + * - apb2div = 2 + * - apb2clk = 72000000 + * - apb1div = 2 + * - apb1clk = 72000000 + * - pll_mult = 36 + * - flash_wtcyc = 4 cycle + * @param none + * @retval none + */ +void system_clock_config(void) +{ + /* config flash psr register */ + flash_psr_set(FLASH_WAIT_CYCLE_4); + + /* reset crm */ + crm_reset(); + + crm_clock_source_enable(CRM_CLOCK_SOURCE_HEXT, TRUE); + + /* wait till hext is ready */ + while(crm_hext_stable_wait() == ERROR) + { + } + + /* config pll clock resource */ + crm_pll_config(CRM_PLL_SOURCE_HEXT_DIV, CRM_PLL_MULT_36); + + /* enable pll */ + crm_clock_source_enable(CRM_CLOCK_SOURCE_PLL, TRUE); + + /* wait till pll is ready */ + while(crm_flag_get(CRM_PLL_STABLE_FLAG) != SET) + { + } + + /* config ahbclk */ + crm_ahb_div_set(CRM_AHB_DIV_1); + + /* config apb2clk */ + crm_apb2_div_set(CRM_APB2_DIV_2); + + /* config apb1clk */ + crm_apb1_div_set(CRM_APB1_DIV_2); + + /* enable auto step mode */ + crm_auto_step_mode_enable(TRUE); + + /* select pll as system clock source */ + crm_sysclk_switch(CRM_SCLK_PLL); + + /* wait till pll is used as system clock source */ + while(crm_sysclk_switch_status_get() != CRM_SCLK_PLL) + { + } + + /* disable auto step mode */ + crm_auto_step_mode_enable(FALSE); + + /* update system_core_clock global variable */ + system_core_clock_update(); +} diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/at32f415_int.c new file mode 100644 index 0000000..3516a10 --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/at32f415_int.c @@ -0,0 +1,145 @@ +/** + ************************************************************************** + * @file at32f415_int.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief main interrupt service routines. + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f415_int.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_CRC_calculation + * @{ + */ + +/** + * @brief this function handles nmi exception. + * @param none + * @retval none + */ +void NMI_Handler(void) +{ +} + +/** + * @brief this function handles hard fault exception. + * @param none + * @retval none + */ +void HardFault_Handler(void) +{ + /* go to infinite loop when hard fault exception occurs */ +// __nop(); +// __nop(); + while(1) + { + } +} + +/** + * @brief this function handles memory manage exception. + * @param none + * @retval none + */ +void MemManage_Handler(void) +{ + /* go to infinite loop when memory manage exception occurs */ + + while(1) + { + } + +} + +/** + * @brief this function handles bus fault exception. + * @param none + * @retval none + */ +void BusFault_Handler(void) +{ + /* go to infinite loop when bus fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles usage fault exception. + * @param none + * @retval none + */ +void UsageFault_Handler(void) +{ + /* go to infinite loop when usage fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles svcall exception. + * @param none + * @retval none + */ +void SVC_Handler(void) +{ +} + +/** + * @brief this function handles debug monitor exception. + * @param none + * @retval none + */ +void DebugMon_Handler(void) +{ +} + +/** + * @brief this function handles pendsv_handler exception. + * @param none + * @retval none + */ +void PendSV_Handler(void) +{ +} + +/** + * @brief this function handles systick handler. + * @param none + * @retval none + */ +void SysTick_Handler(void) +{ +} + +/** + * @} + */ + +/** + * @} + */ diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/main.c b/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/main.c new file mode 100644 index 0000000..5098bce --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/main.c @@ -0,0 +1,264 @@ +/** + ************************************************************************** + * @file main.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief main program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +#include "at32f415_board.h" +#include "at32f415_clock.h" +#include "usb_conf.h" +#include "usb_core.h" +#include "usbd_int.h" +#include "cdc_msc_class.h" +#include "cdc_msc_desc.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_USB_device_vcp_loopback USB_device_vcp_loopback + * @{ + */ + +/* usb global struct define */ +otg_core_type otg_core_struct; +uint8_t usb_buffer[256]; +void usb_clock48m_select(usb_clk48_s clk_s); +void usb_gpio_config(void); +void usb_low_power_wakeup_config(void); + +/** + * @brief main function. + * @param none + * @retval none + */ +int main(void) +{ + uint16_t data_len; + + uint32_t timeout; + + uint8_t send_zero_packet = 0; + + nvic_priority_group_config(NVIC_PRIORITY_GROUP_4); + + system_clock_config(); + + at32_board_init(); + + /* usb gpio config */ + usb_gpio_config(); + +#ifdef USB_LOW_POWER_WAKUP + usb_low_power_wakeup_config(); +#endif + + /* enable otgfs clock */ + crm_periph_clock_enable(OTG_CLOCK, TRUE); + + /* select usb 48m clcok source */ + usb_clock48m_select(USB_CLK_HEXT); + + /* enable otgfs irq */ + nvic_irq_enable(OTG_IRQ, 0, 0); + + /* init usb */ + usbd_init(&otg_core_struct, + USB_FULL_SPEED_CORE_ID, + USB_ID, + &cdc_msc_class_handler, + &cdc_msc_desc_handler); + while(1) + { + /* get usb vcp receive data */ + data_len = usb_vcp_get_rxdata(&otg_core_struct.dev, usb_buffer); + + 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 = 5000000; + do + { + /* send data to host */ + if(usb_vcp_send_data(&otg_core_struct.dev, usb_buffer, data_len) == SUCCESS) + { + break; + } + }while(timeout --); + } + } +} + +/** + * @brief usb 48M clock select + * @param clk_s:USB_CLK_HICK, USB_CLK_HEXT + * @retval none + */ +void usb_clock48m_select(usb_clk48_s clk_s) +{ + switch(system_core_clock) + { + /* 48MHz */ + case 48000000: + crm_usb_clock_div_set(CRM_USB_DIV_1); + break; + + /* 72MHz */ + case 72000000: + crm_usb_clock_div_set(CRM_USB_DIV_1_5); + break; + + /* 96MHz */ + case 96000000: + crm_usb_clock_div_set(CRM_USB_DIV_2); + break; + + /* 120MHz */ + case 120000000: + crm_usb_clock_div_set(CRM_USB_DIV_2_5); + break; + + /* 144MHz */ + case 144000000: + crm_usb_clock_div_set(CRM_USB_DIV_3); + break; + + default: + break; + } +} + +/** + * @brief this function config gpio. + * @param none + * @retval none + */ +void usb_gpio_config(void) +{ + gpio_init_type gpio_init_struct; + + crm_periph_clock_enable(OTG_PIN_GPIO_CLOCK, TRUE); + gpio_default_para_init(&gpio_init_struct); + + 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_pull = GPIO_PULL_NONE; + +#ifdef USB_SOF_OUTPUT_ENABLE + crm_periph_clock_enable(OTG_PIN_SOF_GPIO_CLOCK, TRUE); + gpio_init_struct.gpio_pins = OTG_PIN_SOF; + gpio_init(OTG_PIN_SOF_GPIO, &gpio_init_struct); +#endif + + /* otgfs use vbus pin */ +#ifndef USB_VBUS_IGNORE + gpio_init_struct.gpio_pins = OTG_PIN_VBUS; + gpio_init_struct.gpio_pull = GPIO_PULL_DOWN; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init(OTG_PIN_GPIO, &gpio_init_struct); +#endif + + +} +#ifdef USB_LOW_POWER_WAKUP +/** + * @brief usb low power wakeup interrupt config + * @param none + * @retval none + */ +void usb_low_power_wakeup_config(void) +{ + exint_init_type exint_init_struct; + + exint_default_para_init(&exint_init_struct); + + exint_init_struct.line_enable = TRUE; + exint_init_struct.line_mode = EXINT_LINE_INTERRUPUT; + exint_init_struct.line_select = OTG_WKUP_EXINT_LINE; + exint_init_struct.line_polarity = EXINT_TRIGGER_RISING_EDGE; + exint_init(&exint_init_struct); + + nvic_irq_enable(OTG_WKUP_IRQ, 0, 0); +} + +/** + * @brief this function handles otgfs wakup interrupt. + * @param none + * @retval none + */ +void OTG_WKUP_HANDLER(void) +{ + exint_flag_clear(OTG_WKUP_EXINT_LINE); +} + +#endif + +/** + * @brief this function handles otgfs interrupt. + * @param none + * @retval none + */ +void OTG_IRQ_HANDLER(void) +{ + usbd_irq_handler(&otg_core_struct); +} + +/** + * @brief usb delay millisecond function. + * @param ms: number of millisecond delay + * @retval none + */ +void usb_delay_ms(uint32_t ms) +{ + /* user can define self delay function */ + delay_ms(ms); +} + +/** + * @brief usb delay microsecond function. + * @param us: number of microsecond delay + * @retval none + */ +void usb_delay_us(uint32_t us) +{ + delay_us(us); +} + +/** + * @} + */ + +/** + * @} + */ diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/msc_diskio.c b/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/msc_diskio.c new file mode 100644 index 0000000..52d6ecc --- /dev/null +++ b/project/at_start_f415/examples/usb_device/composite_vcp_msc/src/msc_diskio.c @@ -0,0 +1,180 @@ +/** + ************************************************************************** + * @file msc_diskio.c + * @version v2.0.5 + * @date 2022-05-20 + * @brief usb mass storage disk function + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ +#include "msc_diskio.h" +// #include "msc_bot_scsi.h" +#include "cdc_msc_class.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_USB_device_msc + * @{ + */ +uint32_t sector_size = 2048; +uint32_t msc_flash_size; +uint8_t scsi_inquiry[MSC_SUPPORT_MAX_LUN][SCSI_INQUIRY_DATA_LENGTH] = +{ + /* lun = 0 */ + { + 0x00, /* peripheral device type (direct-access device) */ + 0x80, /* removable media bit */ + 0x00, /* ansi version, ecma version, iso version */ + 0x01, /* respond data format */ + SCSI_INQUIRY_DATA_LENGTH - 5, /* additional length */ + 0x00, 0x00, 0x00, /* reserved */ + 'A', 'T', '3', '2', ' ', ' ', ' ', ' ', /* vendor information "AT32" */ + 'D', 'i', 's', 'k', '0', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /* Product identification "Disk" */ + '2', '.', '0', '0' /* product revision level */ + } +}; + +/** + * @brief get disk inquiry + * @param lun: logical units number + * @retval inquiry string + */ +uint8_t *get_inquiry(uint8_t lun) +{ + if(lun < MSC_SUPPORT_MAX_LUN) + return (uint8_t *)scsi_inquiry[lun]; + else + return NULL; +} + +/** + * @brief disk read + * @param lun: logical units number + * @param addr: logical address + * @param read_buf: pointer to read buffer + * @param len: read length + * @retval status of usb_sts_type + */ +usb_sts_type msc_disk_read(uint8_t lun, uint32_t addr, uint8_t *read_buf, uint32_t len) +{ + uint32_t i = 0; + uint32_t flash_addr = addr + USB_FLASH_ADDR_OFFSET; + switch(lun) + { + case INTERNAL_FLASH_LUN: + for(i = 0; i < len; i ++) + { + read_buf[i] = *((uint8_t *)flash_addr); + flash_addr += 1; + } + break; + case SPI_FLASH_LUN: + break; + case SD_LUN: + break; + default: + break; + } + return USB_OK; +} + +/** + * @brief disk write + * @param lun: logical units number + * @param addr: logical address + * @param buf: pointer to write buffer + * @param len: write length + * @retval status of usb_sts_type + */ +usb_sts_type msc_disk_write(uint8_t lun, uint32_t addr, uint8_t *buf, uint32_t len) +{ + uint32_t flash_addr = addr + USB_FLASH_ADDR_OFFSET; + uint32_t i = 0, tolen = len; + uint32_t erase_addr = flash_addr; + switch(lun) + { + case INTERNAL_FLASH_LUN: + flash_unlock(); + while(tolen >= sector_size) + { + flash_sector_erase(erase_addr); + tolen -= sector_size; + erase_addr += sector_size; + } + for(i = 0; i < len; i ++) + { + flash_byte_program(flash_addr+i, buf[i]); + } + flash_lock(); + break; + case SPI_FLASH_LUN: + break; + case SD_LUN: + break; + default: + break;; + } + return USB_OK; +} + +/** + * @brief disk capacity + * @param lun: logical units number + * @param blk_nbr: pointer to number of block + * @param blk_size: pointer to block size + * @retval status of usb_sts_type + */ +usb_sts_type msc_disk_capacity(uint8_t lun, uint32_t *blk_nbr, uint32_t *blk_size) +{ + uint32_t flash_s = *((uint32_t *)0x1FFFF7E0); + msc_flash_size = (flash_s << 10) - (USB_FLASH_ADDR_OFFSET - FLASH_BASE); + + if(flash_s < 256) + { + sector_size = SECTOR_SIZE_1K; + } + else + { + sector_size = SECTOR_SIZE_2K; + } + switch(lun) + { + case INTERNAL_FLASH_LUN: + *blk_nbr = msc_flash_size / sector_size; + *blk_size = sector_size; + break; + case SPI_FLASH_LUN: + break; + case SD_LUN: + break; + default: + break; + } + return USB_OK; +} + +/** + * @} + */ + +/** + * @} + */ 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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 11a893f..9593c00 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 4153463..00965fd 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,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, show how to build a device of usb hid class protocol. + for more detailed information, please refer to the application note document AN0097. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2801ba6..87bbd2d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ce78041..ce6a556 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 afe3382..db98821 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 75d1627..499383d 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/readme.txt +++ b/project/at_start_f415/examples/usb_device/keyboard/readme.txt @@ -1,12 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to build a hid keyboard device use hid class protocol. + for more detailed information, please refer to the application note document AN0097. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 abf8d9f..8ef5e8b 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 0dd73d0..daa35c9 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d3cb2dc..fdf4429 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 50592ac..e52ab12 100644 --- a/project/at_start_f415/examples/usb_device/mouse/readme.txt +++ b/project/at_start_f415/examples/usb_device/mouse/readme.txt @@ -1,12 +1,13 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, shows how to build a hid mouse device use hid class protocol. + for more detailed information, please refer to the application note document AN0097. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9b5352c..a0b94eb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1a13fae..f4a8f1c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ec36205..560c7d6 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7f208e8..de5b396 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 4943ef8..c1d169e 100644 --- a/project/at_start_f415/examples/usb_device/msc/readme.txt +++ b/project/at_start_f415/examples/usb_device/msc/readme.txt @@ -1,13 +1,14 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, show how to build - a device of usb mass storage protocol. + a device of usb mass storage protocol. + for more detailed information, please refer to the application note document AN0097. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 53c80b0..29d1ca0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1e83bd2..8abb217 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 173cb99..98feb88 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 11b77d2..5e4c6d7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 b87c6db..fd9381c 100644 --- a/project/at_start_f415/examples/usb_device/printer/readme.txt +++ b/project/at_start_f415/examples/usb_device/printer/readme.txt @@ -1,10 +1,11 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, description of the usb printer example. + for more detailed information, please refer to the application note document AN0097. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d83080d..2ed6ceb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e84954..94dde33 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 c8dc7b2..2d4bf07 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 16ab71a..d6491df 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,11 +1,12 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, show how to build a device of usb cdc class protocol. + for more detailed information, please refer to the application note document AN0097. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 e17751e..89faf04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ef60426..23c6b7a 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_clock.h index 6b86c06..ca77a1e 100644 --- a/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_clock.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_conf.h index 877b876..2044f04 100644 --- a/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_int.h index 2884c5a..6210e55 100644 --- a/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/virtual_comport/inc/usb_conf.h index 981d5a2..da7de02 100644 --- a/project/at_start_f415/examples/usb_device/virtual_comport/inc/usb_conf.h +++ b/project/at_start_f415/examples/usb_device/virtual_comport/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/readme.txt b/project/at_start_f415/examples/usb_device/virtual_comport/readme.txt index e1f022c..e42f1a2 100644 --- a/project/at_start_f415/examples/usb_device/virtual_comport/readme.txt +++ b/project/at_start_f415/examples/usb_device/virtual_comport/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,3 +10,4 @@ this demo is based on the at-start board, in this demo, show how to build a device of usb virtual comport,when use this demo,please connect usart2 tx pin(pa2) and rx pin(pa3). + for more detailed information, please refer to the application note document AN0097. diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_clock.c index 8e9f03e..dddab9c 100644 --- a/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_clock.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_int.c index 93f339e..86cefdc 100644 --- a/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/src/main.c b/project/at_start_f415/examples/usb_device/virtual_comport/src/main.c index e5fd140..75bad33 100644 --- a/project/at_start_f415/examples/usb_device/virtual_comport/src/main.c +++ b/project/at_start_f415/examples/usb_device/virtual_comport/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 8e33976..f22f7bd 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief fat16 file system header file ************************************************************************** * Copyright notice & Disclaimer @@ -52,10 +52,10 @@ extern "C" { #define FAT16_DIR_SIZE 47 #define FLASH_FAT16_BOOT_SECTOR_ADDR 0x00 -#define FLASH_FAT16_1_ADDR 0x1000 -#define FLASH_FAT16_2_ADDR 0x7800 -#define FLASH_FAT16_ROOT_ADDR 0xE000 -#define FLASH_FAT16_FILE_START_ADDR 0x12000 +#define FLASH_FAT16_1_ADDR 0x3000 +#define FLASH_FAT16_2_ADDR 0x3800 +#define FLASH_FAT16_ROOT_ADDR 0x4000 +#define FLASH_FAT16_FILE_START_ADDR 0x8800 #define FLASH_APP_START_ADDR 0x08006000 @@ -75,14 +75,14 @@ extern "C" { #define INVAILD_OFFSET_ADDR 0xFFFFFFFF #define IAP_UPGRADE_COMPLETE_FLAG 0x41544B38 #define IAP_SUCCESS 0 -#define IAP_ERROR 1 +#define IAP_FAILED 1 typedef enum { UPGRADE_READY = 0, UPGRAGE_ONGOING, UPGRADE_SUCCESS, - UPGRADE_ERROR, + UPGRADE_FAILED, UPGRADE_LARGE, UPGRADE_UNKNOWN, UPGRADE_DONE, 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 ef1cdc2..1c08347 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 ae776ca..0aa73b0 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 c23e4d2..5be33d0 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,13 +1,14 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, show how to build a virutal msc device of usb mass storage protocol. + for more detailed information, please refer to the application note document AN0097. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3494371..2e4fd5e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 4f954a3..0a1f988 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief fat16 file system ************************************************************************** * Copyright notice & Disclaimer @@ -34,49 +34,77 @@ * @{ */ #define FAT16_SECTOR_SIZE 62 -static uint8_t fat16_sector[FAT16_SECTOR_SIZE] = +static uint8_t fat16_sector[FAT16_SECTOR_SIZE] = { - 0xEB, /*00 - BS_jmpBoot */ - 0x3C, /*01 - BS_jmpBoot */ - 0x90, /*02 - BS_jmpBoot */ - 'M','S','D','O','S','5','.','0', /* 03-10 - BS_OEMName */ - 0x00, /*11 - BPB_BytesPerSec = 2048 */ - 0x08, /*11 - BPB_BytesPerSec = 2048 */ - 0x04, /*13 - BPB_Sec_PerClus = 2K*4 = 8K*/ - 2, /*14 - BPB_RsvdSecCnt = 2 */ - 0, /*15 - BPB_RsvdSecCnt = 2 */ - 2, /*16 - BPB_NumFATs = 2 */ - 0x0, /*17 - BPB_RootEntCnt = 512 */ - 0x2, /*18 - BPB_RootEntCnt = 512 */ - 0, /*19 - BPB_TotSec16 = 0 */ - 0, /*20 - BPB_TotSec16 = 0 */ - 0xF8, /*21 - BPB_Media = 0xF8 */ - 0x0D, /*22 - BPBFATSz16 = 0x000D */ - 0, /*23 - BPBFATSz16 = 0x000D */ - 0x3F, /*24 - BPB_SecPerTrk = 0x003F */ - 0, /*25 - BPB_SecPerTrk = 0x003F */ - 0xFF, /*26 - BPB_NumHeads = 255 */ - 0, /*27 - BPB_NumHeads = 255 */ - 0, /*28 - BPB_HiddSec = 0 */ - 0, /*29 - BPB_HiddSec = 0 */ - 0, /*30 - BPB_HiddSec = 0 */ - 0, /*31 - BPB_HiddSec = 0 */ - 0x00, /*32 - BPB_TotSec32 = */ - 0xC8, /*33 - BPB_TotSec32 = 0x0000C800 100Mb*/ - 0x00, /*34 - BPB_TotSec32 = */ - 0x00, /*35 - BPB_TotSec32 = */ - 0x80, /*36 - BS_DrvNum = 0x80 */ - 0, /*37 - BS_Reserved1 = 0 , dirty bit = 0*/ /* Updated from FSL*/ - 0x29, /*38 - BS_BootSig = 0x29 */ - 0xBD, /*39 - BS_VolID = 0x02DDA5BD */ - 0xA5, /*40 - BS_VolID = 0x02DDA5BD */ - 0xDD, /*41 - BS_VolID = 0x02DDA5BD */ - 0x02, /*42 - BS_VolID = 0x02DDA5BD */ - 'N','O',' ','N','A','M','E',' ',' ',' ',' ',/*43-53 - BS_VolLab */ - 'F','A','T','1','6',' ',' ',' ' /*54-61 - BS_FilSysType */ + 0xEB, /*0*/ + 0x3C, /*1*/ + 0x90, /*2*/ + 0x4D, /*3*/ + 0x53, /*4*/ + 0x44, /*5*/ + 0x4F, /*6*/ + 0x53, /*7*/ + 0x35, /*8*/ + 0x2E, /*9*/ + 0x30, /*10*/ + 0x00, /*11*/ + 0x08, /*12*/ //2K + 0x04, /*13*/ + 0x06, /*14*/ + 0x00, /*15*/ + + 0x02, /*16*/ + 0x00, /*17*/ + 0x02, /*18*/ + 0xFF, /*19*/ + 0x0F, /*20*/ + 0xF8, /*21*/ + 0x01, /*22*/ + 0x00, /*23*/ + 0x01, /*24*/ + 0x00, /*25*/ + 0x01, /*26*/ + 0x00, /*27*/ + 0x00, /*28*/ + 0x00, /*29*/ + 0x00, /*30*/ + 0x00, /*31*/ + + 0x00, /*32*/ + 0x00, /*33*/ + 0x00, /*34*/ + 0x00, /*35*/ + 0x00, /*36*/ + 0x00, /*37*/ + 0x29, /*38*/ + 0x96, /*39*/ + 0x16, /*40*/ + 0x66, /*41*/ + 0xD3, /*42*/ + 0x20, /*43*/ + 0x20, /*44*/ + 0x20, /*45*/ + 0x20, /*46*/ + 0x20, /*47*/ + + 0x20, /*48*/ + 0x20, /*49*/ + 0x20, /*50*/ + 0x20, /*51*/ + 0x20, /*52*/ + 0x20, /*53*/ + 0x46, /*54*/ + 0x41, /*55*/ + 0x54, /*56*/ + 0x31, /*57*/ + 0x36, /*58*/ + 0x20, /*59*/ + 0x20, /*60*/ + 0x20 /*61*/ }; + const uint8_t fat16_root_dir_sector[FAT16_DIR_SIZE]= { 0x20, /*11 - Archive Attribute set */ @@ -144,13 +172,7 @@ uint8_t fat16_file_name[FAT16_FILENAME_SIZE] = fat_dir_type g_file_attr; flash_iap_type flash_iap; uint32_t file_write_nr = 0; - - -uint32_t flash_fat16_boot_sector_addr = 0x00; -uint32_t flash_fat16_1_addr = 0x1000; -uint32_t flash_fat16_2_addr = 0x7800; -uint32_t flash_fat16_root_addr = 0xE000; -uint32_t flash_fat16_file_start_addr = 0x12000; +uint8_t file_match = 0; uint32_t flash_fat16_boot_dir_write(uint32_t fat_lbk, uint8_t *data, uint32_t len); uint32_t flash_fat16_sector_write(uint32_t fat_lbk, uint8_t *data, uint32_t len); @@ -254,7 +276,7 @@ uint8_t flash_fat16_get_upgrade_flag(void) } else { - return IAP_ERROR; + return IAP_FAILED; } } @@ -269,31 +291,33 @@ uint8_t flash_fat16_get_upgrade_flag(void) uint32_t flash_fat16_read(uint32_t fat_lbk, uint8_t *data, uint32_t len) { uint32_t i_index = 0; - if(fat_lbk == flash_fat16_boot_sector_addr) + switch(fat_lbk) { - i_index += fat16_memory_copy(data, fat16_sector, FAT16_SECTOR_SIZE); - i_index += 2; + case FLASH_FAT16_BOOT_SECTOR_ADDR: + i_index += fat16_memory_copy(data, fat16_sector, FAT16_SECTOR_SIZE); + i_index += 2; - fat16_memory_memset(data+i_index, 0, FAT16_BYTE_PER_SIZE-i_index); - } - else if((fat_lbk == flash_fat16_1_addr) || - (fat_lbk == flash_fat16_2_addr)) - { - i_index += fat16_memory_copy(data, fat16_table_sector0, FAT16_TABLE_SIZE); + fat16_memory_memset(data+i_index, 0, FAT16_BYTE_PER_SIZE-i_index); + data[510] = 0x55; + data[511] = 0xAA; - fat16_memory_memset(data+i_index, 0, FAT16_BYTE_PER_SIZE-i_index); - } - else if(fat_lbk == flash_fat16_root_addr) - { - i_index += fat16_memory_copy(data, fat16_file_name, FAT16_FILENAME_SIZE); - i_index += fat16_memory_copy(data + i_index, fat16_root_dir_sector, FAT16_DIR_SIZE); + break; + case FLASH_FAT16_1_ADDR: + case FLASH_FAT16_2_ADDR: + i_index += fat16_memory_copy(data, fat16_table_sector0, FAT16_TABLE_SIZE); - fat16_memory_memset(data+i_index, 0, FAT16_BYTE_PER_SIZE-i_index); - } - else - { - i_index = 0; - fat16_memory_memset(data+i_index, 0, FAT16_BYTE_PER_SIZE-i_index); + fat16_memory_memset(data+i_index, 0, FAT16_BYTE_PER_SIZE-i_index); + break; + case FLASH_FAT16_ROOT_ADDR: + i_index += fat16_memory_copy(data, fat16_file_name, FAT16_FILENAME_SIZE); + i_index += fat16_memory_copy(data + i_index, fat16_root_dir_sector, FAT16_DIR_SIZE); + + fat16_memory_memset(data+i_index, 0, FAT16_BYTE_PER_SIZE-i_index); + break; + default: + i_index = 0; + fat16_memory_memset(data+i_index, 0, FAT16_BYTE_PER_SIZE-i_index); + break; } return FAT16_BYTE_PER_SIZE; } @@ -307,18 +331,23 @@ uint32_t flash_fat16_read(uint32_t fat_lbk, uint8_t *data, uint32_t len) */ uint32_t flash_fat16_write(uint32_t fat_lbk, uint8_t *data, uint32_t len) { - if(fat_lbk == flash_fat16_root_addr) + switch(fat_lbk) { - flash_fat16_boot_dir_write(fat_lbk, data, len); - } - else - { - if(fat_lbk >= flash_fat16_file_start_addr) - { - flash_fat16_sector_write(fat_lbk, data, len); - } - } + case FLASH_FAT16_BOOT_SECTOR_ADDR: + case FLASH_FAT16_1_ADDR: + case FLASH_FAT16_2_ADDR: + break; + case FLASH_FAT16_ROOT_ADDR: + flash_fat16_boot_dir_write(fat_lbk, data, len); + break; + default: + if(fat_lbk >= FLASH_FAT16_FILE_START_ADDR) + { + flash_fat16_sector_write(fat_lbk, data, len); + } + break; + } return len; } @@ -375,6 +404,23 @@ uint32_t flash_fat16_boot_dir_write(uint32_t fat_lbk, uint8_t *data, uint32_t le if(i_index <= 512 && loop_len < len) { fat16_memory_copy((uint8_t *)&g_file_attr, (const uint8_t *)pdir, 32); + + if(file_match == 1) + { + file_match = 0; + if(g_file_attr.file_size > 0) + { + if(flash_iap.file_write_nr >= g_file_attr.file_size) + { + /* upgrade finish */ + flash_iap.file_write_nr = 0; + flash_iap.msc_up_status = UPGRADE_SUCCESS; + + /* set the upgrade done flag to flash */ + flash_fat16_set_upgrade_flag(); + } + } + } g_file_attr.write_data = 0; g_file_attr.write_time = 0; flash_iap.file_write_nr = 0; @@ -457,7 +503,15 @@ uint32_t flash_fat16_sector_write(uint32_t fat_lbk, uint8_t *data, uint32_t len) { return 0; } - + + if(g_file_attr.file_size == 0) + { + g_file_attr.file_size = flash_iap.flash_app_size; + file_match = 1; + } + + file_size = g_file_attr.file_size; + if(flash_iap.msc_up_status == UPGRADE_READY) { /* get offset address from filename */ @@ -505,7 +559,7 @@ uint32_t flash_fat16_sector_write(uint32_t fat_lbk, uint8_t *data, uint32_t len) { /* upgrade error */ flash_iap.file_write_nr = 0; - flash_iap.msc_up_status = UPGRADE_ERROR; + flash_iap.msc_up_status = UPGRADE_FAILED; } } else @@ -524,7 +578,6 @@ uint32_t flash_fat16_sector_write(uint32_t fat_lbk, uint8_t *data, uint32_t len) else { /* unkonw upgrade status */ - flash_iap.msc_up_status = UPGRADE_UNKNOWN; } return len; @@ -553,7 +606,7 @@ uint32_t flash_crc_check(uint32_t address, uint8_t *data, uint32_t len) if(remain_len) { wlen += 1; - for(i_index = 0; i_index < remain_len; i_index ++) + for(i_index = 0; i_index < (4 - remain_len); i_index ++) { data[len+i_index] = 0xFF; } @@ -659,6 +712,14 @@ uint32_t flash_write_data(uint32_t address, uint8_t *data, uint32_t len) void flash_fat16_init(void) { uint32_t flash_size = *(uint32_t *)0x1FFFF7E0; + flash_iap.flash_base_addr = FLASH_BASE; + flash_iap.flash_app_addr = FLASH_APP_START_ADDR; + flash_iap.write_addr = FLASH_APP_START_ADDR; + flash_iap.flash_size = flash_size << 10; + + flash_iap.flash_app_size = flash_iap.flash_size - + (flash_iap.flash_app_addr - + flash_iap.flash_base_addr); if(flash_size < 0x100) { @@ -670,24 +731,7 @@ void flash_fat16_init(void) flash_iap.sector_size = FLASH_SECTOR_2K_SIZE; flash_iap.sector_mask = FLASH_SECTOR_2K_ALLGNED; } - - flash_iap.flash_base_addr = FLASH_BASE; - flash_iap.flash_app_addr = FLASH_APP_START_ADDR; - flash_iap.write_addr = FLASH_APP_START_ADDR; - flash_iap.flash_size = flash_size << 10; - - flash_iap.flash_app_size = flash_iap.flash_size - - (flash_iap.flash_app_addr - - flash_iap.flash_base_addr); - - flash_fat16_1_addr = flash_iap.sector_size * 2; - flash_fat16_2_addr = flash_iap.sector_size * 15; - flash_fat16_root_addr = flash_iap.sector_size * 28; - flash_fat16_file_start_addr = flash_iap.sector_size * 32; - - fat16_sector[11] = (uint8_t)(flash_iap.sector_size & 0xFF); - fat16_sector[12] = (uint8_t)((flash_iap.sector_size >> 8) & 0xFF); - + } 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 94e94ab..4dac806 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -217,7 +217,7 @@ void OTG_WKUP_HANDLER(void) * @param none * @retval none */ -void usb_re_connect() +void usb_reset() { delay_ms(1000); usbd_disconnect(&otg_core_struct.dev); @@ -252,17 +252,17 @@ void flash_fat16_loop_status(void) case UPGRADE_SUCCESS: flash_fat16_set_name((const uint8_t *)"Success", 7); flash_iap.msc_up_status = UPGRADE_DONE; - usb_re_connect(); + usb_reset(); break; - case UPGRADE_ERROR: - flash_fat16_set_name((const uint8_t *)"error", 6); + case UPGRADE_FAILED: + flash_fat16_set_name((const uint8_t *)"Failed", 6); flash_iap.msc_up_status = UPGRADE_DONE; - usb_re_connect(); + usb_reset(); break; case UPGRADE_LARGE: flash_fat16_set_name((const uint8_t *)"Large", 5); flash_iap.msc_up_status = UPGRADE_DONE; - usb_re_connect(); + usb_reset(); break; case UPGRADE_UNKNOWN: flash_fat16_set_name((const uint8_t *)"Unkown", 6); 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 8da6c83..ccdaac7 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb mass storage disk function ************************************************************************** * Copyright notice & Disclaimer @@ -119,8 +119,8 @@ 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 = (100*1024*1024 / FLASH_SECTOR_2K_SIZE); - *blk_size = flash_iap.sector_size; + *blk_nbr = 0x0FFF; + *blk_size = FLASH_SECTOR_2K_SIZE; break; case SPI_FLASH_LUN: break; 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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3132049..93937d5 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 d9bd7f7..b6dbe17 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 0b05f2b..f012706 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,4 +11,5 @@ when an usb device is attached to the host port, the device is enumerated and checked whether it can support hid device or not,the demo just support keyboard - and mouse device. \ No newline at end of file + and mouse device. + for more detailed information, please refer to the application note document AN0097. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9b5352c..a0b94eb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 d8633b6..e7afe39 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 f81968f..8a061ab 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 7a8cd9a..299cf86 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3132049..93937d5 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer 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 d9bd7f7..b6dbe17 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 3935a56..0b39c91 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -10,4 +10,5 @@ this demo provides a description of how to use the usb otg host peripheral. when an usb device is attached to the host port, the device is enumerated and - checked whether it msc device. \ No newline at end of file + checked whether it msc device. + for more detailed information, please refer to the application note document AN0097. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 9b5352c..a0b94eb 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 38945d5..1df564c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer 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 6ac5592..fc0e945 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 5bb6204..8df9c0c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 832ca02..a079a35 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,3 +11,4 @@ operation, the wdt count value is continuously reloaded in the main function, and wdt reset will not occur at this time. when the wakeup button is pressed, the function stops reloading the wdt count value, resulting in wdt reset. + for more detailed information. please refer to the application note document AN0045. 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 374354a..dcf347d 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6a78667..02ab6fd 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_clock.h b/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_clock.h index 6b86c06..ca77a1e 100644 --- a/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_clock.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_conf.h b/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_conf.h index 877b876..2044f04 100644 --- a/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_int.h b/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_int.h index 2884c5a..6210e55 100644 --- a/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_int.h +++ b/project/at_start_f415/examples/wdt/wdt_standby/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_standby/readme.txt b/project/at_start_f415/examples/wdt/wdt_standby/readme.txt index 346d291..e648e29 100644 --- a/project/at_start_f415/examples/wdt/wdt_standby/readme.txt +++ b/project/at_start_f415/examples/wdt/wdt_standby/readme.txt @@ -1,12 +1,13 @@ /** ************************************************************************** * @file wdt_standby/readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ this demo is based on the at-start board, in this demo, the wdt wakeup mcu from standby mode. if the chip is wakeup from standby mode by wdt, led4 - will be on. + will be on.for more detailed information. please refer to the application + note document AN0045. diff --git a/project/at_start_f415/examples/wdt/wdt_standby/src/at32f415_clock.c b/project/at_start_f415/examples/wdt/wdt_standby/src/at32f415_clock.c index 8e9f03e..dddab9c 100644 --- a/project/at_start_f415/examples/wdt/wdt_standby/src/at32f415_clock.c +++ b/project/at_start_f415/examples/wdt/wdt_standby/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_clock.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_standby/src/at32f415_int.c b/project/at_start_f415/examples/wdt/wdt_standby/src/at32f415_int.c index 69d852c..497117f 100644 --- a/project/at_start_f415/examples/wdt/wdt_standby/src/at32f415_int.c +++ b/project/at_start_f415/examples/wdt/wdt_standby/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_standby/src/main.c b/project/at_start_f415/examples/wdt/wdt_standby/src/main.c index 7720e7b..a80ffef 100644 --- a/project/at_start_f415/examples/wdt/wdt_standby/src/main.c +++ b/project/at_start_f415/examples/wdt/wdt_standby/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 6b86c06..ca77a1e 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 877b876..2044f04 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 2884c5a..6210e55 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer 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 ada7092..f8b0a26 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ @@ -11,3 +11,4 @@ operation, the wwdt count value is continuously reloaded in the main function, and wwdt reset will not occur at this time. when the wakeup button is pressed, the function stops reloading the wwdt count value, resulting in wwdt reset. + for more detailed information. please refer to the application note document AN0045. \ No newline at end of file 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 8e9f03e..dddab9c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 0311464..be6486c 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @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 1071a86..a2b5e75 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.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/templates/inc/at32f415_clock.h b/project/at_start_f415/templates/inc/at32f415_clock.h index 6b86c06..ca77a1e 100644 --- a/project/at_start_f415/templates/inc/at32f415_clock.h +++ b/project/at_start_f415/templates/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_clock.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/templates/inc/at32f415_conf.h b/project/at_start_f415/templates/inc/at32f415_conf.h index c6ddd13..5a908b8 100644 --- a/project/at_start_f415/templates/inc/at32f415_conf.h +++ b/project/at_start_f415/templates/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/templates/inc/at32f415_int.h b/project/at_start_f415/templates/inc/at32f415_int.h index 2884c5a..6210e55 100644 --- a/project/at_start_f415/templates/inc/at32f415_int.h +++ b/project/at_start_f415/templates/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.h - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/templates/readme.txt b/project/at_start_f415/templates/readme.txt index ff4fff0..ff98618 100644 --- a/project/at_start_f415/templates/readme.txt +++ b/project/at_start_f415/templates/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f415/templates/src/at32f415_clock.c b/project/at_start_f415/templates/src/at32f415_clock.c index 451fa9b..5375544 100644 --- a/project/at_start_f415/templates/src/at32f415_clock.c +++ b/project/at_start_f415/templates/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_clock.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/templates/src/at32f415_int.c b/project/at_start_f415/templates/src/at32f415_int.c index 41eebd0..e5b14f3 100644 --- a/project/at_start_f415/templates/src/at32f415_int.c +++ b/project/at_start_f415/templates/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_int.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/templates/src/main.c b/project/at_start_f415/templates/src/main.c index 924c79c..624fd68 100644 --- a/project/at_start_f415/templates/src/main.c +++ b/project/at_start_f415/templates/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.4 - * @date 2022-04-02 + * @version v2.0.5 + * @date 2022-05-20 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415_Example_list.htm b/project/at_start_f415_Example_list.htm index 926445c..7abda29 100644 --- a/project/at_start_f415_Example_list.htm +++ b/project/at_start_f415_Example_list.htm @@ -34,29 +34,6 @@ text-justify:inter-ideograph; font-size:10.5pt; font-family:;} -p.MsoHeader, li.MsoHeader, div.MsoHeader - {mso-style-link:"ҳü ַ"; - margin:0cm; - margin-bottom:.0001pt; - text-align:center; - layout-grid-mode:char; - border:none; - padding:0cm; - font-size:9.0pt; - font-family:;} -p.MsoFooter, li.MsoFooter, div.MsoFooter - {mso-style-link:"ҳ ַ"; - margin:0cm; - margin-bottom:.0001pt; - layout-grid-mode:char; - font-size:9.0pt; - font-family:;} -span.a - {mso-style-name:"ҳü ַ"; - mso-style-link:ҳü;} -span.a0 - {mso-style-name:"ҳ ַ"; - mso-style-link:ҳ;} .MsoChpDefault {font-family:;} /* Page Definitions */ @@ -1788,7 +1765,7 @@ div.WordSection1

81

-

rs485

+ + +

AT32-Comm-EV BoardRS485ͨ

+ + + + +

90

+ + +

smartcard

90

+ style='font-size:11.0pt;font-family:;color:black'>91

91

+ style='font-size:11.0pt;font-family:;color:black'>92

92

+ style='font-size:11.0pt;font-family:;color:black'>93

93

+ style='font-size:11.0pt;font-family:;color:black'>94

-

94

+ style='font-size:11.0pt;font-family:;color:black'>95

95

+ style='font-size:11.0pt;font-family:;color:black'>96

96

+ style='font-size:11.0pt;font-family:;color:black'>97

+ + +

composite_vcp_msc

+ + +

ʵ⴮ںmass storage

+ + + + +

98

97

+ style='font-size:11.0pt;font-family:;color:black'>99

98

+ style='font-size:11.0pt;font-family:;color:black'>100

99

+ style='font-size:11.0pt;font-family:;color:black'>101

100

+ style='font-size:11.0pt;font-family:;color:black'>102

101

+ style='font-size:11.0pt;font-family:;color:black'>103

102

+ style='font-size:11.0pt;font-family:;color:black'>104

103

+ style='font-size:11.0pt;font-family:;color:black'>105

104

+ style='font-size:11.0pt;font-family:;color:black'>106

105

+ style='font-size:11.0pt;font-family:;color:black'>107

106

+ style='font-size:11.0pt;font-family:;color:black'>108

107

+ style='font-size:11.0pt;font-family:;color:black'>109

108

+ style='font-size:11.0pt;font-family:;color:black'>110