mirror of
https://github.com/ArteryTek/AT32F415_Firmware_Library.git
synced 2026-05-21 09:22:11 +00:00
update version to v2.0.8
This commit is contained in:
Binary file not shown.
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_adc.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 adc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_can.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 can header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_cmp.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 cmp header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_crc.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 crc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_crm.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 crm header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_debug.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 debug header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_def.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 macros header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_dma.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 dma header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_ertc.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 ertc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_exint.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 exint header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_flash.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 flash header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_gpio.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 gpio header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_i2c.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 i2c header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_misc.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 misc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_pwc.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 pwc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_sdio.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 sdio header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_spi.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 spi header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
* @{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_usb.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 usb header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_wdt.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 wdt header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file at32f415_wwdt.h
|
||||
* @version v2.0.7
|
||||
* @date 2022-08-16
|
||||
* @brief at32f415 wwdt header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user