update version to v2.0.8

This commit is contained in:
Artery-MCU
2022-11-22 18:18:07 +08:00
parent d95c5fb9e8
commit d4910499d3
1365 changed files with 13037 additions and 14600 deletions

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 header file
**************************************************************************
* Copyright notice & Disclaimer
@@ -70,6 +68,23 @@ extern "C" {
#define AT32F415xx
#endif
#if defined (AT32F415RCT7) || defined (AT32F415RCT7_7) || defined (AT32F415RBT7) || \
defined (AT32F415RBT7_7) || defined (AT32F415R8T7) || defined (AT32F415R8T7_7)
#define AT32F415Rx
#endif
#if defined (AT32F415CCT7) || defined (AT32F415CCU7) || defined (AT32F415CBT7) || \
defined (AT32F415CBU7) || defined (AT32F415C8T7)
#define AT32F415Cx
#endif
#if defined (AT32F415KCU7_4) || defined (AT32F415KBU7_4) || defined (AT32F415K8U7_4)
#define AT32F415Kx
#endif
#ifndef USE_STDPERIPH_DRIVER
/**
* @brief comment the line below if you will not use the peripherals drivers.
@@ -89,7 +104,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 (0x07) /*!< [15:8] minor version */
#define __AT32F415_LIBRARY_VERSION_MINOR (0x08) /*!< [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) | \

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_conf.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 config header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
******************************************************************************
* @file startup_at32f415.s
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415xx devices vector table for gcc toolchain.
* this module performs:
* - set the initial sp

View File

@@ -1,7 +1,5 @@
;**************************************************************************
;* @file startup_at32f415.s
;* @version v2.0.7
;* @date 2022-08-16
;* @brief at32f415 startup file for IAR Systems
;**************************************************************************
;

View File

@@ -1,7 +1,5 @@
;**************************************************************************
;* @file startup_at32f415.s
;* @version v2.0.7
;* @date 2022-08-16
;* @brief at32f415 startup file for keil
;* <<< Use Configuration Wizard in Context Menu >>>
;**************************************************************************

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file system_at32f415.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for cmsis cortex-m4 system source file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file system_at32f415.h
* @version v2.0.7
* @date 2022-08-16
* @brief cmsis cortex-m4 system header file.
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/******************************************************************************
* @file arm_sorting.h
* @version v2.0.7
* @date 2022-08-16
* @brief Private header file for CMSIS DSP Library
* @version V1.7.0
* @date 2019
******************************************************************************/
/*
* Copyright (c) 2010-2019 Arm Limited or its affiliates. All rights reserved.

View File

@@ -1,8 +1,8 @@
/******************************************************************************
* @file arm_vec_fft.h
* @version v2.0.7
* @date 2022-08-16
* @brief Private header file for CMSIS DSP Library
* @version V1.7.0
* @date 07. January 2020
******************************************************************************/
/*
* Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.

View File

@@ -1,8 +1,8 @@
/******************************************************************************
* @file arm_vec_filtering.h
* @version v2.0.7
* @date 2022-08-16
* @brief Private header file for CMSIS DSP Library
* @version V1.7.0
* @date 30. October 2019
******************************************************************************/
/*
* Copyright (c) 2010-2019 Arm Limited or its affiliates. All rights reserved.

View File

@@ -1,8 +1,8 @@
/******************************************************************************
* @file arm_math.h
* @version v2.0.7
* @date 2022-08-16
* @brief Public header file for CMSIS DSP Library
* @version V1.7.0
* @date 18. March 2019
******************************************************************************/
/*
* Copyright (c) 2010-2019 Arm Limited or its affiliates. All rights reserved.

View File

@@ -1,8 +1,8 @@
/******************************************************************************
* @file arm_vec_math.h
* @version v2.0.7
* @date 2022-08-16
* @brief Public header file for CMSIS DSP Library
* @version V1.7.0
* @date 15. October 2019
******************************************************************************/
/*
* Copyright (c) 2010-2019 Arm Limited or its affiliates. All rights reserved.

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_adc.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 adc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_can.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 can header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_cmp.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 cmp header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_crc.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 crc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_crm.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 crm header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_debug.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 debug header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_def.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 macros header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_dma.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 dma header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_ertc.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 ertc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_exint.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 exint header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_flash.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 flash header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_gpio.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 gpio header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_i2c.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 i2c header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_misc.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 misc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_pwc.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 pwc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_sdio.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 sdio header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_spi.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 spi header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_tmr.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 tmr header file
**************************************************************************
* Copyright notice & Disclaimer
@@ -391,6 +389,15 @@ typedef enum
TMR_WP_LEVEL_1 = 0x03 /*!< tmr write protect level 1 */
}tmr_wp_level_type;
/**
* @brief tmr output channel switch selection type
*/
typedef enum
{
TMR_CH_SWITCH_SELECT_EXT = 0x00, /*!< tmr output channel switch select ext pin */
TMR_CH_SWITCH_SELECT_CXORAW_OFF = 0x01, /*!< tmr output channel switch select cxoraw off signal */
}tmr_ch_switch_select_type ;
/**
* @brief tmr output config type
*/
@@ -489,7 +496,7 @@ typedef struct
struct
{
__IO uint32_t smsel : 3; /* [2:0] */
__IO uint32_t reserved1 : 1; /* [3] */
__IO uint32_t cossel : 1; /* [3] */
__IO uint32_t stis : 3; /* [6:4] */
__IO uint32_t sts : 1; /* [7] */
__IO uint32_t esf : 4; /* [11:8] */
@@ -869,6 +876,7 @@ void tmr_output_channel_buffer_enable(tmr_type *tmr_x, tmr_channel_select_type t
confirm_state new_state);
void tmr_output_channel_immediately_set(tmr_type *tmr_x, tmr_channel_select_type tmr_channel, \
confirm_state new_state);
void tmr_output_channel_switch_select(tmr_type *tmr_x, tmr_ch_switch_select_type switch_sel);
void tmr_output_channel_switch_set(tmr_type *tmr_x, tmr_channel_select_type tmr_channel, \
confirm_state new_state);
void tmr_one_cycle_mode_enable(tmr_type *tmr_x, confirm_state new_state);

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_usart.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 usart header file
**************************************************************************
* Copyright notice & Disclaimer
@@ -318,9 +316,13 @@ typedef struct
#define USART1 ((usart_type *) USART1_BASE)
#define USART2 ((usart_type *) USART2_BASE)
#if defined (AT32F415Cx) || defined (AT32F415Rx)
#define USART3 ((usart_type *) USART3_BASE)
#endif
#if defined (AT32F415Rx)
#define UART4 ((usart_type *) UART4_BASE)
#define UART5 ((usart_type *) UART5_BASE)
#endif
/** @defgroup USART_exported_functions
* @{

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_usb.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 usb header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_wdt.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 wdt header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_wwdt.h
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 wwdt header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_adc.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the adc firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_can.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the can firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_cmp.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the gpio firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_crc.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the crc firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_crm.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the crm firmware library
**************************************************************************
* Copyright notice & Disclaimer
@@ -414,6 +412,7 @@ void crm_ahb_div_set(crm_ahb_div_type value)
/**
* @brief set crm apb1 division
* @note the maximum frequency of APB1/APB2 clock is 75 MHz
* @param value
* this parameter can be one of the following values:
* - CRM_APB1_DIV_1
@@ -430,6 +429,7 @@ void crm_apb1_div_set(crm_apb1_div_type value)
/**
* @brief set crm apb2 division
* @note the maximum frequency of APB1/APB2 clock is 75 MHz
* @param value
* this parameter can be one of the following values:
* - CRM_APB2_DIV_1
@@ -521,6 +521,7 @@ void crm_pll_config(crm_pll_clock_source_type clock_source, crm_pll_mult_type mu
{
CRM->cfg_bit.pllrcs = FALSE;
pllrcfreq = (HICK_VALUE / 2);
CRM->misc1_bit.hickdiv = CRM_HICK48_NODIV;
}
else
{
@@ -610,6 +611,7 @@ void crm_pll_config2(crm_pll_clock_source_type clock_source, uint16_t pll_ns, \
if(clock_source == CRM_PLL_SOURCE_HICK)
{
CRM->cfg_bit.pllrcs = FALSE;
CRM->misc1_bit.hickdiv = CRM_HICK48_NODIV;
}
else
{

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_debug.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the debug firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_dma.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the dma firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_ertc.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the ertc firmware library
**************************************************************************
* Copyright notice & Disclaimer
@@ -98,15 +96,9 @@ error_status ertc_wait_update(void)
{
uint32_t timeout = ERTC_TIMEOUT * 2;
/* disable write protection */
ertc_write_protect_disable();
/* clear updf flag */
ERTC->sts = ~(ERTC_UPDF_FLAG | 0x00000080) | (ERTC->sts_bit.imen << 7);
/* enable write protection */
ertc_write_protect_enable();
while(ERTC->sts_bit.updf == 0)
{
if(timeout == 0)
@@ -164,9 +156,6 @@ error_status ertc_init_mode_enter(void)
{
uint32_t timeout = ERTC_TIMEOUT * 2;
/* disable write protection */
ertc_write_protect_disable();
if(ERTC->sts_bit.imf == 0)
{
/* enter init mode */

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_exint.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the exint firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_flash.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the flash firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_gpio.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the gpio firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_i2c.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the i2c firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_misc.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the misc firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_pwc.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the pwc firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_sdio.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the sdio firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_spi.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the spi firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_tmr.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the tmr firmware library
**************************************************************************
* Copyright notice & Disclaimer
@@ -656,6 +654,23 @@ void tmr_output_channel_immediately_set(tmr_type *tmr_x, tmr_channel_select_type
}
}
/**
* @brief select tmr output channel switch source
* @param tmr_x: select the tmr peripheral.
* this parameter can be one of the following values:
* TMR1, TMR3
* @param switch_sel
* this parameter can be one of the following values:
* - TMR_CH_SWITCH_SELECT_EXT
* - TMR_CH_SWITCH_SELECT_CXORAW_OFF
* @retval none
*/
void tmr_output_channel_switch_select(tmr_type *tmr_x, tmr_ch_switch_select_type switch_sel)
{
/* select tmr output channel switch source */
tmr_x->stctrl_bit.cossel = switch_sel;
}
/**
* @brief set tmr output channel switch
* @param tmr_x: select the tmr peripheral.

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_usart.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the usart firmware library
**************************************************************************
* Copyright notice & Disclaimer
@@ -61,11 +59,14 @@ void usart_reset(usart_type* usart_x)
crm_periph_reset(CRM_USART2_PERIPH_RESET, TRUE);
crm_periph_reset(CRM_USART2_PERIPH_RESET, FALSE);
}
#if defined (AT32F415Cx) || defined (AT32F415Rx)
else if(usart_x == USART3)
{
crm_periph_reset(CRM_USART3_PERIPH_RESET, TRUE);
crm_periph_reset(CRM_USART3_PERIPH_RESET, FALSE);
}
#endif
#if defined (AT32F415Rx)
else if(usart_x == UART4)
{
crm_periph_reset(CRM_UART4_PERIPH_RESET, TRUE);
@@ -76,6 +77,7 @@ void usart_reset(usart_type* usart_x)
crm_periph_reset(CRM_UART5_PERIPH_RESET, TRUE);
crm_periph_reset(CRM_UART5_PERIPH_RESET, FALSE);
}
#endif
}
/**

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_usb.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the usb firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_wdt.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the wdt firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,6 @@
/**
**************************************************************************
* @file at32f415_wwdt.c
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the wwdt firmware library
**************************************************************************
* Copyright notice & Disclaimer