diff --git a/AT32F413_periph_lib_V2.0.9.chm b/AT32F413_periph_lib_V2.1.0.chm
similarity index 61%
rename from AT32F413_periph_lib_V2.0.9.chm
rename to AT32F413_periph_lib_V2.1.0.chm
index 8e158cd..f586e4b 100644
Binary files a/AT32F413_periph_lib_V2.0.9.chm and b/AT32F413_periph_lib_V2.1.0.chm differ
diff --git a/document/AT32F413固件库BSP&Pack应用指南.pdf b/document/AT32F413固件库BSP&Pack应用指南.pdf
index 20c8e41..8edc92e 100644
Binary files a/document/AT32F413固件库BSP&Pack应用指南.pdf and b/document/AT32F413固件库BSP&Pack应用指南.pdf differ
diff --git a/document/ReleaseNotes_AT32F413_Firmware_Library.pdf b/document/ReleaseNotes_AT32F413_Firmware_Library.pdf
index 239ddb6..63817b9 100644
Binary files a/document/ReleaseNotes_AT32F413_Firmware_Library.pdf and b/document/ReleaseNotes_AT32F413_Firmware_Library.pdf differ
diff --git a/libraries/cmsis/cm4/device_support/at32f413.h b/libraries/cmsis/cm4/device_support/at32f413.h
index eac9f27..3fca7b2 100644
--- a/libraries/cmsis/cm4/device_support/at32f413.h
+++ b/libraries/cmsis/cm4/device_support/at32f413.h
@@ -66,6 +66,9 @@ extern "C" {
#define AT32F413xx
#endif
+/**
+ * define with package
+ */
#if defined (AT32F413RBT7) || defined (AT32F413RCT7)
#define AT32F413Rx
@@ -82,6 +85,26 @@ extern "C" {
#define AT32F413Kx
#endif
+/**
+ * define with memory density
+ */
+#if defined (AT32F413C8T7) || defined (AT32FEBKC8T7)
+
+ #define AT32F413x8
+#endif
+
+#if defined (AT32F413KBU7_4) || defined (AT32F413CBU7) || defined (AT32F413CBT7) || \
+ defined (AT32F413RBT7) || defined (AT32F413TBU7)
+
+ #define AT32F413xB
+#endif
+
+#if defined (AT32F413KCU7_4) || defined (AT32F413CCU7) || defined (AT32F413CCT7) || \
+ defined (AT32F413RCT7)
+
+ #define AT32F413xC
+#endif
+
#ifndef USE_STDPERIPH_DRIVER
/**
* @brief comment the line below if you will not use the peripherals drivers.
@@ -100,8 +123,8 @@ extern "C" {
* @brief at32f413 standard peripheral library version number
*/
#define __AT32F413_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */
-#define __AT32F413_LIBRARY_VERSION_MIDDLE (0x00) /*!< [23:16] middle version */
-#define __AT32F413_LIBRARY_VERSION_MINOR (0x09) /*!< [15:8] minor version */
+#define __AT32F413_LIBRARY_VERSION_MIDDLE (0x01) /*!< [23:16] middle version */
+#define __AT32F413_LIBRARY_VERSION_MINOR (0x00) /*!< [15:8] minor version */
#define __AT32F413_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */
#define __AT32F413_LIBRARY_VERSION ((__AT32F413_LIBRARY_VERSION_MAJOR << 24) | \
(__AT32F413_LIBRARY_VERSION_MIDDLE << 16) | \
diff --git a/libraries/drivers/ReleaseNotes_AT32F413_Firmware_Library_Drivers.pdf b/libraries/drivers/ReleaseNotes_AT32F413_Firmware_Library_Drivers.pdf
index 5da724a..e535cfe 100644
Binary files a/libraries/drivers/ReleaseNotes_AT32F413_Firmware_Library_Drivers.pdf and b/libraries/drivers/ReleaseNotes_AT32F413_Firmware_Library_Drivers.pdf differ
diff --git a/libraries/drivers/inc/at32f413_crc.h b/libraries/drivers/inc/at32f413_crc.h
index 3c2801c..5c73114 100644
--- a/libraries/drivers/inc/at32f413_crc.h
+++ b/libraries/drivers/inc/at32f413_crc.h
@@ -66,6 +66,17 @@ typedef enum
CRC_REVERSE_OUTPUT_DATA = 0x01 /*!< output data reverse by word */
} crc_reverse_output_type;
+/**
+ * @brief crc polynomial size
+ */
+typedef enum
+{
+ CRC_POLY_SIZE_32B = 0x00, /*!< polynomial size 32 bits */
+ CRC_POLY_SIZE_16B = 0x01, /*!< polynomial size 16 bits */
+ CRC_POLY_SIZE_8B = 0x02, /*!< polynomial size 8 bits */
+ CRC_POLY_SIZE_7B = 0x03 /*!< polynomial size 7 bits */
+} crc_poly_size_type;
+
/**
* @brief type define crc register all
*/
@@ -97,7 +108,7 @@ typedef struct
};
/**
- * @brief crc ctrl register, offset:0x08
+ * @brief crc ctrl register, offset:0x08
*/
union
{
@@ -105,7 +116,8 @@ typedef struct
struct
{
__IO uint32_t rst : 1 ; /* [0] */
- __IO uint32_t reserved1 : 4 ; /* [4:1] */
+ __IO uint32_t reserved1 : 2 ; /* [2:1] */
+ __IO uint32_t poly_size : 2 ; /* [4:3] */
__IO uint32_t revid : 2 ; /* [6:5] */
__IO uint32_t revod : 1 ; /* [7] */
__IO uint32_t reserved2 : 24 ;/* [31:8] */
@@ -129,6 +141,18 @@ typedef struct
} idt_bit;
};
+ /**
+ * @brief crc polynomial register, offset:0x14
+ */
+ union
+ {
+ __IO uint32_t poly;
+ struct
+ {
+ __IO uint32_t poly : 32; /* [31:0] */
+ } poly_bit;
+ };
+
} crc_type;
/**
@@ -150,6 +174,10 @@ uint8_t crc_common_data_get(void);
void crc_init_data_set(uint32_t value);
void crc_reverse_input_data_set(crc_reverse_input_type value);
void crc_reverse_output_data_set(crc_reverse_output_type value);
+void crc_poly_value_set(uint32_t value);
+uint32_t crc_poly_value_get(void);
+void crc_poly_size_set(crc_poly_size_type size);
+crc_poly_size_type crc_poly_size_get(void);
/**
* @}
diff --git a/libraries/drivers/inc/at32f413_flash.h b/libraries/drivers/inc/at32f413_flash.h
index 0df3671..9d8ebe8 100644
--- a/libraries/drivers/inc/at32f413_flash.h
+++ b/libraries/drivers/inc/at32f413_flash.h
@@ -593,6 +593,8 @@ uint8_t flash_ssb_status_get(void);
void flash_interrupt_enable(uint32_t flash_int, confirm_state new_state);
void flash_spim_model_select(flash_spim_model_type mode);
void flash_spim_encryption_range_set(uint32_t decode_address);
+void flash_spim_dummy_read(void);
+flash_status_type flash_spim_mass_program(uint32_t address, uint8_t *buf, uint32_t cnt);
flash_status_type flash_slib_enable(uint32_t pwd, uint16_t start_sector, uint16_t data_start_sector, uint16_t end_sector);
error_status flash_slib_disable(uint32_t pwd);
uint32_t flash_slib_remaining_count_get(void);
diff --git a/libraries/drivers/inc/at32f413_usb.h b/libraries/drivers/inc/at32f413_usb.h
index a13752b..45bbe19 100644
--- a/libraries/drivers/inc/at32f413_usb.h
+++ b/libraries/drivers/inc/at32f413_usb.h
@@ -199,9 +199,9 @@ typedef enum
typedef enum
{
EPT_CONTROL_TYPE = 0x00, /*!< usb transfer type control */
- EPT_BULK_TYPE = 0x01, /*!< usb transfer type bulk */
- EPT_INT_TYPE = 0x02, /*!< usb transfer type interrut */
- EPT_ISO_TYPE = 0x03 /*!< usb transfer type iso */
+ EPT_ISO_TYPE = 0x01, /*!< usb transfer type iso */
+ EPT_BULK_TYPE = 0x02, /*!< usb transfer type bulk */
+ EPT_INT_TYPE = 0x03 /*!< usb transfer type interrupt */
}ept_trans_type;
/**
diff --git a/libraries/drivers/src/at32f413_adc.c b/libraries/drivers/src/at32f413_adc.c
index 2631d68..d0058e7 100644
--- a/libraries/drivers/src/at32f413_adc.c
+++ b/libraries/drivers/src/at32f413_adc.c
@@ -109,7 +109,7 @@ void adc_combine_mode_select(adc_combine_mode_type combine_mode)
* - ADC_LEFT_ALIGNMENT
* @param ordinary_channel_length: configure the adc ordinary channel sequence length.
* this parameter can be:
- * - (0x1~0xf)
+ * - (0x1~0x10)
* @retval none
*/
void adc_base_default_para_init(adc_base_config_type *adc_base_struct)
@@ -135,7 +135,7 @@ void adc_base_default_para_init(adc_base_config_type *adc_base_struct)
* - ADC_LEFT_ALIGNMENT
* @param ordinary_channel_length: configure the adc ordinary channel sequence length.
* this parameter can be:
- * - (0x1~0xf)
+ * - (0x1~0x10)
* @retval none
*/
void adc_base_config(adc_type *adc_x, adc_base_config_type *adc_base_struct)
@@ -340,117 +340,42 @@ void adc_voltage_monitor_single_channel_select(adc_type *adc_x, adc_channel_sele
*/
void adc_ordinary_channel_set(adc_type *adc_x, adc_channel_select_type adc_channel, uint8_t adc_sequence, adc_sampletime_select_type adc_sampletime)
{
- switch(adc_channel)
+ uint32_t tmp_reg;
+ if(adc_channel < ADC_CHANNEL_10)
{
- case ADC_CHANNEL_0:
- adc_x->spt2_bit.cspt0 = adc_sampletime;
- break;
- case ADC_CHANNEL_1:
- adc_x->spt2_bit.cspt1 = adc_sampletime;
- break;
- case ADC_CHANNEL_2:
- adc_x->spt2_bit.cspt2 = adc_sampletime;
- break;
- case ADC_CHANNEL_3:
- adc_x->spt2_bit.cspt3 = adc_sampletime;
- break;
- case ADC_CHANNEL_4:
- adc_x->spt2_bit.cspt4 = adc_sampletime;
- break;
- case ADC_CHANNEL_5:
- adc_x->spt2_bit.cspt5 = adc_sampletime;
- break;
- case ADC_CHANNEL_6:
- adc_x->spt2_bit.cspt6 = adc_sampletime;
- break;
- case ADC_CHANNEL_7:
- adc_x->spt2_bit.cspt7 = adc_sampletime;
- break;
- case ADC_CHANNEL_8:
- adc_x->spt2_bit.cspt8 = adc_sampletime;
- break;
- case ADC_CHANNEL_9:
- adc_x->spt2_bit.cspt9 = adc_sampletime;
- break;
- case ADC_CHANNEL_10:
- adc_x->spt1_bit.cspt10 = adc_sampletime;
- break;
- case ADC_CHANNEL_11:
- adc_x->spt1_bit.cspt11 = adc_sampletime;
- break;
- case ADC_CHANNEL_12:
- adc_x->spt1_bit.cspt12 = adc_sampletime;
- break;
- case ADC_CHANNEL_13:
- adc_x->spt1_bit.cspt13 = adc_sampletime;
- break;
- case ADC_CHANNEL_14:
- adc_x->spt1_bit.cspt14 = adc_sampletime;
- break;
- case ADC_CHANNEL_15:
- adc_x->spt1_bit.cspt15 = adc_sampletime;
- break;
- case ADC_CHANNEL_16:
- adc_x->spt1_bit.cspt16 = adc_sampletime;
- break;
- case ADC_CHANNEL_17:
- adc_x->spt1_bit.cspt17 = adc_sampletime;
- break;
- default:
- break;
+ tmp_reg = adc_x->spt2;
+ tmp_reg &= ~(0x07 << 3 * adc_channel);
+ tmp_reg |= adc_sampletime << 3 * adc_channel;
+ adc_x->spt2 = tmp_reg;
}
- switch(adc_sequence)
+ else
{
- case 1:
- adc_x->osq3_bit.osn1 = adc_channel;
- break;
- case 2:
- adc_x->osq3_bit.osn2 = adc_channel;
- break;
- case 3:
- adc_x->osq3_bit.osn3 = adc_channel;
- break;
- case 4:
- adc_x->osq3_bit.osn4 = adc_channel;
- break;
- case 5:
- adc_x->osq3_bit.osn5 = adc_channel;
- break;
- case 6:
- adc_x->osq3_bit.osn6 = adc_channel;
- break;
- case 7:
- adc_x->osq2_bit.osn7 = adc_channel;
- break;
- case 8:
- adc_x->osq2_bit.osn8 = adc_channel;
- break;
- case 9:
- adc_x->osq2_bit.osn9 = adc_channel;
- break;
- case 10:
- adc_x->osq2_bit.osn10 = adc_channel;
- break;
- case 11:
- adc_x->osq2_bit.osn11 = adc_channel;
- break;
- case 12:
- adc_x->osq2_bit.osn12 = adc_channel;
- break;
- case 13:
- adc_x->osq1_bit.osn13 = adc_channel;
- break;
- case 14:
- adc_x->osq1_bit.osn14 = adc_channel;
- break;
- case 15:
- adc_x->osq1_bit.osn15 = adc_channel;
- break;
- case 16:
- adc_x->osq1_bit.osn16 = adc_channel;
- break;
- default:
- break;
+ tmp_reg = adc_x->spt1;
+ tmp_reg &= ~(0x07 << 3 * (adc_channel - ADC_CHANNEL_10));
+ tmp_reg |= adc_sampletime << 3 * (adc_channel - ADC_CHANNEL_10);
+ adc_x->spt1 = tmp_reg;
+ }
+
+ if(adc_sequence >= 13)
+ {
+ tmp_reg = adc_x->osq1;
+ tmp_reg &= ~(0x01F << 5 * (adc_sequence - 13));
+ tmp_reg |= adc_channel << 5 * (adc_sequence - 13);
+ adc_x->osq1 = tmp_reg;
+ }
+ else if(adc_sequence >= 7)
+ {
+ tmp_reg = adc_x->osq2;
+ tmp_reg &= ~(0x01F << 5 * (adc_sequence - 7));
+ tmp_reg |= adc_channel << 5 * (adc_sequence - 7);
+ adc_x->osq2 = tmp_reg;
+ }
+ else
+ {
+ tmp_reg = adc_x->osq3;
+ tmp_reg &= ~(0x01F << 5 * (adc_sequence - 1));
+ tmp_reg |= adc_channel << 5 * (adc_sequence - 1);
+ adc_x->osq3 = tmp_reg;
}
}
@@ -498,66 +423,23 @@ void adc_preempt_channel_length_set(adc_type *adc_x, uint8_t adc_channel_lenght)
*/
void adc_preempt_channel_set(adc_type *adc_x, adc_channel_select_type adc_channel, uint8_t adc_sequence, adc_sampletime_select_type adc_sampletime)
{
- uint16_t sequence_index=0;
- switch(adc_channel)
+ uint32_t tmp_reg;
+ uint8_t sequence_index;
+ if(adc_channel < ADC_CHANNEL_10)
{
- case ADC_CHANNEL_0:
- adc_x->spt2_bit.cspt0 = adc_sampletime;
- break;
- case ADC_CHANNEL_1:
- adc_x->spt2_bit.cspt1 = adc_sampletime;
- break;
- case ADC_CHANNEL_2:
- adc_x->spt2_bit.cspt2 = adc_sampletime;
- break;
- case ADC_CHANNEL_3:
- adc_x->spt2_bit.cspt3 = adc_sampletime;
- break;
- case ADC_CHANNEL_4:
- adc_x->spt2_bit.cspt4 = adc_sampletime;
- break;
- case ADC_CHANNEL_5:
- adc_x->spt2_bit.cspt5 = adc_sampletime;
- break;
- case ADC_CHANNEL_6:
- adc_x->spt2_bit.cspt6 = adc_sampletime;
- break;
- case ADC_CHANNEL_7:
- adc_x->spt2_bit.cspt7 = adc_sampletime;
- break;
- case ADC_CHANNEL_8:
- adc_x->spt2_bit.cspt8 = adc_sampletime;
- break;
- case ADC_CHANNEL_9:
- adc_x->spt2_bit.cspt9 = adc_sampletime;
- break;
- case ADC_CHANNEL_10:
- adc_x->spt1_bit.cspt10 = adc_sampletime;
- break;
- case ADC_CHANNEL_11:
- adc_x->spt1_bit.cspt11 = adc_sampletime;
- break;
- case ADC_CHANNEL_12:
- adc_x->spt1_bit.cspt12 = adc_sampletime;
- break;
- case ADC_CHANNEL_13:
- adc_x->spt1_bit.cspt13 = adc_sampletime;
- break;
- case ADC_CHANNEL_14:
- adc_x->spt1_bit.cspt14 = adc_sampletime;
- break;
- case ADC_CHANNEL_15:
- adc_x->spt1_bit.cspt15 = adc_sampletime;
- break;
- case ADC_CHANNEL_16:
- adc_x->spt1_bit.cspt16 = adc_sampletime;
- break;
- case ADC_CHANNEL_17:
- adc_x->spt1_bit.cspt17 = adc_sampletime;
- break;
- default:
- break;
+ tmp_reg = adc_x->spt2;
+ tmp_reg &= ~(0x07 << 3 * adc_channel);
+ tmp_reg |= adc_sampletime << 3 * adc_channel;
+ adc_x->spt2 = tmp_reg;
}
+ else
+ {
+ tmp_reg = adc_x->spt1;
+ tmp_reg &= ~(0x07 << 3 * (adc_channel - ADC_CHANNEL_10));
+ tmp_reg |= adc_sampletime << 3 * (adc_channel - ADC_CHANNEL_10);
+ adc_x->spt1 = tmp_reg;
+ }
+
sequence_index = adc_sequence + 3 - adc_x->psq_bit.pclen;
switch(sequence_index)
{
diff --git a/libraries/drivers/src/at32f413_crc.c b/libraries/drivers/src/at32f413_crc.c
index 24bc333..19985bc 100644
--- a/libraries/drivers/src/at32f413_crc.c
+++ b/libraries/drivers/src/at32f413_crc.c
@@ -147,6 +147,52 @@ void crc_reverse_output_data_set(crc_reverse_output_type value)
CRC->ctrl_bit.revod = value;
}
+/**
+ * @brief config crc polynomial value
+ * @param value
+ * 32-bit new data of crc poly value
+ * @retval none.
+ */
+void crc_poly_value_set(uint32_t value)
+{
+ CRC->poly = value;
+}
+
+/**
+ * @brief return crc polynomial value
+ * @param none
+ * @retval 32-bit value of the polynomial value.
+ */
+uint32_t crc_poly_value_get(void)
+{
+ return (CRC->poly);
+}
+
+/**
+ * @brief config crc polynomial data size
+ * @param size
+ * this parameter can be one of the following values:
+ * - CRC_POLY_SIZE_32B
+ * - CRC_POLY_SIZE_16B
+ * - CRC_POLY_SIZE_8B
+ * - CRC_POLY_SIZE_7B
+ * @retval none.
+ */
+void crc_poly_size_set(crc_poly_size_type size)
+{
+ CRC->ctrl_bit.poly_size = size;
+}
+
+/**
+ * @brief return crc polynomial data size
+ * @param none
+ * @retval polynomial data size.
+ */
+crc_poly_size_type crc_poly_size_get(void)
+{
+ return (crc_poly_size_type)(CRC->ctrl_bit.poly_size);
+}
+
/**
* @}
*/
diff --git a/libraries/drivers/src/at32f413_flash.c b/libraries/drivers/src/at32f413_flash.c
index 7c1ea76..a9e8c7d 100644
--- a/libraries/drivers/src/at32f413_flash.c
+++ b/libraries/drivers/src/at32f413_flash.c
@@ -282,6 +282,9 @@ flash_status_type flash_sector_erase(uint32_t sector_address)
/* disable the secers bit */
FLASH->ctrl3_bit.secers = FALSE;
+
+ /* dummy read */
+ flash_spim_dummy_read();
}
else
{
@@ -341,6 +344,9 @@ flash_status_type flash_spim_all_erase(void)
/* disable the chpers bit */
FLASH->ctrl3_bit.chpers = FALSE;
+ /* dummy read */
+ flash_spim_dummy_read();
+
/* return the erase status */
return status;
}
@@ -416,6 +422,9 @@ flash_status_type flash_word_program(uint32_t address, uint32_t data)
/* disable the fprgm bit */
FLASH->ctrl3_bit.fprgm = FALSE;
+
+ /* dummy read */
+ flash_spim_dummy_read();
}
else
{
@@ -451,6 +460,9 @@ flash_status_type flash_halfword_program(uint32_t address, uint16_t data)
/* disable the fprgm bit */
FLASH->ctrl3_bit.fprgm = FALSE;
+
+ /* dummy read */
+ flash_spim_dummy_read();
}
else
{
@@ -732,6 +744,9 @@ void flash_interrupt_enable(uint32_t flash_int, confirm_state new_state)
void flash_spim_model_select(flash_spim_model_type mode)
{
FLASH->select = mode;
+
+ /* dummy read */
+ flash_spim_dummy_read();
}
/**
@@ -746,6 +761,62 @@ void flash_spim_encryption_range_set(uint32_t decode_address)
FLASH->da = decode_address;
}
+/**
+ * @brief operate the flash spim dummy read.
+ * @param none
+ * @retval none
+ */
+void flash_spim_dummy_read(void)
+{
+ UNUSED(*(__IO uint32_t*)FLASH_SPIM_START_ADDR);
+ UNUSED(*(__IO uint32_t*)(FLASH_SPIM_START_ADDR + 0x1000));
+ UNUSED(*(__IO uint32_t*)(FLASH_SPIM_START_ADDR + 0x2000));
+}
+
+/**
+ * @brief mass program for flash spim.
+ * @param address: specifies the start address to be programmed, word or halfword alignment is recommended.
+ * @param buf: specifies the pointer of data to be programmed.
+ * @param cnt: specifies the data counter to be programmed.
+ * @retval status: the returned value can be: FLASH_PROGRAM_ERROR,
+ * FLASH_EPP_ERROR, FLASH_OPERATE_DONE or FLASH_OPERATE_TIMEOUT.
+ */
+flash_status_type flash_spim_mass_program(uint32_t address, uint8_t *buf, uint32_t cnt)
+{
+ flash_status_type status = FLASH_OPERATE_DONE;
+ uint32_t index, temp_offset;
+ if(address >= FLASH_SPIM_START_ADDR)
+ {
+ temp_offset = cnt % 4;
+ if((temp_offset != 0) && (temp_offset != 2))
+ return status;
+
+ FLASH->ctrl3_bit.fprgm = TRUE;
+ for(index = 0; index < cnt / 4; index++)
+ {
+ *(__IO uint32_t*)(address + index * 4) = *(uint32_t*)(buf + index * 4);
+ /* wait for operation to be completed */
+ status = flash_spim_operation_wait_for(SPIM_PROGRAMMING_TIMEOUT);
+ if(status != FLASH_OPERATE_DONE)
+ return status;
+ }
+ if(temp_offset == 2)
+ {
+ *(__IO uint16_t*)(address + index * 4) = *(uint16_t*)(buf + index * 4);
+ /* wait for operation to be completed */
+ status = flash_spim_operation_wait_for(SPIM_PROGRAMMING_TIMEOUT);
+ }
+ /* disable the fprgm bit */
+ FLASH->ctrl3_bit.fprgm = FALSE;
+
+ /* dummy read */
+ flash_spim_dummy_read();
+ }
+
+ /* return the program status */
+ return status;
+}
+
/**
* @brief enable security library function.
* @param pwd: slib password
diff --git a/libraries/drivers/src/at32f413_tmr.c b/libraries/drivers/src/at32f413_tmr.c
index c7c8923..b5108d2 100644
--- a/libraries/drivers/src/at32f413_tmr.c
+++ b/libraries/drivers/src/at32f413_tmr.c
@@ -276,8 +276,7 @@ uint32_t tmr_counter_value_get(tmr_type *tmr_x)
* this parameter can be one of the following values:
* TMR1, TMR2, TMR3, TMR4, TMR5, TMR8, TMR9, TMR10,
* TMR11
- * @param tmr_div_value (for 16 bit tmr 0x0000~0xFFFF,
- * for 32 bit tmr 0x0000_0000~0xFFFF_FFFF)
+ * @param tmr_div_value (0x0000~0xFFFF)
* @retval none
*/
void tmr_div_value_set(tmr_type *tmr_x, uint32_t tmr_div_value)
@@ -819,7 +818,7 @@ void tmr_input_channel_init(tmr_type *tmr_x, tmr_input_config_type *input_struct
switch(channel)
{
case TMR_SELECT_CHANNEL_1:
- tmr_x->cctrl_bit.c1en = FALSE;
+ tmr_x->cctrl_bit.c1en = FALSE;
tmr_x->cctrl_bit.c1p = (uint32_t)input_struct->input_polarity_select;
tmr_x->cctrl_bit.c1cp = (input_struct->input_polarity_select & 0x2) >> 1;
tmr_x->cm1_input_bit.c1c = input_struct->input_mapped_select;
@@ -829,7 +828,7 @@ void tmr_input_channel_init(tmr_type *tmr_x, tmr_input_config_type *input_struct
break;
case TMR_SELECT_CHANNEL_2:
- tmr_x->cctrl_bit.c2en = FALSE;
+ tmr_x->cctrl_bit.c2en = FALSE;
tmr_x->cctrl_bit.c2p = (uint32_t)input_struct->input_polarity_select;
tmr_x->cctrl_bit.c2cp = (input_struct->input_polarity_select & 0x2) >> 1;
tmr_x->cm1_input_bit.c2c = input_struct->input_mapped_select;
@@ -839,7 +838,7 @@ void tmr_input_channel_init(tmr_type *tmr_x, tmr_input_config_type *input_struct
break;
case TMR_SELECT_CHANNEL_3:
- tmr_x->cctrl_bit.c3en = FALSE;
+ tmr_x->cctrl_bit.c3en = FALSE;
tmr_x->cctrl_bit.c3p = (uint32_t)input_struct->input_polarity_select;
tmr_x->cctrl_bit.c3cp = (input_struct->input_polarity_select & 0x2) >> 1;
tmr_x->cm2_input_bit.c3c = input_struct->input_mapped_select;
@@ -849,7 +848,7 @@ void tmr_input_channel_init(tmr_type *tmr_x, tmr_input_config_type *input_struct
break;
case TMR_SELECT_CHANNEL_4:
- tmr_x->cctrl_bit.c4en = FALSE;
+ tmr_x->cctrl_bit.c4en = FALSE;
tmr_x->cctrl_bit.c4p = (uint32_t)input_struct->input_polarity_select;
tmr_x->cm2_input_bit.c4c = input_struct->input_mapped_select;
tmr_x->cm2_input_bit.c4df = input_struct->input_filter_value;
@@ -1712,7 +1711,7 @@ void tmr_dma_control_config(tmr_type *tmr_x, tmr_dma_transfer_length_type dma_le
}
/**
- * @brief config tmr break mode and dead-time
+ * @brief config tmr brake mode and dead-time
* @param tmr_x: select the tmr peripheral.
* this parameter can be one of the following values:
* TMR1, TMR8
diff --git a/libraries/drivers/src/at32f413_usart.c b/libraries/drivers/src/at32f413_usart.c
index 595cd1c..2ba83f4 100644
--- a/libraries/drivers/src/at32f413_usart.c
+++ b/libraries/drivers/src/at32f413_usart.c
@@ -90,6 +90,9 @@ void usart_reset(usart_type* usart_x)
* this parameter can be one of the following values:
* - USART_DATA_8BITS
* - USART_DATA_9BITS.
+ * note:
+ * - when parity check is disabled, the data bit width is the actual data bit number.
+ * - when parity check is enabled, the data bit width is the actual data bit number minus 1, and the MSB bit is replaced with the parity bit.
* @param stop_bit: stop bits transmitted
* this parameter can be one of the following values:
* - USART_STOP_1_BIT
diff --git a/middlewares/usbd_class/audio/audio_class.c b/middlewares/usbd_class/audio/audio_class.c
index 45f02ed..6ff7dba 100644
--- a/middlewares/usbd_class/audio/audio_class.c
+++ b/middlewares/usbd_class/audio/audio_class.c
@@ -197,8 +197,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
audio_set_interface(udev, setup);
usbd_ctrl_send_status(pudev);
break;
-
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
diff --git a/middlewares/usbd_class/audio/audio_desc.c b/middlewares/usbd_class/audio/audio_desc.c
index 8a965f5..2096dce 100644
--- a/middlewares/usbd_class/audio/audio_desc.c
+++ b/middlewares/usbd_class/audio/audio_desc.c
@@ -52,7 +52,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure
diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.c b/middlewares/usbd_class/audio_hid/audio_hid_class.c
index d043c82..a1f9d81 100644
--- a/middlewares/usbd_class/audio_hid/audio_hid_class.c
+++ b/middlewares/usbd_class/audio_hid/audio_hid_class.c
@@ -216,7 +216,12 @@ usb_sts_type class_audio_setup_handler(void *udev, usb_setup_type *setup)
usbd_ctrl_send_status(pudev);
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
@@ -293,7 +298,12 @@ usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
paudio_hid->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.c b/middlewares/usbd_class/audio_hid/audio_hid_desc.c
index b27bce8..55b9806 100644
--- a/middlewares/usbd_class/audio_hid/audio_hid_desc.c
+++ b/middlewares/usbd_class/audio_hid/audio_hid_desc.c
@@ -54,7 +54,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure
@@ -373,7 +376,7 @@ ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_AUHID_CONFIG_DESC_SIZE] AL
0x11, /* bmAttributes: endpoint attributes */
LBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */
HBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */
- 1, /* bInterval: interval for polling endpoint for data transfers */
+ 1, /* bInterval: interval for polling endpoint for data transfers */
FEEDBACK_REFRESH_TIME, /* bRefresh: this field indicates the rate at which an iso syncronization
pipe provides new syncronization feedback data. this rate must be a power of
2, therefore only the power is reported back and the range of this field is from
diff --git a/middlewares/usbd_class/cdc/cdc_class.c b/middlewares/usbd_class/cdc/cdc_class.c
index 5b11865..3a600df 100644
--- a/middlewares/usbd_class/cdc/cdc_class.c
+++ b/middlewares/usbd_class/cdc/cdc_class.c
@@ -180,7 +180,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pcdc->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
diff --git a/middlewares/usbd_class/cdc/cdc_desc.c b/middlewares/usbd_class/cdc/cdc_desc.c
index a590d92..90aab8b 100644
--- a/middlewares/usbd_class/cdc/cdc_desc.c
+++ b/middlewares/usbd_class/cdc/cdc_desc.c
@@ -53,7 +53,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure
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 4958d18..b96e18b 100644
--- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c
+++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c
@@ -66,8 +66,8 @@ const static unsigned char _asciimap[128] =
0x00,// ACK
0x00,// BEL
0x2A,// BS Backspace
- 0x2B,// TAB Tab
- 0x28,// LF Enter
+ 0x2B,// TAB Tab
+ 0x28,// LF Enter
0x00,// VT
0x00,// FF
0x00,// CR
@@ -185,7 +185,7 @@ const static unsigned char _asciimap[128] =
0x31|SHIFT,// |
0x30|SHIFT,// }
0x35|SHIFT,// ~
- 0 // DEL
+ 0 // DEL
};
linecoding_type linecoding_vcpkybrd =
@@ -356,7 +356,12 @@ static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
vcpkybrd->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
@@ -431,7 +436,12 @@ static usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *set
case USB_STD_REQ_SET_INTERFACE:
vcpkybrd->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
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 916dfc1..301917d 100644
--- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c
+++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c
@@ -52,7 +52,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure
diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c
index 2c34855..f893c68 100644
--- a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c
+++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c
@@ -227,7 +227,12 @@ static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pcdc->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
@@ -296,7 +301,10 @@ static usb_sts_type msc_class_setup_handler(void *udev, usb_setup_type *setup)
}
bot_scsi_clear_feature(udev, setup->wIndex);
break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
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
index 4ab282f..37f3bed 100644
--- a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.h
+++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.h
@@ -266,7 +266,7 @@ typedef struct
uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN];
uint32_t blk_size[MSC_SUPPORT_MAX_LUN];
- uint32_t blk_addr;
+ uint64_t blk_addr;
uint32_t blk_len;
uint32_t data_len;
diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c
index 3162324..b9c78e6 100644
--- a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c
+++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c
@@ -56,7 +56,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure
diff --git a/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c b/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c
index 26b9795..ed16a42 100644
--- a/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c
+++ b/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c
@@ -42,11 +42,11 @@
#pragma data_alignment=4
#endif
ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = {
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
};
#if defined ( __ICCARM__ ) /* iar compiler */
diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.c b/middlewares/usbd_class/custom_hid/custom_hid_class.c
index c9e88e8..cae2256 100644
--- a/middlewares/usbd_class/custom_hid/custom_hid_class.c
+++ b/middlewares/usbd_class/custom_hid/custom_hid_class.c
@@ -180,7 +180,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pcshid->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
diff --git a/middlewares/usbd_class/custom_hid/custom_hid_desc.c b/middlewares/usbd_class/custom_hid/custom_hid_desc.c
index 1de620d..0df3c81 100644
--- a/middlewares/usbd_class/custom_hid/custom_hid_desc.c
+++ b/middlewares/usbd_class/custom_hid/custom_hid_desc.c
@@ -52,7 +52,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief custom hid device descriptor handler structure
diff --git a/middlewares/usbd_class/hid_iap/hid_iap_class.c b/middlewares/usbd_class/hid_iap/hid_iap_class.c
index e9b56aa..cba0ab8 100644
--- a/middlewares/usbd_class/hid_iap/hid_iap_class.c
+++ b/middlewares/usbd_class/hid_iap/hid_iap_class.c
@@ -171,7 +171,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
piap->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.c b/middlewares/usbd_class/hid_iap/hid_iap_desc.c
index bde0cf7..d673404 100644
--- a/middlewares/usbd_class/hid_iap/hid_iap_desc.c
+++ b/middlewares/usbd_class/hid_iap/hid_iap_desc.c
@@ -55,7 +55,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief hid device descriptor handler structure
diff --git a/middlewares/usbd_class/keyboard/keyboard_class.c b/middlewares/usbd_class/keyboard/keyboard_class.c
index acd2728..df37cdd 100644
--- a/middlewares/usbd_class/keyboard/keyboard_class.c
+++ b/middlewares/usbd_class/keyboard/keyboard_class.c
@@ -54,133 +54,133 @@ const static unsigned char _asciimap[128] =
{
0x00,// NUL
0x00,// SOH
- 0x00,// STX
- 0x00,// ETX
- 0x00,// EOT
- 0x00,// ENQ
- 0x00,// ACK
- 0x00,// BEL
- 0x2A,// BS Backspace
- 0x2B,// TAB Tab
- 0x28,// LF Enter
- 0x00,// VT
- 0x00,// FF
- 0x00,// CR
- 0x00,// SO
- 0x00,// SI
- 0x00,// DEL
- 0x00,// DC1
- 0x00,// DC2
- 0x00,// DC3
- 0x00,// DC4
- 0x00,// NAK
- 0x00,// SYN
- 0x00,// ETB
- 0x00,// CAN
- 0x00,// EM
- 0x00,// SUB
- 0x00,// ESC
- 0x00,// FS
- 0x00,// GS
- 0x00,// RS
- 0x00,// US
+ 0x00,// STX
+ 0x00,// ETX
+ 0x00,// EOT
+ 0x00,// ENQ
+ 0x00,// ACK
+ 0x00,// BEL
+ 0x2A,// BS Backspace
+ 0x2B,// TAB Tab
+ 0x28,// LF Enter
+ 0x00,// VT
+ 0x00,// FF
+ 0x00,// CR
+ 0x00,// SO
+ 0x00,// SI
+ 0x00,// DEL
+ 0x00,// DC1
+ 0x00,// DC2
+ 0x00,// DC3
+ 0x00,// DC4
+ 0x00,// NAK
+ 0x00,// SYN
+ 0x00,// ETB
+ 0x00,// CAN
+ 0x00,// EM
+ 0x00,// SUB
+ 0x00,// ESC
+ 0x00,// FS
+ 0x00,// GS
+ 0x00,// RS
+ 0x00,// US
- 0x2C,// ' '
- 0x1E|SHIFT,// !
- 0x34|SHIFT,// "
- 0x20|SHIFT,// #
- 0x21|SHIFT,// $
- 0x22|SHIFT,// %
- 0x24|SHIFT,// &
- 0x34, // '
- 0x26|SHIFT,// (
- 0x27|SHIFT,// )
- 0x25|SHIFT,// *
- 0x2E|SHIFT,// +
- 0x36,// ,
- 0x2D,// -
- 0x37,// .
- 0x38,// /
- 0x27,// 0
- 0x1E,// 1
- 0x1F,// 2
- 0x20,// 3
- 0x21,// 4
- 0x22,// 5
- 0x23,// 6
- 0x24,// 7
- 0x25,// 8
- 0x26,// 9
- 0x33|SHIFT,// :
- 0x33, // ;
- 0x36|SHIFT,// <
- 0x2E, // =
- 0x37|SHIFT,// >
- 0x38|SHIFT,// ?
- 0x1F|SHIFT,// @
- 0x04|SHIFT,// A
- 0x05|SHIFT,// B
- 0x06|SHIFT,// C
- 0x07|SHIFT,// D
- 0x08|SHIFT,// E
- 0x09|SHIFT,// F
- 0x0A|SHIFT,// G
- 0x0B|SHIFT,// H
- 0x0C|SHIFT,// I
- 0x0D|SHIFT,// J
- 0x0E|SHIFT,// K
- 0x0F|SHIFT,// L
- 0x10|SHIFT,// M
- 0x11|SHIFT,// N
- 0x12|SHIFT,// O
- 0x13|SHIFT,// P
- 0x14|SHIFT,// Q
- 0x15|SHIFT,// R
- 0x16|SHIFT,// S
- 0x17|SHIFT,// T
- 0x18|SHIFT,// U
- 0x19|SHIFT,// V
- 0x1A|SHIFT,// W
- 0x1B|SHIFT,// X
- 0x1C|SHIFT,// Y
- 0x1D|SHIFT,// Z
- 0x2F, // [
- 0x31, // bslash
- 0x30, // ]
- 0x23|SHIFT,// ^
- 0x2D|SHIFT,// _
- 0x35, // `
- 0x04, // a
- 0x05, // b
- 0x06, // c
- 0x07, // d
- 0x08, // e
- 0x09, // f
- 0x0A, // g
- 0x0B, // h
- 0x0C, // i
- 0x0D, // j
- 0x0E, // k
- 0x0F, // l
- 0x10, // m
- 0x11, // n
- 0x12, // o
- 0x13, // p
- 0x14, // q
- 0x15, // r
- 0x16, // s
- 0x17, // t
- 0x18, // u
- 0x19, // v
- 0x1A, // w
- 0x1B, // x
- 0x1C, // y
- 0x1D, // z
- 0x2f|SHIFT,//
- 0x31|SHIFT,// |
- 0x30|SHIFT,// }
- 0x35|SHIFT,// ~
- 0 // DEL
+ 0x2C,// ' '
+ 0x1E|SHIFT,// !
+ 0x34|SHIFT,// "
+ 0x20|SHIFT,// #
+ 0x21|SHIFT,// $
+ 0x22|SHIFT,// %
+ 0x24|SHIFT,// &
+ 0x34, // '
+ 0x26|SHIFT,// (
+ 0x27|SHIFT,// )
+ 0x25|SHIFT,// *
+ 0x2E|SHIFT,// +
+ 0x36,// ,
+ 0x2D,// -
+ 0x37,// .
+ 0x38,// /
+ 0x27,// 0
+ 0x1E,// 1
+ 0x1F,// 2
+ 0x20,// 3
+ 0x21,// 4
+ 0x22,// 5
+ 0x23,// 6
+ 0x24,// 7
+ 0x25,// 8
+ 0x26,// 9
+ 0x33|SHIFT,// :
+ 0x33, // ;
+ 0x36|SHIFT,// <
+ 0x2E, // =
+ 0x37|SHIFT,// >
+ 0x38|SHIFT,// ?
+ 0x1F|SHIFT,// @
+ 0x04|SHIFT,// A
+ 0x05|SHIFT,// B
+ 0x06|SHIFT,// C
+ 0x07|SHIFT,// D
+ 0x08|SHIFT,// E
+ 0x09|SHIFT,// F
+ 0x0A|SHIFT,// G
+ 0x0B|SHIFT,// H
+ 0x0C|SHIFT,// I
+ 0x0D|SHIFT,// J
+ 0x0E|SHIFT,// K
+ 0x0F|SHIFT,// L
+ 0x10|SHIFT,// M
+ 0x11|SHIFT,// N
+ 0x12|SHIFT,// O
+ 0x13|SHIFT,// P
+ 0x14|SHIFT,// Q
+ 0x15|SHIFT,// R
+ 0x16|SHIFT,// S
+ 0x17|SHIFT,// T
+ 0x18|SHIFT,// U
+ 0x19|SHIFT,// V
+ 0x1A|SHIFT,// W
+ 0x1B|SHIFT,// X
+ 0x1C|SHIFT,// Y
+ 0x1D|SHIFT,// Z
+ 0x2F, // [
+ 0x31, // bslash
+ 0x30, // ]
+ 0x23|SHIFT,// ^
+ 0x2D|SHIFT,// _
+ 0x35, // `
+ 0x04, // a
+ 0x05, // b
+ 0x06, // c
+ 0x07, // d
+ 0x08, // e
+ 0x09, // f
+ 0x0A, // g
+ 0x0B, // h
+ 0x0C, // i
+ 0x0D, // j
+ 0x0E, // k
+ 0x0F, // l
+ 0x10, // m
+ 0x11, // n
+ 0x12, // o
+ 0x13, // p
+ 0x14, // q
+ 0x15, // r
+ 0x16, // s
+ 0x17, // t
+ 0x18, // u
+ 0x19, // v
+ 0x1A, // w
+ 0x1B, // x
+ 0x1C, // y
+ 0x1D, // z
+ 0x2f|SHIFT,//
+ 0x31|SHIFT,// |
+ 0x30|SHIFT,// }
+ 0x35|SHIFT,// ~
+ 0 // DEL
};
/* usb device class handler */
@@ -301,7 +301,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pkeyboard->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.c b/middlewares/usbd_class/keyboard/keyboard_desc.c
index 938a97f..f686cb4 100644
--- a/middlewares/usbd_class/keyboard/keyboard_desc.c
+++ b/middlewares/usbd_class/keyboard/keyboard_desc.c
@@ -53,7 +53,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief keyboard device descriptor handler structure
diff --git a/middlewares/usbd_class/mouse/mouse_class.c b/middlewares/usbd_class/mouse/mouse_class.c
index 00077bc..867b5fa 100644
--- a/middlewares/usbd_class/mouse/mouse_class.c
+++ b/middlewares/usbd_class/mouse/mouse_class.c
@@ -166,6 +166,10 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pmouse->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
usbd_ctrl_unsupport(pudev);
break;
diff --git a/middlewares/usbd_class/mouse/mouse_desc.c b/middlewares/usbd_class/mouse/mouse_desc.c
index 42d97b7..e1c2918 100644
--- a/middlewares/usbd_class/mouse/mouse_desc.c
+++ b/middlewares/usbd_class/mouse/mouse_desc.c
@@ -53,7 +53,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief mouse device descriptor handler structure
diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.c b/middlewares/usbd_class/msc/msc_bot_scsi.c
index 62efeb2..6d1ab4c 100644
--- a/middlewares/usbd_class/msc/msc_bot_scsi.c
+++ b/middlewares/usbd_class/msc/msc_bot_scsi.c
@@ -42,11 +42,11 @@
#pragma data_alignment=4
#endif
ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = {
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
};
#if defined ( __ICCARM__ ) /* iar compiler */
diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.h b/middlewares/usbd_class/msc/msc_bot_scsi.h
index 80146f9..15ddadc 100644
--- a/middlewares/usbd_class/msc/msc_bot_scsi.h
+++ b/middlewares/usbd_class/msc/msc_bot_scsi.h
@@ -197,7 +197,7 @@ typedef struct
uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN];
uint32_t blk_size[MSC_SUPPORT_MAX_LUN];
- uint32_t blk_addr;
+ uint64_t blk_addr;
uint32_t blk_len;
uint32_t data_len;
diff --git a/middlewares/usbd_class/msc/msc_class.c b/middlewares/usbd_class/msc/msc_class.c
index 64fe643..d0b225c 100644
--- a/middlewares/usbd_class/msc/msc_class.c
+++ b/middlewares/usbd_class/msc/msc_class.c
@@ -164,7 +164,10 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
}
bot_scsi_clear_feature(udev, setup->wIndex);
break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
diff --git a/middlewares/usbd_class/msc/msc_desc.c b/middlewares/usbd_class/msc/msc_desc.c
index 85a9b07..96e14ac 100644
--- a/middlewares/usbd_class/msc/msc_desc.c
+++ b/middlewares/usbd_class/msc/msc_desc.c
@@ -54,7 +54,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure
diff --git a/middlewares/usbd_class/printer/printer_class.c b/middlewares/usbd_class/printer/printer_class.c
index 78a2712..2316691 100644
--- a/middlewares/usbd_class/printer/printer_class.c
+++ b/middlewares/usbd_class/printer/printer_class.c
@@ -163,7 +163,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pprter->alt_setting = setup->wValue;
break;
+ case USB_STD_REQ_CLEAR_FEATURE:
+ break;
+ case USB_STD_REQ_SET_FEATURE:
+ break;
default:
+ usbd_ctrl_unsupport(pudev);
break;
}
break;
diff --git a/middlewares/usbd_class/printer/printer_desc.c b/middlewares/usbd_class/printer/printer_desc.c
index 2904006..a42184f 100644
--- a/middlewares/usbd_class/printer/printer_desc.c
+++ b/middlewares/usbd_class/printer/printer_desc.c
@@ -54,7 +54,10 @@ 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];
+#if defined ( __ICCARM__ ) /* iar compiler */
+ #pragma data_alignment=4
+#endif
+ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure
diff --git a/middlewares/usbd_drivers/inc/usb_std.h b/middlewares/usbd_drivers/inc/usb_std.h
index 4758496..dd679ea 100644
--- a/middlewares/usbd_drivers/inc/usb_std.h
+++ b/middlewares/usbd_drivers/inc/usb_std.h
@@ -248,8 +248,13 @@ typedef struct
/**
* @brief min and max define
*/
+#ifndef MIN
#define MIN(a, b) (uint16_t)(((a) < (b)) ? (a) : (b)) /*!< min define*/
+#endif
+
+#ifndef MAX
#define MAX(a, b) (uint16_t)(((a) > (b)) ? (a) : (b)) /*!< max define*/
+#endif
/**
* @brief low byte and high byte define
diff --git a/middlewares/usbd_drivers/src/usbd_sdr.c b/middlewares/usbd_drivers/src/usbd_sdr.c
index 21e1e94..b7c555f 100644
--- a/middlewares/usbd_drivers/src/usbd_sdr.c
+++ b/middlewares/usbd_drivers/src/usbd_sdr.c
@@ -395,9 +395,11 @@ usb_sts_type usbd_interface_request(usbd_core_type *udev)
usb_setup_type *setup = &udev->setup;
switch(udev->conn_state)
{
+ case USB_CONN_STATE_DEFAULT:
+ case USB_CONN_STATE_ADDRESSED:
case USB_CONN_STATE_CONFIGURED:
- udev->class_handler->setup_handler(udev, &udev->setup);
- if(setup->wLength == 0)
+ ret = udev->class_handler->setup_handler(udev, &udev->setup);
+ if(setup->wLength == 0 && ret == USB_OK)
{
usbd_ctrl_send_status(udev);
}
@@ -421,9 +423,10 @@ usb_sts_type usbd_endpoint_request(usbd_core_type *udev)
uint8_t ept_addr = LBYTE(setup->wIndex);
usb_ept_info *ept_info;
- if((setup->bmRequestType & USB_REQ_TYPE_RESERVED) == USB_REQ_TYPE_CLASS)
+ if((setup->bmRequestType & USB_REQ_TYPE_RESERVED) != USB_REQ_TYPE_STANDARD)
{
udev->class_handler->setup_handler(udev, &udev->setup);
+ return ret;
}
switch(setup->bRequest)
{
@@ -435,6 +438,17 @@ usb_sts_type usbd_endpoint_request(usbd_core_type *udev)
{
usbd_set_stall(udev, ept_addr);
}
+ if((ept_addr & 0x80) != 0)
+ {
+ ept_info = &udev->ept_in[ept_addr & 0x7F];
+ }
+ else
+ {
+ ept_info = &udev->ept_out[ept_addr & 0x7F];
+ }
+ ept_info->status = 0x0000;
+ usbd_ctrl_send(udev, (uint8_t *)(&ept_info->status), 2);
+
break;
case USB_CONN_STATE_CONFIGURED:
{
diff --git a/project/at32f413_board/at32f413_board.c b/project/at32f413_board/at32f413_board.c
index a88b1f7..ebc4e4b 100644
--- a/project/at32f413_board/at32f413_board.c
+++ b/project/at32f413_board/at32f413_board.c
@@ -22,7 +22,6 @@
*
**************************************************************************
*/
-
#include "at32f413_board.h"
/** @addtogroup AT32F413_board
@@ -84,7 +83,7 @@ static __IO uint32_t fac_ms;
#else
#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
#endif
-
+
/**
* @brief retargets the c library printf function to the usart.
* @param none
@@ -93,16 +92,24 @@ static __IO uint32_t fac_ms;
PUTCHAR_PROTOTYPE
{
while(usart_flag_get(PRINT_UART, USART_TDBE_FLAG) == RESET);
- usart_data_transmit(PRINT_UART, ch);
+ usart_data_transmit(PRINT_UART, (uint16_t)ch);
+ while(usart_flag_get(PRINT_UART, USART_TDC_FLAG) == RESET);
return ch;
}
+#if (defined (__GNUC__) && !defined (__clang__)) || (defined (__ICCARM__))
#if defined (__GNUC__) && !defined (__clang__)
int _write(int fd, char *pbuffer, int size)
+#elif defined ( __ICCARM__ )
+#pragma module_name = "?__write"
+int __write(int fd, char *pbuffer, int size)
+#endif
{
for(int i = 0; i < size; i ++)
{
- __io_putchar(*pbuffer++);
+ while(usart_flag_get(PRINT_UART, USART_TDBE_FLAG) == RESET);
+ usart_data_transmit(PRINT_UART, (uint16_t)(*pbuffer++));
+ while(usart_flag_get(PRINT_UART, USART_TDC_FLAG) == RESET);
}
return size;
diff --git a/project/at_start_f413/examples/acc/calibration/readme.txt b/project/at_start_f413/examples/acc/calibration/readme.txt
index 986deb3..e685dd8 100644
--- a/project/at_start_f413/examples/acc/calibration/readme.txt
+++ b/project/at_start_f413/examples/acc/calibration/readme.txt
@@ -7,4 +7,4 @@
this demo is based on the at-start board, in this demo, acc will calibration
hick when usb is connecting.
- for more detailed information. please refer to the application note document AN0107.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0107.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c b/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/acc/calibration/src/main.c b/project/at_start_f413/examples/acc/calibration/src/main.c
index 9ce1381..df4c0e8 100644
--- a/project/at_start_f413/examples/acc/calibration/src/main.c
+++ b/project/at_start_f413/examples/acc/calibration/src/main.c
@@ -158,11 +158,7 @@ void system_clock_config_for_acc(void)
/* reset crm */
crm_reset();
- #ifdef SCLK_FROM_HICK
crm_clock_source_enable(CRM_CLOCK_SOURCE_HICK, TRUE);
- #elif defined SCLK_FROM_HEXT
- crm_clock_source_enable(CRM_CLOCK_SOURCE_HEXT, TRUE);
- #endif
/* wait till hick is ready */
while(SET != crm_flag_get(CRM_HICK_STABLE_FLAG))
diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt
index 90e019d..27bb58b 100644
--- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt
+++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt
@@ -11,4 +11,4 @@
- adc1_ordinary_valuetab[n][0] ---> (adc2_channel_7<<16) | adc1_channel_4
- adc1_ordinary_valuetab[n][1] ---> (adc2_channel_8<<16) | adc1_channel_5
- adc1_ordinary_valuetab[n][2] ---> (adc2_channel_9<<16) | adc1_channel_6
- for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt b/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt
index 09ec335..c7ef082 100644
--- a/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt
+++ b/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt
@@ -9,4 +9,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 AN0113.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt b/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt
index 55fe0f2..e5c46e4 100644
--- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt
+++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt
@@ -17,4 +17,4 @@
trigger source:
- ordinary --> exint line11(pc11)
- preempt --> exint line15(pa15)
- for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt b/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt
index 86513c9..1d06f94 100644
--- a/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt
+++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt
@@ -9,4 +9,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 AN0113.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/adc/repeat_conversion_loop_transfer/readme.txt b/project/at_start_f413/examples/adc/repeat_conversion_loop_transfer/readme.txt
index c7b77b0..c627545 100644
--- a/project/at_start_f413/examples/adc/repeat_conversion_loop_transfer/readme.txt
+++ b/project/at_start_f413/examples/adc/repeat_conversion_loop_transfer/readme.txt
@@ -11,4 +11,4 @@
- adc1_ordinary_valuetab[0] ---> adc1_channel_4
- adc1_ordinary_valuetab[1] ---> adc1_channel_5
- adc1_ordinary_valuetab[2] ---> adc1_channel_6
- for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/adc/repeat_conversion_loop_transfer/src/at32f413_clock.c b/project/at_start_f413/examples/adc/repeat_conversion_loop_transfer/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/adc/repeat_conversion_loop_transfer/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/adc/repeat_conversion_loop_transfer/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt b/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt
index 946d811..393e517 100644
--- a/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt
+++ b/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt
@@ -11,4 +11,4 @@
- adc1_ordinary_valuetab[0] ---> adc1_channel_4
- adc1_ordinary_valuetab[1] ---> adc1_channel_5
- adc1_ordinary_valuetab[2] ---> adc1_channel_6
- for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt
index 8277c3f..0d0b75d 100644
--- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt
+++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt
@@ -15,4 +15,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 AN0113.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt b/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt
index e669434..2c8ed42 100644
--- a/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt
+++ b/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt
@@ -12,4 +12,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 AN0113.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0113.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c b/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/can/communication_mode/readme.txt b/project/at_start_f413/examples/can/communication_mode/readme.txt
index d097f74..914c8fd 100644
--- a/project/at_start_f413/examples/can/communication_mode/readme.txt
+++ b/project/at_start_f413/examples/can/communication_mode/readme.txt
@@ -13,4 +13,4 @@
- can tx ---> pb9
- can rx ---> pb8
- for more detailed information. please refer to the application note document AN0095.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0095.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c b/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/can/filter/src/at32f413_clock.c b/project/at_start_f413/examples/can/filter/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/can/filter/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/can/filter/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt b/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt
index c22b67f..0e21060 100644
--- a/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt
+++ b/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt
@@ -8,4 +8,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
+ for more detailed information. please refer to the application note document AN0083.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/cortex_m4/cmsis_dsp/readme.txt b/project/at_start_f413/examples/cortex_m4/cmsis_dsp/readme.txt
index 3c9ae0c..0f1fdc2 100644
--- a/project/at_start_f413/examples/cortex_m4/cmsis_dsp/readme.txt
+++ b/project/at_start_f413/examples/cortex_m4/cmsis_dsp/readme.txt
@@ -8,4 +8,4 @@
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. for more detailed information.
- please refer to the application note document AN0036.
\ No newline at end of file
+ please refer to the application note document AN0036.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/cortex_m4/cmsis_dsp/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/cmsis_dsp/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/cortex_m4/cmsis_dsp/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/cortex_m4/cmsis_dsp/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/crc/calculation/readme.txt b/project/at_start_f413/examples/crc/calculation/readme.txt
index 1090557..0dda0d8 100644
--- a/project/at_start_f413/examples/crc/calculation/readme.txt
+++ b/project/at_start_f413/examples/crc/calculation/readme.txt
@@ -8,4 +8,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
+ for more detailed information. please refer to the application note document AN0109.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c b/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt b/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt
index 93545ce..0871b15 100644
--- a/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt
+++ b/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt
@@ -8,4 +8,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 AN0118.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0118.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c b/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c
index be2a575..7bcc816 100644
--- a/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c
+++ b/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c
@@ -90,9 +90,9 @@ void clock_failure_detection_handler(void)
/**
* @brief config sclk 192 mhz with hick clock source.
* @note the system clock is configured as follow:
- * - system clock = hick / 2 * pll_mult
- * - system clock source = pll (hick)
- * - hick = 8000000
+ * system clock (sclk) = hick / 2 * pll_mult
+ * system clock source = pll (hick)
+ * - hick = HICK_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/crm/sysclk_switch/readme.txt b/project/at_start_f413/examples/crm/sysclk_switch/readme.txt
index f4a7384..10a27ed 100644
--- a/project/at_start_f413/examples/crm/sysclk_switch/readme.txt
+++ b/project/at_start_f413/examples/crm/sysclk_switch/readme.txt
@@ -7,4 +7,4 @@
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 AN0118.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0118.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/crm/sysclk_switch/src/main.c b/project/at_start_f413/examples/crm/sysclk_switch/src/main.c
index 8d3fdd7..800bc94 100644
--- a/project/at_start_f413/examples/crm/sysclk_switch/src/main.c
+++ b/project/at_start_f413/examples/crm/sysclk_switch/src/main.c
@@ -87,9 +87,9 @@ static void switch_system_clock(void)
/**
* @brief config sclk 64 mhz with hick clock source.
* @note the system clock is configured as follow:
- * - system clock = hick / 2 * pll_mult
- * - system clock source = pll (hick)
- * - hick = 8000000
+ * system clock (sclk) = hick / 2 * pll_mult
+ * system clock source = pll (hick)
+ * - hick = HICK_VALUE
* - sclk = 64000000
* - ahbdiv = 1
* - ahbclk = 64000000
@@ -161,9 +161,9 @@ static void sclk_64m_hick_config(void)
/**
* @brief config sclk 96 mhz with hext clock source.
* @note the system clock is configured as follow:
- * - system clock = hext / 2 * pll_mult
- * - system clock source = pll (hext)
- * - hick = 8000000
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 96000000
* - ahbdiv = 1
* - ahbclk = 96000000
diff --git a/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c b/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c
index 25198fa..080cec6 100644
--- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c
+++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c
@@ -102,7 +102,7 @@ int main(void)
dma_init_struct.loop_mode_enable = FALSE;
dma_init(DMA2_CHANNEL1, &dma_init_struct);
- /* enable transfer full data intterrupt */
+ /* enable transfer full data interrupt */
dma_interrupt_enable(DMA2_CHANNEL1, DMA_FDT_INT, TRUE);
/* dma2 channel1 interrupt nvic init */
diff --git a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/dma/flash_to_sram/src/main.c b/project/at_start_f413/examples/dma/flash_to_sram/src/main.c
index 9567fe0..e816934 100644
--- a/project/at_start_f413/examples/dma/flash_to_sram/src/main.c
+++ b/project/at_start_f413/examples/dma/flash_to_sram/src/main.c
@@ -117,7 +117,7 @@ int main(void)
dma_init_struct.loop_mode_enable = FALSE;
dma_init(DMA1_CHANNEL1, &dma_init_struct);
- /* enable transfer full data intterrupt */
+ /* enable transfer full data interrupt */
dma_interrupt_enable(DMA1_CHANNEL1, DMA_FDT_INT, TRUE);
/* dma1 channel1 interrupt nvic init */
diff --git a/project/at_start_f413/examples/exint/exint_config/readme.txt b/project/at_start_f413/examples/exint/exint_config/readme.txt
index 135aa5b..e15a725 100644
--- a/project/at_start_f413/examples/exint/exint_config/readme.txt
+++ b/project/at_start_f413/examples/exint/exint_config/readme.txt
@@ -8,4 +8,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
+ for more detailed information. please refer to the application note document AN0104.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c b/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt b/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt
index 98dd7d0..fe61b97 100644
--- a/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt
+++ b/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt
@@ -10,4 +10,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
+ for more detailed information. please refer to the application note document AN0104.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/flash/fap_enable/src/at32f413_clock.c b/project/at_start_f413/examples/flash/fap_enable/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/flash/fap_enable/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/flash/fap_enable/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/flash.c b/project/at_start_f413/examples/flash/flash_write_read/src/flash.c
index c2466b7..9046da3 100644
--- a/project/at_start_f413/examples/flash/flash_write_read/src/flash.c
+++ b/project/at_start_f413/examples/flash/flash_write_read/src/flash.c
@@ -33,7 +33,11 @@
* @{
*/
+#if defined (AT32F413xC)
#define SECTOR_SIZE 2048 /* this parameter depends on the specific model of the chip */
+#else
+#define SECTOR_SIZE 1024 /* this parameter depends on the specific model of the chip */
+#endif
uint16_t flash_buf[SECTOR_SIZE / 2];
diff --git a/project/at_start_f413/examples/flash/operate_spim/readme.txt b/project/at_start_f413/examples/flash/operate_spim/readme.txt
index b88727d..8576eb3 100644
--- a/project/at_start_f413/examples/flash/operate_spim/readme.txt
+++ b/project/at_start_f413/examples/flash/operate_spim/readme.txt
@@ -15,4 +15,4 @@
- spim io1 ---> pb11
- spim io2 ---> pb7
- spim io3 ---> pb6
- for more detailed information. please refer to the application note document AN0042.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0042.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx
index 030cf5b..353b09c 100644
--- a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx
+++ b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx
@@ -117,6 +117,11 @@
BIN\CMSIS_AGDI.dll
+
+ 0
+ CMSIS_AGDI
+ -X"Any" -UAny -O206 -S0 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN2 -FF0AT32F413_256.FLM -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM) -FF1AT32F413_EXT_TYPE2_REAMP1_16MB -FS18400000 -FL11000000 -FP1($$Device:-AT32F413RCT7$Flash\AT32F413_EXT_TYPE2_REAMP1_16MB.FLM)
+
0
UL2CM3
diff --git a/project/at_start_f413/examples/flash/run_in_spim/readme.txt b/project/at_start_f413/examples/flash/run_in_spim/readme.txt
index e518976..29176af 100644
--- a/project/at_start_f413/examples/flash/run_in_spim/readme.txt
+++ b/project/at_start_f413/examples/flash/run_in_spim/readme.txt
@@ -20,4 +20,4 @@
- spim io1 ---> pb11
- spim io2 ---> pb7
- spim io3 ---> pb6
- for more detailed information. please refer to the application note document AN0042.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0042.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/gpio/io_toggle/readme.txt b/project/at_start_f413/examples/gpio/io_toggle/readme.txt
index 785eca9..68e372d 100644
--- a/project/at_start_f413/examples/gpio/io_toggle/readme.txt
+++ b/project/at_start_f413/examples/gpio/io_toggle/readme.txt
@@ -6,4 +6,4 @@
*/
this demo is based on the at-start board, this demo toggle pa.01 forever,
- to describes how to use scr and clr register for max io toggling.
\ No newline at end of file
+ to describes how to use scr and clr register for max io toggling.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/gpio/io_toggle/src/at32f413_clock.c b/project/at_start_f413/examples/gpio/io_toggle/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/gpio/io_toggle/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/gpio/io_toggle/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/gpio/led_toggle/readme.txt b/project/at_start_f413/examples/gpio/led_toggle/readme.txt
index 0c098e9..aa77380 100644
--- a/project/at_start_f413/examples/gpio/led_toggle/readme.txt
+++ b/project/at_start_f413/examples/gpio/led_toggle/readme.txt
@@ -7,4 +7,4 @@
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
+ for more detailed information. please refer to the application note document AN0119.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt b/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt
index 6da90e8..a2a631e 100644
--- a/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt
+++ b/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt
@@ -12,4 +12,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
+ for more detailed information. please refer to the application note document AN0119.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/i2c/communication_int/readme.txt b/project/at_start_f413/examples/i2c/communication_int/readme.txt
index 7e5e888..1737029 100644
--- a/project/at_start_f413/examples/i2c/communication_int/readme.txt
+++ b/project/at_start_f413/examples/i2c/communication_int/readme.txt
@@ -17,4 +17,4 @@
pin used:
1. scl --- pb6
- 2. sda --- pb7
\ No newline at end of file
+ 2. sda --- pb7
\ No newline at end of file
diff --git a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/i2c/communication_poll/readme.txt b/project/at_start_f413/examples/i2c/communication_poll/readme.txt
index 08d57ab..5ae1dc9 100644
--- a/project/at_start_f413/examples/i2c/communication_poll/readme.txt
+++ b/project/at_start_f413/examples/i2c/communication_poll/readme.txt
@@ -17,4 +17,4 @@
pin used:
1. scl --- pb6
- 2. sda --- pb7
\ No newline at end of file
+ 2. sda --- pb7
\ No newline at end of file
diff --git a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt b/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt
index 78e7051..942341d 100644
--- a/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt
+++ b/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt
@@ -14,4 +14,4 @@
- pb13 <---> pa5(ck)
- pb15 <---> pa7(sd)
- for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt b/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt
index 7f4ccdb..8c534b7 100644
--- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt
+++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt
@@ -14,4 +14,4 @@
- pb13 <---> pa5(ck)
- pb15 <---> pa7(sd)
- for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt b/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt
index ac99617..aae69c0 100644
--- a/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt
+++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt
@@ -8,4 +8,4 @@
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
+ for more detailed information. please refer to the application note document AN0100.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt b/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt
index 41b3523..453bdc7 100644
--- a/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt
+++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt
@@ -8,4 +8,4 @@
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
+ for more detailed information. please refer to the application note document AN0100.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt b/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt
index f09a581..704cf17 100644
--- a/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt
+++ b/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt
@@ -8,4 +8,4 @@
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.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0100.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt b/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt
index ea003ce..eb9f2c8 100644
--- a/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt
+++ b/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt
@@ -8,4 +8,4 @@
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
+ for more detailed information. please refer to the application note document AN0100.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/pwc/standby_rtc/readme.txt b/project/at_start_f413/examples/pwc/standby_rtc/readme.txt
index abd8021..19bf304 100644
--- a/project/at_start_f413/examples/pwc/standby_rtc/readme.txt
+++ b/project/at_start_f413/examples/pwc/standby_rtc/readme.txt
@@ -8,4 +8,4 @@
this demo is based on the at-start board, in this demo, shows how to exit
standby mode by rtc alarm.
- for more detailed information. please refer to the application note document AN0100.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0100.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt b/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt
index f56f620..0a6587c 100644
--- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt
+++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt
@@ -8,4 +8,4 @@
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
+ for more detailed information. please refer to the application note document AN0100.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c
index 2b20c63..9ee992a 100644
--- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c
+++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c
@@ -75,7 +75,7 @@ int main(void)
}
at32_led_on(LED4);
-
+
/*delay to check led status*/
delay_ms(1000);
diff --git a/project/at_start_f413/examples/rtc/calendar/readme.txt b/project/at_start_f413/examples/rtc/calendar/readme.txt
index 0641829..89edaf7 100644
--- a/project/at_start_f413/examples/rtc/calendar/readme.txt
+++ b/project/at_start_f413/examples/rtc/calendar/readme.txt
@@ -9,4 +9,4 @@
rtc peripherals to implement calendar and alarm clock functions. use usart1
to view calendar information. led3 flashes once when the seconds are updated,
and led4 turns on when the alarm is generated.
- for more detailed information. please refer to the application note document AN0111.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0111.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c b/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/rtc/lick_calibration/readme.txt b/project/at_start_f413/examples/rtc/lick_calibration/readme.txt
index b4f646a..925f2c6 100644
--- a/project/at_start_f413/examples/rtc/lick_calibration/readme.txt
+++ b/project/at_start_f413/examples/rtc/lick_calibration/readme.txt
@@ -7,4 +7,4 @@
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.
- for more detailed information. please refer to the application note document AN0111.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0111.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt b/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt
index 6574582..f0bab09 100644
--- a/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt
+++ b/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt
@@ -16,4 +16,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.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0105.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c
index 2a469c3..e210e5d 100644
--- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c
+++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c
@@ -143,8 +143,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 12mhz */
- clkdiv = system_core_clock / 12000000;
+ /* set sdio_ck to 4mhz */
+ clkdiv = system_core_clock / 4000000;
if(clkdiv >= 2)
{
@@ -153,8 +153,8 @@ sd_error_status_type sd_init(void)
}
else
{
- /* set sdio_ck to 48mhz */
- clkdiv = system_core_clock / 48000000;
+ /* set sdio_ck to 4mhz */
+ clkdiv = system_core_clock / 4000000;
if(clkdiv >= 2)
{
diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/ffconf.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/ffconf.h
index e6682aa..6caf568 100644
--- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/ffconf.h
+++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/ffconf.h
@@ -2,20 +2,20 @@
/ FatFs Functional Configurations
/---------------------------------------------------------------------------*/
-#define FFCONF_DEF 86631 /* Revision ID */
+#define FFCONF_DEF 86631 /* Revision ID */
/*---------------------------------------------------------------------------/
/ Function Configurations
/---------------------------------------------------------------------------*/
-#define FF_FS_READONLY 0
+#define FF_FS_READONLY 0
/* This option switches read-only configuration. (0:Read/Write or 1:Read-only)
/ Read-only configuration removes writing API functions, f_write(), f_sync(),
/ f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree()
/ and optional writing functions as well. */
-#define FF_FS_MINIMIZE 0
+#define FF_FS_MINIMIZE 0
/* This option defines minimization level to remove some basic API functions.
/
/ 0: Basic functions are fully enabled.
@@ -25,41 +25,41 @@
/ 3: f_lseek() function is removed in addition to 2. */
-#define FF_USE_FIND 0
+#define FF_USE_FIND 0
/* This option switches filtered directory read functions, f_findfirst() and
/ f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */
-#define FF_USE_MKFS 1//0
+#define FF_USE_MKFS 1//0
/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
-#define FF_USE_FASTSEEK 1//0
+#define FF_USE_FASTSEEK 1//0
/* This option switches fast seek function. (0:Disable or 1:Enable) */
-#define FF_USE_EXPAND 0
+#define FF_USE_EXPAND 0
/* This option switches f_expand function. (0:Disable or 1:Enable) */
-#define FF_USE_CHMOD 0
+#define FF_USE_CHMOD 0
/* This option switches attribute manipulation functions, f_chmod() and f_utime().
/ (0:Disable or 1:Enable) Also FF_FS_READONLY needs to be 0 to enable this option. */
-#define FF_USE_LABEL 0
+#define FF_USE_LABEL 0
/* This option switches volume label functions, f_getlabel() and f_setlabel().
/ (0:Disable or 1:Enable) */
-#define FF_USE_FORWARD 0
+#define FF_USE_FORWARD 0
/* This option switches f_forward() function. (0:Disable or 1:Enable) */
-#define FF_USE_STRFUNC 0
-#define FF_PRINT_LLI 0
-#define FF_PRINT_FLOAT 0
-#define FF_STRF_ENCODE 0
+#define FF_USE_STRFUNC 0
+#define FF_PRINT_LLI 0
+#define FF_PRINT_FLOAT 0
+#define FF_STRF_ENCODE 0
/* FF_USE_STRFUNC switches string functions, f_gets(), f_putc(), f_puts() and
/ f_printf().
/
@@ -84,7 +84,7 @@
/ Locale and Namespace Configurations
/---------------------------------------------------------------------------*/
-#define FF_CODE_PAGE 932
+#define FF_CODE_PAGE 932
/* This option specifies the OEM code page to be used on the target system.
/ Incorrect code page setting can cause a file open failure.
/
@@ -113,8 +113,8 @@
*/
-#define FF_USE_LFN 0
-#define FF_MAX_LFN 255
+#define FF_USE_LFN 0
+#define FF_MAX_LFN 255
/* The FF_USE_LFN switches the support for LFN (long file name).
/
/ 0: Disable LFN. FF_MAX_LFN has no effect.
@@ -133,7 +133,7 @@
/ ff_memfree() exemplified in ffsystem.c, need to be added to the project. */
-#define FF_LFN_UNICODE 0
+#define FF_LFN_UNICODE 0
/* This option switches the character encoding on the API when LFN is enabled.
/
/ 0: ANSI/OEM in current CP (TCHAR = char)
@@ -145,15 +145,15 @@
/ When LFN is not enabled, this option has no effect. */
-#define FF_LFN_BUF 255
-#define FF_SFN_BUF 12
+#define FF_LFN_BUF 255
+#define FF_SFN_BUF 12
/* This set of options defines size of file name members in the FILINFO structure
/ which is used to read out directory items. These values should be suffcient for
/ the file names to read. The maximum possible length of the read file name depends
/ on character encoding. When LFN is not enabled, these options have no effect. */
-#define FF_FS_RPATH 0
+#define FF_FS_RPATH 0
/* This option configures support for relative path.
/
/ 0: Disable relative path and remove related functions.
@@ -166,12 +166,12 @@
/ Drive/Volume Configurations
/---------------------------------------------------------------------------*/
-#define FF_VOLUMES 3//1
+#define FF_VOLUMES 3//1
/* Number of volumes (logical drives) to be used. (1-10) */
-#define FF_STR_VOLUME_ID 0
-#define FF_VOLUME_STRS "RAM","NAND","CF","SD","SD2","USB","USB2","USB3"
+#define FF_STR_VOLUME_ID 0
+#define FF_VOLUME_STRS "RAM","NAND","CF","SD","SD2","USB","USB2","USB3"
/* FF_STR_VOLUME_ID switches support for volume ID in arbitrary strings.
/ When FF_STR_VOLUME_ID is set to 1 or 2, arbitrary strings can be used as drive
/ number in the path name. FF_VOLUME_STRS defines the volume ID strings for each
@@ -184,7 +184,7 @@
*/
-#define FF_MULTI_PARTITION 0
+#define FF_MULTI_PARTITION 0
/* This option switches support for multiple volumes on the physical drive.
/ By default (0), each logical drive number is bound to the same physical drive
/ number and only an FAT volume found on the physical drive will be mounted.
@@ -193,8 +193,8 @@
/ funciton will be available. */
-#define FF_MIN_SS 512
-#define FF_MAX_SS 512
+#define FF_MIN_SS 512
+#define FF_MAX_SS 512
/* This set of options configures the range of sector size to be supported. (512,
/ 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and
/ harddisk, but a larger value may be required for on-board flash memory and some
@@ -203,17 +203,17 @@
/ GET_SECTOR_SIZE command. */
-#define FF_LBA64 0
+#define FF_LBA64 0
/* This option switches support for 64-bit LBA. (0:Disable or 1:Enable)
/ To enable the 64-bit LBA, also exFAT needs to be enabled. (FF_FS_EXFAT == 1) */
-#define FF_MIN_GPT 0x10000000
+#define FF_MIN_GPT 0x10000000
/* Minimum number of sectors to switch GPT as partitioning format in f_mkfs and
/ f_fdisk function. 0x100000000 max. This option has no effect when FF_LBA64 == 0. */
-#define FF_USE_TRIM 0
+#define FF_USE_TRIM 0
/* This option switches support for ATA-TRIM. (0:Disable or 1:Enable)
/ To enable Trim function, also CTRL_TRIM command should be implemented to the
/ disk_ioctl() function. */
@@ -224,23 +224,23 @@
/ System Configurations
/---------------------------------------------------------------------------*/
-#define FF_FS_TINY 0
+#define FF_FS_TINY 0
/* This option switches tiny buffer configuration. (0:Normal or 1:Tiny)
/ At the tiny configuration, size of file object (FIL) is shrinked FF_MAX_SS bytes.
/ Instead of private sector buffer eliminated from the file object, common sector
/ buffer in the filesystem object (FATFS) is used for the file data transfer. */
-#define FF_FS_EXFAT 0
+#define FF_FS_EXFAT 0
/* This option switches support for exFAT filesystem. (0:Disable or 1:Enable)
/ To enable exFAT, also LFN needs to be enabled. (FF_USE_LFN >= 1)
/ Note that enabling exFAT discards ANSI C (C89) compatibility. */
-#define FF_FS_NORTC 1//0
-#define FF_NORTC_MON 1
-#define FF_NORTC_MDAY 1
-#define FF_NORTC_YEAR 2020
+#define FF_FS_NORTC 1//0
+#define FF_NORTC_MON 1
+#define FF_NORTC_MDAY 1
+#define FF_NORTC_YEAR 2020
/* The option FF_FS_NORTC switches timestamp functiton. If the system does not have
/ any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable
/ the timestamp function. Every object modified by FatFs will have a fixed timestamp
@@ -251,7 +251,7 @@
/ These options have no effect in read-only configuration (FF_FS_READONLY = 1). */
-#define FF_FS_NOFSINFO 0
+#define FF_FS_NOFSINFO 0
/* If you need to know correct free space on the FAT32 volume, set bit 0 of this
/ option, and f_getfree() function at first time after volume mount will force
/ a full FAT scan. Bit 1 controls the use of last allocated cluster number.
@@ -263,7 +263,7 @@
*/
-#define FF_FS_LOCK 0
+#define FF_FS_LOCK 0
/* The option FF_FS_LOCK switches file lock function to control duplicated file open
/ and illegal operation to open objects. This option must be 0 when FF_FS_READONLY
/ is 1.
@@ -275,10 +275,10 @@
/ lock control is independent of re-entrancy. */
-/* #include // O/S definitions */
-#define FF_FS_REENTRANT 0
-#define FF_FS_TIMEOUT 1000
-#define FF_SYNC_t HANDLE
+/* #include // O/S definitions */
+#define FF_FS_REENTRANT 0
+#define FF_FS_TIMEOUT 1000
+#define FF_SYNC_t HANDLE
/* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs
/ module itself. Note that regardless of this option, file access to different
/ volume is always re-entrant and volume control functions, f_mount(), f_mkfs()
diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt b/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt
index 9f11c87..ec7e68b 100644
--- a/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt
+++ b/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt
@@ -15,4 +15,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.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0105.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c
index 1150584..b830ce9 100644
--- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c
+++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c
@@ -144,8 +144,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 12mhz */
- clkdiv = system_core_clock / 12000000;
+ /* set sdio_ck to 4mhz */
+ clkdiv = system_core_clock / 4000000;
if(clkdiv >= 2)
{
@@ -154,8 +154,8 @@ sd_error_status_type sd_init(void)
}
else
{
- /* set sdio_ck to 48mhz */
- clkdiv = system_core_clock / 48000000;
+ /* set sdio_ck to 4mhz */
+ clkdiv = system_core_clock / 4000000;
if(clkdiv >= 2)
{
diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/diskio.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/diskio.c
index f232da1..2c9f517 100644
--- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/diskio.c
+++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/diskio.c
@@ -8,16 +8,16 @@
/*-----------------------------------------------------------------------*/
-#include "ff.h" /* Obtains integer types */
-#include "diskio.h" /* Declarations of disk functions */
+#include "ff.h" /* Obtains integer types */
+#include "diskio.h" /* Declarations of disk functions */
#include
-#include "at32_sdio.h" /* Example: Header file of existing MMC/SDC contorl module */
+#include "at32_sdio.h" /* Example: Header file of existing MMC/SDC contorl module */
/* Definitions of physical drive number for each drive */
-#define DEV_RAM 0 /* Example: Map Ramdisk to physical drive 0 */
-#define DEV_MMC 1 /* Example: Map MMC/SD card to physical drive 1 */
-#define DEV_USB 2 /* Example: Map USB MSD to physical drive 2 */
+#define DEV_RAM 0 /* Example: Map Ramdisk to physical drive 0 */
+#define DEV_MMC 1 /* Example: Map MMC/SD card to physical drive 1 */
+#define DEV_USB 2 /* Example: Map USB MSD to physical drive 2 */
__align(4) uint8_t sdio_data_buffer[512]; /* buf for sd_read_disk/sd_write_disk function used. */
@@ -108,29 +108,29 @@ sd_error_status_type sd_write_disk(const uint8_t *buf, uint32_t sector, uint8_t
/* Get Drive Status */
/*-----------------------------------------------------------------------*/
DSTATUS disk_status (
- BYTE pdrv /* Physical drive nmuber to identify the drive */
+ BYTE pdrv /* Physical drive nmuber to identify the drive */
)
{
- DSTATUS stat;
- int result;
+ DSTATUS stat;
+ int result;
- switch (pdrv) {
- case DEV_RAM :
+ switch (pdrv) {
+ case DEV_RAM :
result = 1;
stat = (DSTATUS)result;
- return stat;
+ return stat;
- case DEV_MMC :
+ case DEV_MMC :
result = 0;
stat = (DSTATUS)result;
- return stat;
+ return stat;
- case DEV_USB :
+ case DEV_USB :
result = 1;
stat = (DSTATUS)result;
- return stat;
- }
- return STA_NOINIT;
+ return stat;
+ }
+ return STA_NOINIT;
}
@@ -139,29 +139,29 @@ DSTATUS disk_status (
/* Inidialize a Drive */
/*-----------------------------------------------------------------------*/
DSTATUS disk_initialize (
- BYTE pdrv /* Physical drive nmuber to identify the drive */
+ BYTE pdrv /* Physical drive nmuber to identify the drive */
)
{
- DSTATUS stat;
- int result;
+ DSTATUS stat;
+ int result;
- switch (pdrv) {
- case DEV_RAM :
+ switch (pdrv) {
+ case DEV_RAM :
result = 1;
stat = (DSTATUS)result;
- return stat;
+ return stat;
- case DEV_MMC :
+ case DEV_MMC :
result = sd_init();
stat = (DSTATUS)result;
- return stat;
+ return stat;
- case DEV_USB :
+ case DEV_USB :
result = 1;
stat = (DSTATUS)result;
- return stat;
- }
- return STA_NOINIT;
+ return stat;
+ }
+ return STA_NOINIT;
}
@@ -170,33 +170,33 @@ DSTATUS disk_initialize (
/* Read Sector(s) */
/*-----------------------------------------------------------------------*/
DRESULT disk_read (
- BYTE pdrv, /* Physical drive nmuber to identify the drive */
- BYTE *buff, /* Data buffer to store read data */
- LBA_t sector, /* Start sector in LBA */
- UINT count /* Number of sectors to read */
+ BYTE pdrv, /* Physical drive nmuber to identify the drive */
+ BYTE *buff, /* Data buffer to store read data */
+ LBA_t sector, /* Start sector in LBA */
+ UINT count /* Number of sectors to read */
)
{
- DRESULT res;
- int result;
+ DRESULT res;
+ int result;
- switch (pdrv) {
- case DEV_RAM :
+ switch (pdrv) {
+ case DEV_RAM :
result = 1;
res = (DRESULT)result;
- return res;
+ return res;
- case DEV_MMC :
+ case DEV_MMC :
result = sd_read_disk(buff, sector, count);
res = (DRESULT)result;
- return res;
+ return res;
- case DEV_USB :
+ case DEV_USB :
result = 1;
res = (DRESULT)result;
- return res;
- }
+ return res;
+ }
- return RES_PARERR;
+ return RES_PARERR;
}
@@ -207,33 +207,33 @@ DRESULT disk_read (
#if FF_FS_READONLY == 0
DRESULT disk_write (
- BYTE pdrv, /* Physical drive nmuber to identify the drive */
- const BYTE *buff, /* Data to be written */
- LBA_t sector, /* Start sector in LBA */
- UINT count /* Number of sectors to write */
+ BYTE pdrv, /* Physical drive nmuber to identify the drive */
+ const BYTE *buff, /* Data to be written */
+ LBA_t sector, /* Start sector in LBA */
+ UINT count /* Number of sectors to write */
)
{
- DRESULT res;
- int result;
+ DRESULT res;
+ int result;
- switch (pdrv) {
- case DEV_RAM :
+ switch (pdrv) {
+ case DEV_RAM :
result = 1;
res = (DRESULT)result;
- return res;
+ return res;
- case DEV_MMC :
+ case DEV_MMC :
result = sd_write_disk(buff, sector, count);
res = (DRESULT)result;
- return res;
+ return res;
- case DEV_USB :
+ case DEV_USB :
result = 1;
res = (DRESULT)result;
- return res;
- }
+ return res;
+ }
- return RES_PARERR;
+ return RES_PARERR;
}
#endif
@@ -243,21 +243,21 @@ DRESULT disk_write (
/* Miscellaneous Functions */
/*-----------------------------------------------------------------------*/
DRESULT disk_ioctl (
- BYTE pdrv, /* Physical drive nmuber (0..) */
- BYTE cmd, /* Control code */
- void *buff /* Buffer to send/receive control data */
+ BYTE pdrv, /* Physical drive nmuber (0..) */
+ BYTE cmd, /* Control code */
+ void *buff /* Buffer to send/receive control data */
)
{
- DRESULT res;
- int result;
+ DRESULT res;
+ int result;
- switch (pdrv) {
- case DEV_RAM :
+ switch (pdrv) {
+ case DEV_RAM :
result = 1;
res = (DRESULT)result;
- return res;
+ return res;
- case DEV_MMC :
+ case DEV_MMC :
switch(cmd){
case CTRL_SYNC:
result = RES_OK;
@@ -279,13 +279,13 @@ DRESULT disk_ioctl (
break;
}
res = (DRESULT)result;
- return res;
+ return res;
- case DEV_USB :
+ case DEV_USB :
result = 1;
res = (DRESULT)result;
- return res;
- }
+ return res;
+ }
- return RES_PARERR;
+ return RES_PARERR;
}
diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt b/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt
index 3b3429c..9c89d4c 100644
--- a/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt
+++ b/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt
@@ -13,4 +13,4 @@
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
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt b/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt
index a357ee1..780ce5e 100644
--- a/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt
+++ b/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt
@@ -13,4 +13,4 @@
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
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt b/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt
index a01185f..a09be62 100644
--- a/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt
+++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt
@@ -12,4 +12,4 @@
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
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt
index 1746c43..26a24ee 100644
--- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt
+++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt
@@ -13,4 +13,4 @@
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
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt b/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt
index d625a71..2969812 100644
--- a/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt
+++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt
@@ -12,4 +12,4 @@
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
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt
index 51a57b6..6a35227 100644
--- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt
+++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt
@@ -14,4 +14,4 @@
pb13(sck) <---> pb3(sck)
pb14(miso) <---> pb5(mosi)
- for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/spi/w25q_flash/readme.txt b/project/at_start_f413/examples/spi/w25q_flash/readme.txt
index c59cf61..af7438d 100644
--- a/project/at_start_f413/examples/spi/w25q_flash/readme.txt
+++ b/project/at_start_f413/examples/spi/w25q_flash/readme.txt
@@ -14,4 +14,4 @@
- mosi <---> pb15
- usart1_tx <---> pa9
- for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0102.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/6_steps/readme.txt b/project/at_start_f413/examples/tmr/6_steps/readme.txt
index 9ee9626..ffa89ec 100644
--- a/project/at_start_f413/examples/tmr/6_steps/readme.txt
+++ b/project/at_start_f413/examples/tmr/6_steps/readme.txt
@@ -7,7 +7,7 @@
this demo is based on the at-start board, in this demo, shows how to configure
the tmr1 peripheral to generate 6 steps. a software com event is generated
- each 100 ms: using the systick interrupt. the break polarity is used at high level.
+ each 100 ms: using the systick interrupt. the brake polarity is used at high level.
the following table describes the tmr1 channels states:
-----------------------------------------------
| step1 | step2 | step3 | step4 | step5 | step6 |
@@ -33,4 +33,4 @@
- tmr1_ch1 ---> pa8
- tmr1_ch2c ---> pb14
- for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/6_steps/src/main.c b/project/at_start_f413/examples/tmr/6_steps/src/main.c
index 6ef396f..7f4596d 100644
--- a/project/at_start_f413/examples/tmr/6_steps/src/main.c
+++ b/project/at_start_f413/examples/tmr/6_steps/src/main.c
@@ -146,7 +146,7 @@ int main(void)
tmr_output_channel_config(TMR1, TMR_SELECT_CHANNEL_3, &tmr_output_struct);
tmr_channel_value_set(TMR1, TMR_SELECT_CHANNEL_3, 511);
- /* automatic output enable, break, dead time and lock configuration */
+ /* automatic output enable, brake, dead time and lock configuration */
tmr_brkdt_default_para_init(&tmr_brkdt_config_struct);
tmr_brkdt_config_struct.brk_enable = TRUE;
tmr_brkdt_config_struct.auto_output_enable = TRUE;
diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt b/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt
index 3704c55..f74bc29 100644
--- a/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt
+++ b/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt
@@ -29,4 +29,4 @@
- tmr1_ch3c ---> pb15
- tmr1_ch4 ---> pa11
- for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/complementary_signals/readme.txt b/project/at_start_f413/examples/tmr/complementary_signals/readme.txt
index 2837dc1..3f6ac3e 100644
--- a/project/at_start_f413/examples/tmr/complementary_signals/readme.txt
+++ b/project/at_start_f413/examples/tmr/complementary_signals/readme.txt
@@ -7,7 +7,7 @@
this demo is based on the at-start board, in this demo, shows how to configure
the tmr1 peripheral to generate three complementary tmr1 signals, to insert
- a defined dead time value, to use the break feature and to lock the desired
+ a defined dead time value, to use the brake feature and to lock the desired
parameters.
tmr1 configuration to:
@@ -28,7 +28,7 @@
- channelxpulse = duty_cycle * (tim1_period - 1) / 100
step2: insert a dead time equal to 11/system_core_clock ns
- step3: configure the break feature, active at high level, and using the automatic
+ step3: configure the brake feature, active at high level, and using the automatic
output enable feature
step4: use the locking parameters level1.
@@ -43,7 +43,7 @@
- tmr1_ch3 pin (pa.10)
- tmr1_ch3c pin (pb.15)
-- 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.
+- connect the tmr1 brake pin tmr1_brkin pin (pb.12) to the gnd. to generate a
+ brake 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_f413/examples/tmr/complementary_signals/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/complementary_signals/src/main.c b/project/at_start_f413/examples/tmr/complementary_signals/src/main.c
index 4c7db12..0120abe 100644
--- a/project/at_start_f413/examples/tmr/complementary_signals/src/main.c
+++ b/project/at_start_f413/examples/tmr/complementary_signals/src/main.c
@@ -105,7 +105,7 @@ int main(void)
- channelxpulse = duty_cycle * (tmr1_period - 1) / 100
2/ insert a dead time equal to 11/system_core_clock ns
- 3/ configure the break feature, active at high level, and using the automatic
+ 3/ configure the brake feature, active at high level, and using the automatic
output enable feature
4/ use the locking parameters level1. */
diff --git a/project/at_start_f413/examples/tmr/dma/readme.txt b/project/at_start_f413/examples/tmr/dma/readme.txt
index bd1ac3e..a85ae7f 100644
--- a/project/at_start_f413/examples/tmr/dma/readme.txt
+++ b/project/at_start_f413/examples/tmr/dma/readme.txt
@@ -15,4 +15,4 @@
- tmr1 ch3 ---> pa10
- tmr1 ch3c ---> pb15
- for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt b/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt
index 24479f2..7b83ac7 100644
--- a/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt
+++ b/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt
@@ -11,4 +11,4 @@
- pa0 <---> pa2
- pa1 <---> pa3
- for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt b/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt
index 95c324a..d42a24b 100644
--- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt
+++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt
@@ -7,4 +7,4 @@
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
+ for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt b/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt
index 0c0b3e7..8e460f9 100644
--- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt
+++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt
@@ -12,4 +12,4 @@
tmr3 channel3 duty cycle = (tmr3_c3dt/ tmr3_pr)* 100 = 25%
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
+ for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt b/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt
index 83d8990..1bd89f0 100644
--- a/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt
+++ b/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt
@@ -14,4 +14,4 @@
ch3 duty_cycle = 12.5%
ch4 duty_cycle = 6.25%
- for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
+ for more detailed information. please refer to the application note document AN0085.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/half_duplex/readme.txt b/project/at_start_f413/examples/usart/half_duplex/readme.txt
index e5d73df..3b8c3f8 100644
--- a/project/at_start_f413/examples/usart/half_duplex/readme.txt
+++ b/project/at_start_f413/examples/usart/half_duplex/readme.txt
@@ -13,4 +13,4 @@
- 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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/idle_detection/readme.txt b/project/at_start_f413/examples/usart/idle_detection/readme.txt
index 804b0ea..1653daf 100644
--- a/project/at_start_f413/examples/usart/idle_detection/readme.txt
+++ b/project/at_start_f413/examples/usart/idle_detection/readme.txt
@@ -13,4 +13,4 @@
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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/interrupt/readme.txt b/project/at_start_f413/examples/usart/interrupt/readme.txt
index f9c6e36..08ace04 100644
--- a/project/at_start_f413/examples/usart/interrupt/readme.txt
+++ b/project/at_start_f413/examples/usart/interrupt/readme.txt
@@ -13,4 +13,4 @@
- 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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/irda/readme.txt b/project/at_start_f413/examples/usart/irda/readme.txt
index 7c3c234..ef3a1dc 100644
--- a/project/at_start_f413/examples/usart/irda/readme.txt
+++ b/project/at_start_f413/examples/usart/irda/readme.txt
@@ -12,4 +12,4 @@
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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c b/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/polling/readme.txt b/project/at_start_f413/examples/usart/polling/readme.txt
index 4d598bc..296b807 100644
--- a/project/at_start_f413/examples/usart/polling/readme.txt
+++ b/project/at_start_f413/examples/usart/polling/readme.txt
@@ -13,4 +13,4 @@
- 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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c b/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/printf/readme.txt b/project/at_start_f413/examples/usart/printf/readme.txt
index 32677b2..71edf22 100644
--- a/project/at_start_f413/examples/usart/printf/readme.txt
+++ b/project/at_start_f413/examples/usart/printf/readme.txt
@@ -9,4 +9,4 @@
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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c b/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/receiver_mute/readme.txt b/project/at_start_f413/examples/usart/receiver_mute/readme.txt
index 5fa992f..46f7939 100644
--- a/project/at_start_f413/examples/usart/receiver_mute/readme.txt
+++ b/project/at_start_f413/examples/usart/receiver_mute/readme.txt
@@ -15,4 +15,4 @@
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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/rs485/readme.txt b/project/at_start_f413/examples/usart/rs485/readme.txt
index 32f69d1..54bd437 100644
--- a/project/at_start_f413/examples/usart/rs485/readme.txt
+++ b/project/at_start_f413/examples/usart/rs485/readme.txt
@@ -12,4 +12,4 @@
- usart tx ---> pa2
- usart rx ---> pa3
- usart de ---> pa1
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/rs485/src/at32f413_clock.c b/project/at_start_f413/examples/usart/rs485/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/rs485/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/rs485/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/smartcard/readme.txt b/project/at_start_f413/examples/usart/smartcard/readme.txt
index 182417d..1b1ed4a 100644
--- a/project/at_start_f413/examples/usart/smartcard/readme.txt
+++ b/project/at_start_f413/examples/usart/smartcard/readme.txt
@@ -16,4 +16,4 @@
- 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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c b/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/smartcard/src/main.c b/project/at_start_f413/examples/usart/smartcard/src/main.c
index d65f183..5af20ea 100644
--- a/project/at_start_f413/examples/usart/smartcard/src/main.c
+++ b/project/at_start_f413/examples/usart/smartcard/src/main.c
@@ -170,7 +170,6 @@ void usart_configuration(void)
usart_smartcard_guard_time_set(SC_USART, 0x2);
/* configure sc usart clk */
- 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);
diff --git a/project/at_start_f413/examples/usart/synchronous/readme.txt b/project/at_start_f413/examples/usart/synchronous/readme.txt
index 90738d8..4504b23 100644
--- a/project/at_start_f413/examples/usart/synchronous/readme.txt
+++ b/project/at_start_f413/examples/usart/synchronous/readme.txt
@@ -35,4 +35,4 @@
- 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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c b/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt
index f0770d8..a585e31 100644
--- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt
+++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt
@@ -13,4 +13,4 @@
- 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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c
index 241ff69..bc65a70 100644
--- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c
+++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c
@@ -132,7 +132,7 @@ void dma_configuration(void)
dma_init_struct.loop_mode_enable = FALSE;
dma_init(DMA1_CHANNEL1, &dma_init_struct);
- /* enable transfer full data intterrupt */
+ /* enable transfer full data interrupt */
dma_interrupt_enable(DMA1_CHANNEL1, DMA_FDT_INT, TRUE);
/* dma1 channel1 interrupt nvic init */
@@ -156,7 +156,7 @@ void dma_configuration(void)
dma_init_struct.loop_mode_enable = FALSE;
dma_init(DMA1_CHANNEL2, &dma_init_struct);
- /* enable transfer full data intterrupt */
+ /* enable transfer full data interrupt */
dma_interrupt_enable(DMA1_CHANNEL2, DMA_FDT_INT, TRUE);
/* dma1 channel2 interrupt nvic init */
@@ -180,7 +180,7 @@ void dma_configuration(void)
dma_init_struct.loop_mode_enable = FALSE;
dma_init(DMA1_CHANNEL3, &dma_init_struct);
- /* enable transfer full data intterrupt */
+ /* enable transfer full data interrupt */
dma_interrupt_enable(DMA1_CHANNEL3, DMA_FDT_INT, TRUE);
/* dma1 channel3 interrupt nvic init */
@@ -204,7 +204,7 @@ void dma_configuration(void)
dma_init_struct.loop_mode_enable = FALSE;
dma_init(DMA1_CHANNEL4, &dma_init_struct);
- /* enable transfer full data intterrupt */
+ /* enable transfer full data interrupt */
dma_interrupt_enable(DMA1_CHANNEL4, DMA_FDT_INT, TRUE);
/* dma1 channel4 interrupt nvic init */
diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt b/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt
index 2c54a18..9c6af97 100644
--- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt
+++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt
@@ -13,4 +13,4 @@
- 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
+ for more detailed information. please refer to the application note document AN0099.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt b/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt
index eaf33b0..1017d9f 100644
--- a/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt
+++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt
@@ -12,4 +12,4 @@
2. frequency 16k and 48k
3. bit width 16bit,
4. speaker feedback
- for more detailed information, please refer to the application note document AN0097.
\ No newline at end of file
+ for more detailed information, please refer to the application note document AN0097.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_msc/inc/msc_diskio.h b/project/at_start_f413/examples/usb_device/composite_vcp_msc/inc/msc_diskio.h
index 14d4f97..d6da64e 100644
--- a/project/at_start_f413/examples/usb_device/composite_vcp_msc/inc/msc_diskio.h
+++ b/project/at_start_f413/examples/usb_device/composite_vcp_msc/inc/msc_diskio.h
@@ -51,8 +51,8 @@ extern "C" {
#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_read(uint8_t lun, uint64_t addr, uint8_t *read_buf, uint32_t len);
+usb_sts_type msc_disk_write(uint8_t lun, uint64_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);
/**
diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_msc/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/composite_vcp_msc/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/composite_vcp_msc/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/composite_vcp_msc/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_msc/src/msc_diskio.c b/project/at_start_f413/examples/usb_device/composite_vcp_msc/src/msc_diskio.c
index 9a6ba95..f46f0ef 100644
--- a/project/at_start_f413/examples/usb_device/composite_vcp_msc/src/msc_diskio.c
+++ b/project/at_start_f413/examples/usb_device/composite_vcp_msc/src/msc_diskio.c
@@ -70,10 +70,10 @@ uint8_t *get_inquiry(uint8_t lun)
* @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)
+usb_sts_type msc_disk_read(uint8_t lun, uint64_t addr, uint8_t *read_buf, uint32_t len)
{
uint32_t i = 0;
- uint32_t flash_addr = addr + USB_FLASH_ADDR_OFFSET;
+ uint32_t flash_addr = (uint32_t)addr + USB_FLASH_ADDR_OFFSET;
switch(lun)
{
case 0:
@@ -97,9 +97,9 @@ usb_sts_type msc_disk_read(uint8_t lun, uint32_t addr, uint8_t *read_buf, uint32
* @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)
+usb_sts_type msc_disk_write(uint8_t lun, uint64_t addr, uint8_t *buf, uint32_t len)
{
- uint32_t flash_addr = addr + USB_FLASH_ADDR_OFFSET;
+ uint32_t flash_addr = (uint32_t)addr + USB_FLASH_ADDR_OFFSET;
uint32_t i = 0, page_len = 2048, tolen = len;
uint32_t erase_addr = flash_addr;
switch(lun)
diff --git a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h b/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h
index 14d4f97..d6da64e 100644
--- a/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h
+++ b/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h
@@ -51,8 +51,8 @@ extern "C" {
#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_read(uint8_t lun, uint64_t addr, uint8_t *read_buf, uint32_t len);
+usb_sts_type msc_disk_write(uint8_t lun, uint64_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);
/**
diff --git a/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c b/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c
index ab544fb..adb73e7 100644
--- a/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c
+++ b/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c
@@ -70,10 +70,10 @@ uint8_t *get_inquiry(uint8_t lun)
* @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)
+usb_sts_type msc_disk_read(uint8_t lun, uint64_t addr, uint8_t *read_buf, uint32_t len)
{
uint32_t i = 0;
- uint32_t flash_addr = addr + USB_FLASH_ADDR_OFFSET;
+ uint32_t flash_addr = (uint32_t)addr + USB_FLASH_ADDR_OFFSET;
switch(lun)
{
case 0:
@@ -97,9 +97,9 @@ usb_sts_type msc_disk_read(uint8_t lun, uint32_t addr, uint8_t *read_buf, uint32
* @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)
+usb_sts_type msc_disk_write(uint8_t lun, uint64_t addr, uint8_t *buf, uint32_t len)
{
- uint32_t flash_addr = addr + USB_FLASH_ADDR_OFFSET;
+ uint32_t flash_addr = (uint32_t)addr + USB_FLASH_ADDR_OFFSET;
uint32_t i = 0, page_len = 2048, tolen = len;
uint32_t erase_addr = flash_addr;
switch(lun)
diff --git a/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/printer/src/main.c b/project/at_start_f413/examples/usb_device/printer/src/main.c
index 08e4999..9c64a69 100644
--- a/project/at_start_f413/examples/usb_device/printer/src/main.c
+++ b/project/at_start_f413/examples/usb_device/printer/src/main.c
@@ -37,6 +37,7 @@
* @{
*/
+uint8_t usb_buffer[256];
usbd_core_type usb_core_dev;
/**
@@ -114,6 +115,8 @@ void usb_clock48m_select(usb_clk48_s clk_s)
*/
int main(void)
{
+ uint32_t rx_len = 0;
+
/* config nvic priority group */
nvic_priority_group_config(NVIC_PRIORITY_GROUP_4);
@@ -138,6 +141,11 @@ int main(void)
while(1)
{
+ /* get usb printer receive data */
+ rx_len = usb_printer_get_rxdata(&usb_core_dev, usb_buffer);
+ UNUSED(rx_len);
+
+ /* user code ...*/
}
}
diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/virtual_comport/readme.txt b/project/at_start_f413/examples/usb_device/virtual_comport/readme.txt
index f959c85..bda2504 100644
--- a/project/at_start_f413/examples/usb_device/virtual_comport/readme.txt
+++ b/project/at_start_f413/examples/usb_device/virtual_comport/readme.txt
@@ -8,4 +8,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.
\ No newline at end of file
+ for more detailed information, please refer to the application note document AN0097.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/virtual_comport/src/main.c b/project/at_start_f413/examples/usb_device/virtual_comport/src/main.c
index 8c098b9..fe28f67 100644
--- a/project/at_start_f413/examples/usb_device/virtual_comport/src/main.c
+++ b/project/at_start_f413/examples/usb_device/virtual_comport/src/main.c
@@ -258,7 +258,7 @@ uint16_t usart_receive_data(void)
uint16_t usart_data_len;
if(hw_usart_read_index == hw_usart_rx_index)
{
- usart_data_len = 0;
+ usart_data_len = 0;
}
else
{
@@ -310,7 +310,7 @@ void usb_usart_config( linecoding_type linecoding)
case 0x0:
usart_stop_bit = USART_STOP_1_BIT;
break;
- /* to be used when transmitting and receiving data in smartcard mode */
+ /* to be used when transmitting and receiving data in smartcard mode */
case 0x1:
usart_stop_bit = USART_STOP_1_5_BIT;
break;
@@ -320,23 +320,7 @@ void usb_usart_config( linecoding_type linecoding)
default :
break;
}
- /* data bits */
- switch(linecoding.data)
- {
- /* hardware usart not support data bits for 5/6/7 */
- case 0x5:
- case 0x6:
- case 0x7:
- break;
- case 0x8:
- usart_data_bit = USART_DATA_8BITS;
- break;
- /* hardware usart not support data bits for 16 */
- case 0x10:
- break;
- default :
- break;
- }
+
/* parity */
switch(linecoding.parity)
{
@@ -356,6 +340,49 @@ void usb_usart_config( linecoding_type linecoding)
default :
break;
}
+
+ if(USART_PARITY_NONE == usart_parity_select)
+ {
+ /* data bits */
+ switch(linecoding.data)
+ {
+ /* hardware usart not support data bits for 5/6 */
+ case 0x5:
+ case 0x6:
+ case 0x7:
+ break;
+ case 0x8:
+ usart_data_bit = USART_DATA_8BITS;
+ break;
+ /* hardware usart not support data bits for 16 */
+ case 0x10:
+ break;
+ default :
+ break;
+ }
+ }
+ else
+ {
+ /* data bits */
+ switch(linecoding.data)
+ {
+ /* hardware usart not support data bits for 5/6 */
+ case 0x5:
+ case 0x6:
+ break;
+ case 0x7:
+ usart_data_bit = USART_DATA_8BITS;
+ break;
+ case 0x8:
+ usart_data_bit = USART_DATA_9BITS;
+ break;
+ /* hardware usart not support data bits for 16 */
+ case 0x10:
+ break;
+ default :
+ break;
+ }
+ }
nvic_irq_enable(USART2_IRQn, 0, 0);
diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h
index 2240eb5..90fa0f3 100644
--- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h
+++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h
@@ -47,8 +47,8 @@ extern "C" {
#define USB_FLASH_ADDR_OFFSET 0x08004000
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_read(uint8_t lun, uint64_t addr, uint8_t *read_buf, uint32_t len);
+usb_sts_type msc_disk_write(uint8_t lun, uint64_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);
/**
diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c
index edfee11..ff73fb7 100644
--- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c
+++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c
@@ -130,7 +130,7 @@ int main(void)
at32_board_init();
if(flash_fat16_get_upgrade_flag() == IAP_SUCCESS &&
- (at32_button_press() == NO_BUTTON))
+ (at32_button_press() == NO_BUTTON))
{
jump_to_app(flash_iap.flash_app_addr);
}
diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c
index b8e21d3..a4e258b 100644
--- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c
+++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c
@@ -70,13 +70,13 @@ uint8_t *get_inquiry(uint8_t lun)
* @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)
+usb_sts_type msc_disk_read(uint8_t lun, uint64_t addr, uint8_t *read_buf, uint32_t len)
{
switch(lun)
{
case 0:
- flash_fat16_read(addr, read_buf, len);
+ flash_fat16_read((uint32_t)addr, read_buf, len);
break;
case 1:
break;
@@ -92,12 +92,12 @@ usb_sts_type msc_disk_read(uint8_t lun, uint32_t addr, uint8_t *read_buf, uint32
* @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)
+usb_sts_type msc_disk_write(uint8_t lun, uint64_t addr, uint8_t *buf, uint32_t len)
{
switch(lun)
{
case 0:
- flash_fat16_write(addr, buf, len);
+ flash_fat16_write((uint32_t)addr, buf, len);
break;
case 1:
break;
diff --git a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/wdt/wdt_standby/src/at32f413_clock.c b/project/at_start_f413/examples/wdt/wdt_standby/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/wdt/wdt_standby/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/wdt/wdt_standby/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt b/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt
index c73c044..2e7fbcb 100644
--- a/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt
+++ b/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt
@@ -9,4 +9,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
+ for more detailed information. please refer to the application note document AN0045.
\ No newline at end of file
diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c
index 09cff6e..c24f23d 100644
--- a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c
+++ b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c
@@ -28,9 +28,9 @@
/**
* @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
+ * system clock (sclk) = hext / 2 * pll_mult
+ * system clock source = pll (hext)
+ * - hext = HEXT_VALUE
* - sclk = 192000000
* - ahbdiv = 1
* - ahbclk = 192000000
diff --git a/project/at_start_f413/templates/at32_ide/.cproject b/project/at_start_f413/templates/at32_ide/.cproject
index 25e4c1f..dace7ca 100644
--- a/project/at_start_f413/templates/at32_ide/.cproject
+++ b/project/at_start_f413/templates/at32_ide/.cproject
@@ -48,12 +48,12 @@