mirror of
https://github.com/ArteryTek/AT32F403A_407_Firmware_Library.git
synced 2026-05-21 01:12:11 +00:00
update version to v2.2.2
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407.h
|
||||
* @brief at32f403a_407 header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
@@ -161,7 +162,7 @@ extern "C" {
|
||||
*/
|
||||
#define __AT32F403A_407_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */
|
||||
#define __AT32F403A_407_LIBRARY_VERSION_MIDDLE (0x02) /*!< [23:16] middle version */
|
||||
#define __AT32F403A_407_LIBRARY_VERSION_MINOR (0x01) /*!< [15:8] minor version */
|
||||
#define __AT32F403A_407_LIBRARY_VERSION_MINOR (0x02) /*!< [15:8] minor version */
|
||||
#define __AT32F403A_407_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
||||
#define __AT32F403A_407_LIBRARY_VERSION ((__AT32F403A_407_LIBRARY_VERSION_MAJOR << 24) | \
|
||||
(__AT32F403A_407_LIBRARY_VERSION_MIDDLE << 16) | \
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_conf.h
|
||||
* @brief at32f403a_407 config header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file system_at32f403a_407.c
|
||||
* @brief contains all the functions for cmsis cortex-m4 system source file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
@@ -136,14 +137,14 @@ void system_core_clock_update(void)
|
||||
pll_mult_h = CRM->cfg_bit.pllmult_h;
|
||||
/* process high bits */
|
||||
if((pll_mult_h != 0U) || (pll_mult == 15U)){
|
||||
pll_mult += ((16U * pll_mult_h) + 1U);
|
||||
pll_mult += ((16U * pll_mult_h) + 1U);
|
||||
}
|
||||
else
|
||||
{
|
||||
pll_mult += 2U;
|
||||
pll_mult += 2U;
|
||||
}
|
||||
|
||||
if (pll_clock_source == 0x00)
|
||||
if(pll_clock_source == 0x00)
|
||||
{
|
||||
/* hick divided by 2 selected as pll clock entry */
|
||||
system_core_clock = (HICK_VALUE >> 1) * pll_mult;
|
||||
@@ -151,7 +152,7 @@ void system_core_clock_update(void)
|
||||
else
|
||||
{
|
||||
/* hext selected as pll clock entry */
|
||||
if (CRM->cfg_bit.pllhextdiv != RESET)
|
||||
if(CRM->cfg_bit.pllhextdiv != RESET)
|
||||
{
|
||||
hext_prediv = CRM->misc3_bit.hextdiv;
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file system_at32f403a_407.h
|
||||
* @brief cmsis cortex-m4 system header file.
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -0,0 +1,298 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
|
||||
<meta name=Generator content="Microsoft Word 15 (filtered)">
|
||||
<style>
|
||||
<!--
|
||||
/* Font Definitions */
|
||||
@font-face
|
||||
{font-family:Wingdings;
|
||||
panose-1:5 0 0 0 0 0 0 0 0 0;}
|
||||
@font-face
|
||||
{font-family:宋体;
|
||||
panose-1:2 1 6 0 3 1 1 1 1 1;}
|
||||
@font-face
|
||||
{font-family:"Cambria Math";
|
||||
panose-1:2 4 5 3 5 4 6 3 2 4;}
|
||||
@font-face
|
||||
{font-family:Calibri;
|
||||
panose-1:2 15 5 2 2 2 4 3 2 4;}
|
||||
@font-face
|
||||
{font-family:"\@宋体";
|
||||
panose-1:2 1 6 0 3 1 1 1 1 1;}
|
||||
/* Style Definitions */
|
||||
p.MsoNormal, li.MsoNormal, div.MsoNormal
|
||||
{margin:0cm;
|
||||
margin-bottom:.0001pt;
|
||||
text-align:justify;
|
||||
text-justify:inter-ideograph;
|
||||
font-size:10.5pt;
|
||||
font-family:"Calibri",sans-serif;}
|
||||
p.MsoHeader, li.MsoHeader, div.MsoHeader
|
||||
{mso-style-link:"页眉 字符";
|
||||
margin:0cm;
|
||||
margin-bottom:.0001pt;
|
||||
text-align:center;
|
||||
layout-grid-mode:char;
|
||||
border:none;
|
||||
padding:0cm;
|
||||
font-size:9.0pt;
|
||||
font-family:"Calibri",sans-serif;}
|
||||
p.MsoFooter, li.MsoFooter, div.MsoFooter
|
||||
{mso-style-link:"页脚 字符";
|
||||
margin:0cm;
|
||||
margin-bottom:.0001pt;
|
||||
layout-grid-mode:char;
|
||||
font-size:9.0pt;
|
||||
font-family:"Calibri",sans-serif;}
|
||||
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
|
||||
{mso-style-link:"批注框文本 字符";
|
||||
margin:0cm;
|
||||
margin-bottom:.0001pt;
|
||||
text-align:justify;
|
||||
text-justify:inter-ideograph;
|
||||
font-size:9.0pt;
|
||||
font-family:"Calibri",sans-serif;}
|
||||
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
|
||||
{margin:0cm;
|
||||
margin-bottom:.0001pt;
|
||||
text-align:justify;
|
||||
text-justify:inter-ideograph;
|
||||
text-indent:21.0pt;
|
||||
font-size:10.5pt;
|
||||
font-family:"Calibri",sans-serif;}
|
||||
span.a
|
||||
{mso-style-name:"批注框文本 字符";
|
||||
mso-style-link:批注框文本;}
|
||||
span.a0
|
||||
{mso-style-name:"页眉 字符";
|
||||
mso-style-link:页眉;}
|
||||
span.a1
|
||||
{mso-style-name:"页脚 字符";
|
||||
mso-style-link:页脚;}
|
||||
p.Default, li.Default, div.Default
|
||||
{mso-style-name:Default;
|
||||
margin:0cm;
|
||||
margin-bottom:.0001pt;
|
||||
text-autospace:none;
|
||||
font-size:12.0pt;
|
||||
font-family:"Calibri",sans-serif;
|
||||
color:black;}
|
||||
/* Page Definitions */
|
||||
@page WordSection1
|
||||
{size:595.3pt 841.9pt;
|
||||
margin:72.0pt 90.0pt 72.0pt 90.0pt;
|
||||
layout-grid:15.6pt;}
|
||||
div.WordSection1
|
||||
{page:WordSection1;}
|
||||
/* List Definitions */
|
||||
ol
|
||||
{margin-bottom:0cm;}
|
||||
ul
|
||||
{margin-bottom:0cm;}
|
||||
-->
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body lang=ZH-CN style='text-justify-trim:punctuation'>
|
||||
|
||||
<div class=WordSection1 style='layout-grid:15.6pt'>
|
||||
|
||||
<p class=MsoNormal align=center style='text-align:center;word-break:break-all'><b><i><span
|
||||
lang=EN-US style='font-size:16.0pt;font-family:"Arial",sans-serif;color:#0070C0'>Release
|
||||
Notes for </span></i></b></p>
|
||||
|
||||
<p class=MsoNormal align=center style='text-align:center;word-break:break-all'><b><i><span
|
||||
lang=EN-US style='font-size:16.0pt;font-family:"Arial",sans-serif;color:#0070C0'>AT32F403A_407
|
||||
Firmware Library Drivers</span></i></b></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.8-2025/11/24</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
|
||||
word-break:break-all'><span lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span lang=EN-US>GPIO</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
|
||||
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
|
||||
style='font:7.0pt "Times New Roman"'> </span></span><span
|
||||
style='font-family:宋体'>更新</span><span lang=EN-US>gpio_bits_toggle()</span><span
|
||||
style='font-family:宋体'>函数,操作流程更严谨。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
|
||||
word-break:break-all'><span lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span lang=EN-US>USB</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
|
||||
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
|
||||
style='font:7.0pt "Times New Roman"'> </span></span><span
|
||||
style='font-family:宋体'>更新</span><span lang=EN-US>usb_ept_open()</span><span
|
||||
style='font-family:宋体'>函数,当设置同步</span><span lang=EN-US>IN</span><span
|
||||
style='font-family:宋体'>传输端点时,默认将端点状态由</span><span lang=EN-US>NAK</span><span
|
||||
style='font-family:宋体'>改为</span><span lang=EN-US>DISABLE</span><span
|
||||
style='font-family:宋体'>,解决同步端点在错误的</span><span lang=EN-US>NAK</span><span
|
||||
style='font-family:宋体'>状态下引起错误。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
|
||||
word-break:break-all'><span lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span lang=EN-US>TMR</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:42.0pt;text-indent:-21.0pt;
|
||||
word-break:break-all'><span lang=EN-US style='font-family:Wingdings'>l<span
|
||||
style='font:7.0pt "Times New Roman"'> </span></span><span
|
||||
style='font-family:宋体'>更新</span><span lang=EN-US>tmr_pwm_input_config()</span><span
|
||||
style='font-family:宋体'>、</span><span lang=EN-US>tmr_encoder_mode_config()</span><span
|
||||
style='font-family:宋体'>和</span><span lang=EN-US>tmr_output_channel_config()</span><span
|
||||
style='font-family:宋体'>函数。通道模式配置前关闭通道使能,否则通道模式无法切换。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt;
|
||||
word-break:break-all'><span lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'> </span></b></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.7-2025/04/25</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>RTC</span><span
|
||||
style='font-family:宋体'>计数值读取流程。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>Flash</span><span
|
||||
style='font-family:宋体'>驱动,优化部分流程。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>新增</span><span lang=EN-US>gpio_bits_toggle</span><span
|
||||
style='font-family:宋体'>函数。</span></p>
|
||||
|
||||
<p class=MsoNormal><span lang=EN-US> </span></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.6-2024/12/13</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>CAN</span><span
|
||||
style='font-family:宋体'>驱动。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>Flash</span><span
|
||||
style='font-family:宋体'>驱动。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
|
||||
|
||||
<p class=MsoNormal><span lang=EN-US> </span></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.5-2024/08/08</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>i2c_flag_clear</span><span
|
||||
style='font-family:宋体'>和</span><span lang=EN-US>i2c_init</span><span
|
||||
style='font-family:宋体'>函数。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
|
||||
|
||||
<p class=MsoNormal><span lang=EN-US> </span></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.4-2024/01/05</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>完善部分驱动流程在</span><span lang=EN-US>IAR7.4</span><span
|
||||
style='font-family:宋体'>下的编译警告。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>完善</span><span lang=EN-US>EMAC</span><span
|
||||
style='font-family:宋体'>的</span><span lang=EN-US>PTP</span><span
|
||||
style='font-family:宋体'>驱动。</span></p>
|
||||
|
||||
<p class=MsoNormal><span lang=EN-US> </span></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.3-2023/10/26</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>各</span><span lang=EN-US>IP</span><span
|
||||
style='font-family:宋体'>驱动新增</span><span lang=EN-US>interrupt_flag_get</span><span
|
||||
style='font-family:宋体'>函数。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>优化系统时钟切换流程。</span></p>
|
||||
|
||||
<p class=MsoNormal><span lang=EN-US> </span></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.2-2023/08/04</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span lang=EN-US>CRC</span><span style='font-family:宋体'>驱动新增多项式及多项式宽度可修改的支持。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span lang=EN-US>FLASH</span><span style='font-family:宋体'>中新增</span><span
|
||||
lang=EN-US>flash_spim_dummy_read</span><span style='font-family:宋体'>和</span><span
|
||||
lang=EN-US>flash_spim_mass_program</span><span style='font-family:宋体'>函数。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新了</span><span lang=EN-US>adc_ordinary_channel_set</span><span
|
||||
style='font-family:宋体'>和</span><span lang=EN-US>adc_preempt_channel_set</span><span
|
||||
style='font-family:宋体'>函数流程。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新部分注释。</span></p>
|
||||
|
||||
<p class=MsoNormal><span lang=EN-US> </span></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.1-2023/02/16</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新</span><span lang=EN-US>EMAC</span><span
|
||||
style='font-family:宋体'>最大包长宏定义</span><span lang=EN-US>EMAC_MAX_PACKET_LENGTH</span><span
|
||||
style='font-family:宋体'>值为</span><span lang=EN-US>1524</span><span
|
||||
style='font-family:宋体'>。</span></p>
|
||||
|
||||
<p class=MsoNormal><span lang=EN-US> </span></p>
|
||||
|
||||
<p class=MsoNormal style='word-break:break-all'><b><span lang=EN-US
|
||||
style='font-family:"Arial",sans-serif;color:#7030A0'>V2.0.0-2022/11/18</span></b></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新了</span><span lang=EN-US>xmc_ext_timing_config</span><span
|
||||
style='font-family:宋体'>函数。</span></p>
|
||||
|
||||
<p class=MsoListParagraph style='margin-left:21.0pt;text-indent:-21.0pt'><span
|
||||
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
|
||||
</span></span><span style='font-family:宋体'>更新当</span><span lang=EN-US>HICK</span><span
|
||||
style='font-family:宋体'>作为</span><span lang=EN-US>PLL</span><span
|
||||
style='font-family:宋体'>时钟源时</span><span lang=EN-US>CRM_HICK48_NODIV</span><span
|
||||
style='font-family:宋体'>作为默认设置。</span></p>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_acc.h
|
||||
* @brief at32f403a_407 acc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_adc.h
|
||||
* @brief at32f403a_407 adc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_bpr.h
|
||||
* @brief at32f403a_407 bpr header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_can.h
|
||||
* @brief at32f403a_407 can header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_crc.h
|
||||
* @brief at32f403a_407 crc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_crm.h
|
||||
* @brief at32f403a_407 crm header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_dac.h
|
||||
* @brief at32f403a_407 dac header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_debug.h
|
||||
* @brief at32f403a_407 debug header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_def.h
|
||||
* @brief at32f403a_407 macros header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_dma.h
|
||||
* @brief at32f403a_407 dma header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_emac.h
|
||||
* @brief at32f403a_407 emac header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_exint.h
|
||||
* @brief at32f403a_407 exint header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_flash.h
|
||||
* @brief at32f403a_407 flash header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_gpio.h
|
||||
* @brief at32f403a_407 gpio header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_i2c.h
|
||||
* @brief at32f403a_407 i2c header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_misc.h
|
||||
* @brief at32f403a_407 misc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_pwc.h
|
||||
* @brief at32f403a_407 pwc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_rtc.h
|
||||
* @brief at32f403a_407 rtc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_sdio.h
|
||||
* @brief at32f403a_407 sdio header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_spi.h
|
||||
* @brief at32f403a_407 spi header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_tmr.h
|
||||
* @brief at32f403a_407 tmr header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_usart.h
|
||||
* @brief at32f403a_407 usart header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_usb.h
|
||||
* @brief at32f403a_407 usb header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_wdt.h
|
||||
* @brief at32f403a_407 wdt header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_wwdt.h
|
||||
* @brief at32f403a_407 wwdt header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_xmc.h
|
||||
* @brief at32f403a_407 xmc header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_acc.c
|
||||
* @brief contains all the functions for the acc firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_adc.c
|
||||
* @brief contains all the functions for the adc firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_bpr.c
|
||||
* @brief contains all the functions for the bpr firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_can.c
|
||||
* @brief contains all the functions for the can firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_crc.c
|
||||
* @brief contains all the functions for the crc firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_crm.c
|
||||
* @brief contains all the functions for the crm firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_dac.c
|
||||
* @brief contains all the functions for the dac firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_debug.c
|
||||
* @brief contains all the functions for the debug firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_dma.c
|
||||
* @brief contains all the functions for the dma firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_emac.c
|
||||
* @brief contains all the functions for the emac firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_exint.c
|
||||
* @brief contains all the functions for the exint firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_flash.c
|
||||
* @brief contains all the functions for the flash firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_gpio.c
|
||||
* @brief contains all the functions for the gpio firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
@@ -369,7 +370,9 @@ void gpio_bits_reset(gpio_type *gpio_x, uint16_t pins)
|
||||
*/
|
||||
void gpio_bits_toggle(gpio_type *gpio_x, uint16_t pins)
|
||||
{
|
||||
gpio_x->odt ^= pins;
|
||||
uint32_t odt = gpio_x->odt;
|
||||
|
||||
gpio_x->scr = ((odt & pins) << 16) | (~odt & pins);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_i2c.c
|
||||
* @brief contains all the functions for the i2c firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_misc.c
|
||||
* @brief contains all the functions for the misc firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_pwc.c
|
||||
* @brief contains all the functions for the pwc firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_rtc.c
|
||||
* @brief contains all the functions for the rtc firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_sdio.c
|
||||
* @brief contains all the functions for the sdio firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_spi.c
|
||||
* @brief contains all the functions for the spi firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_tmr.c
|
||||
* @brief contains all the functions for the tmr firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
@@ -359,21 +360,31 @@ void tmr_output_channel_config(tmr_type *tmr_x, tmr_channel_select_type tmr_chan
|
||||
/* set channel output mode */
|
||||
channel = tmr_channel;
|
||||
|
||||
/* reset output channel(complementary) enable bit */
|
||||
chx_offset = (tmr_channel * 2);
|
||||
chcx_offset = ((tmr_channel * 2) + 2);
|
||||
tmr_x->cctrl &= ~(1<<chcx_offset);
|
||||
tmr_x->cctrl &= ~(1<<chx_offset);
|
||||
|
||||
switch(channel)
|
||||
{
|
||||
case TMR_SELECT_CHANNEL_1:
|
||||
tmr_x->cm1_output_bit.c1c = FALSE;
|
||||
tmr_x->cm1_output_bit.c1octrl = tmr_output_struct->oc_mode;
|
||||
break;
|
||||
|
||||
case TMR_SELECT_CHANNEL_2:
|
||||
tmr_x->cm1_output_bit.c2c = FALSE;
|
||||
tmr_x->cm1_output_bit.c2octrl = tmr_output_struct->oc_mode;
|
||||
break;
|
||||
|
||||
case TMR_SELECT_CHANNEL_3:
|
||||
tmr_x->cm2_output_bit.c3c = FALSE;
|
||||
tmr_x->cm2_output_bit.c3octrl = tmr_output_struct->oc_mode;
|
||||
break;
|
||||
|
||||
case TMR_SELECT_CHANNEL_4:
|
||||
tmr_x->cm2_output_bit.c4c = FALSE;
|
||||
tmr_x->cm2_output_bit.c4octrl = tmr_output_struct->oc_mode;
|
||||
break;
|
||||
|
||||
@@ -398,9 +409,6 @@ void tmr_output_channel_config(tmr_type *tmr_x, tmr_channel_select_type tmr_chan
|
||||
tmr_x->cctrl &= ~(1<<chx_offset);
|
||||
tmr_x->cctrl |= channel_index;
|
||||
|
||||
chx_offset = (tmr_channel * 2);
|
||||
chcx_offset = ((tmr_channel * 2) + 2);
|
||||
|
||||
/* get channel enable bit position in cctrl register */
|
||||
channel_index = (uint16_t)(tmr_output_struct->oc_output_state << (tmr_channel * 2));
|
||||
|
||||
@@ -408,11 +416,9 @@ void tmr_output_channel_config(tmr_type *tmr_x, tmr_channel_select_type tmr_chan
|
||||
channel_c_index = (uint16_t)(tmr_output_struct->occ_output_state << ((tmr_channel * 2) + 2));
|
||||
|
||||
/* set output channel complementary enable bit */
|
||||
tmr_x->cctrl &= ~(1<<chcx_offset);
|
||||
tmr_x->cctrl |= channel_c_index;
|
||||
|
||||
/* set output channel enable bit */
|
||||
tmr_x->cctrl &= ~(1<<chx_offset);
|
||||
tmr_x->cctrl |= channel_index;
|
||||
}
|
||||
|
||||
@@ -834,7 +840,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;
|
||||
@@ -844,7 +850,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;
|
||||
@@ -854,7 +860,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;
|
||||
@@ -864,7 +870,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;
|
||||
@@ -1008,6 +1014,8 @@ void tmr_pwm_input_config(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.c2en = FALSE;
|
||||
if(input_struct->input_polarity_select == TMR_INPUT_RISING_EDGE)
|
||||
{
|
||||
/* set channel polarity */
|
||||
@@ -1051,6 +1059,8 @@ void tmr_pwm_input_config(tmr_type *tmr_x, tmr_input_config_type *input_struct,
|
||||
break;
|
||||
|
||||
case TMR_SELECT_CHANNEL_2:
|
||||
tmr_x->cctrl_bit.c1en = FALSE;
|
||||
tmr_x->cctrl_bit.c2en = FALSE;
|
||||
if(input_struct->input_polarity_select == TMR_INPUT_RISING_EDGE)
|
||||
{
|
||||
/* set channel polarity */
|
||||
@@ -1656,6 +1666,9 @@ void tmr_encoder_mode_config(tmr_type *tmr_x, tmr_encoder_mode_type encoder_mode
|
||||
{
|
||||
tmr_x->stctrl_bit.smsel = encoder_mode;
|
||||
|
||||
tmr_x->cctrl_bit.c1en = FALSE;
|
||||
tmr_x->cctrl_bit.c2en = FALSE;
|
||||
|
||||
/* set ic1 polarity */
|
||||
tmr_x->cctrl_bit.c1p = (ic1_polarity & 0x1);
|
||||
tmr_x->cctrl_bit.c1cp = (ic1_polarity >> 1);
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_usart.c
|
||||
* @brief contains all the functions for the usart firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
@@ -599,7 +600,7 @@ flag_status usart_flag_get(usart_type* usart_x, uint32_t flag)
|
||||
* USART1, USART2, USART3, UART4, UART5, USART6, UART7 or UART8.
|
||||
* @param flag: specifies the flag to check.
|
||||
* this parameter can be one of the following values:
|
||||
* - USART_CTSCF_FLAG: cts change flag (not available for UART4,UART5)
|
||||
* - USART_CTSCF_FLAG: cts change flag (not available for UART4,UART5,USART6,UART7 and UART8)
|
||||
* - USART_BFF_FLAG: break frame flag
|
||||
* - USART_TDBE_FLAG: transmit data buffer empty flag
|
||||
* - USART_TDC_FLAG: transmit data complete flag
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_usb.c
|
||||
* @brief contains the functions for the usb firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
@@ -202,9 +203,17 @@ void usb_ept_open(usbd_type *usbx, usb_ept_info *ept_info)
|
||||
|
||||
/* set endpoint reception status: disable */
|
||||
USB_SET_RXSTS(ept_info->eptn, USB_RX_DISABLE);
|
||||
|
||||
/* set endpoint transmision status: nak */
|
||||
USB_SET_TXSTS(ept_info->eptn, USB_TX_NAK);
|
||||
|
||||
if(ept_info->trans_type == EPT_ISO_TYPE)
|
||||
{
|
||||
/* set endpoint transmision status: disable */
|
||||
USB_SET_TXSTS(ept_info->eptn, USB_TX_DISABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* set endpoint transmision status: nak */
|
||||
USB_SET_TXSTS(ept_info->eptn, USB_TX_NAK);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_wdt.c
|
||||
* @brief contains all the functions for the wdt firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_wwdt.c
|
||||
* @brief contains all the functions for the wwdt firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @file at32f403a_407_xmc.c
|
||||
* @brief contains all the functions for the xmc firmware library
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* Copyright (c) 2025, Artery Technology, All rights reserved.
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
|
||||
Reference in New Issue
Block a user