首页下载资源硬件开发APM32E103系列单片机工程的创建(仿江科大工程)

ZIPAPM32E103系列单片机工程的创建(仿江科大工程)

m0_65148866219.31KB需要积分:1

资源文件列表:

2-1 APM32 工程模板.zip 大约有73个文件
  1. 2-1 APM32 工程模板/DebugConfig/
  2. 2-1 APM32 工程模板/keilkill.bat 399B
  3. 2-1 APM32 工程模板/library/
  4. 2-1 APM32 工程模板/library/apm32e10x_adc.c 33.18KB
  5. 2-1 APM32 工程模板/library/apm32e10x_adc.h 12.29KB
  6. 2-1 APM32 工程模板/library/apm32e10x_bakpr.c 6.07KB
  7. 2-1 APM32 工程模板/library/apm32e10x_bakpr.h 4.29KB
  8. 2-1 APM32 工程模板/library/apm32e10x_can.c 31.01KB
  9. 2-1 APM32 工程模板/library/apm32e10x_can.h 13.18KB
  10. 2-1 APM32 工程模板/library/apm32e10x_crc.c 2.72KB
  11. 2-1 APM32 工程模板/library/apm32e10x_crc.h 1.65KB
  12. 2-1 APM32 工程模板/library/apm32e10x_dac.c 12.16KB
  13. 2-1 APM32 工程模板/library/apm32e10x_dac.h 6.41KB
  14. 2-1 APM32 工程模板/library/apm32e10x_dbgmcu.c 7.35KB
  15. 2-1 APM32 工程模板/library/apm32e10x_dbgmcu.h 3.22KB
  16. 2-1 APM32 工程模板/library/apm32e10x_dma.c 25.48KB
  17. 2-1 APM32 工程模板/library/apm32e10x_dma.h 7.99KB
  18. 2-1 APM32 工程模板/library/apm32e10x_dmc.c 12.02KB
  19. 2-1 APM32 工程模板/library/apm32e10x_dmc.h 8.53KB
  20. 2-1 APM32 工程模板/library/apm32e10x_eint.c 4.88KB
  21. 2-1 APM32 工程模板/library/apm32e10x_eint.h 3.91KB
  22. 2-1 APM32 工程模板/library/apm32e10x_fmc.c 19.16KB
  23. 2-1 APM32 工程模板/library/apm32e10x_fmc.h 11.16KB
  24. 2-1 APM32 工程模板/library/apm32e10x_gpio.c 16.83KB
  25. 2-1 APM32 工程模板/library/apm32e10x_gpio.h 7.16KB
  26. 2-1 APM32 工程模板/library/apm32e10x_i2c.c 27.66KB
  27. 2-1 APM32 工程模板/library/apm32e10x_i2c.h 9.57KB
  28. 2-1 APM32 工程模板/library/apm32e10x_iwdt.c 3.57KB
  29. 2-1 APM32 工程模板/library/apm32e10x_iwdt.h 2.54KB
  30. 2-1 APM32 工程模板/library/apm32e10x_misc.c 6.3KB
  31. 2-1 APM32 工程模板/library/apm32e10x_misc.h 3.1KB
  32. 2-1 APM32 工程模板/library/apm32e10x_pmu.c 6.82KB
  33. 2-1 APM32 工程模板/library/apm32e10x_pmu.h 3.06KB
  34. 2-1 APM32 工程模板/library/apm32e10x_rcm.c 36.39KB
  35. 2-1 APM32 工程模板/library/apm32e10x_rcm.h 9.02KB
  36. 2-1 APM32 工程模板/library/apm32e10x_rtc.c 6.31KB
  37. 2-1 APM32 工程模板/library/apm32e10x_rtc.h 2.63KB
  38. 2-1 APM32 工程模板/library/apm32e10x_sci2c.c 25.77KB
  39. 2-1 APM32 工程模板/library/apm32e10x_sci2c.h 10.83KB
  40. 2-1 APM32 工程模板/library/apm32e10x_sdio.c 23.41KB
  41. 2-1 APM32 工程模板/library/apm32e10x_sdio.h 11.83KB
  42. 2-1 APM32 工程模板/library/apm32e10x_smc.c 35.48KB
  43. 2-1 APM32 工程模板/library/apm32e10x_smc.h 11.85KB
  44. 2-1 APM32 工程模板/library/apm32e10x_spi.c 16.73KB
  45. 2-1 APM32 工程模板/library/apm32e10x_spi.h 7.6KB
  46. 2-1 APM32 工程模板/library/apm32e10x_tmr.c 67.31KB
  47. 2-1 APM32 工程模板/library/apm32e10x_tmr.h 18.41KB
  48. 2-1 APM32 工程模板/library/apm32e10x_usart.c 23.01KB
  49. 2-1 APM32 工程模板/library/apm32e10x_usart.h 7.84KB
  50. 2-1 APM32 工程模板/library/apm32e10x_usb.c 7.78KB
  51. 2-1 APM32 工程模板/library/apm32e10x_usb.h 13.18KB
  52. 2-1 APM32 工程模板/library/apm32e10x_wwdt.c 3.65KB
  53. 2-1 APM32 工程模板/library/apm32e10x_wwdt.h 2.17KB
  54. 2-1 APM32 工程模板/Listings/
  55. 2-1 APM32 工程模板/Objects/
  56. 2-1 APM32 工程模板/project.uvprojx 24.39KB
  57. 2-1 APM32 工程模板/start/
  58. 2-1 APM32 工程模板/start/apm32e10x.h 179.3KB
  59. 2-1 APM32 工程模板/start/cmsis_armcc.h 27.43KB
  60. 2-1 APM32 工程模板/start/cmsis_armclang.h 44.82KB
  61. 2-1 APM32 工程模板/start/cmsis_armclang_ltm.h 53.93KB
  62. 2-1 APM32 工程模板/start/cmsis_compiler.h 9.26KB
  63. 2-1 APM32 工程模板/start/cmsis_gcc.h 61.89KB
  64. 2-1 APM32 工程模板/start/cmsis_iccarm.h 26.83KB
  65. 2-1 APM32 工程模板/start/cmsis_version.h 1.68KB
  66. 2-1 APM32 工程模板/start/core_cm3.h 106.76KB
  67. 2-1 APM32 工程模板/start/startup_apm32e10x_hd.s 14.99KB
  68. 2-1 APM32 工程模板/start/system_apm32e10x.c 15.64KB
  69. 2-1 APM32 工程模板/start/system_apm32e10x.h 1.4KB
  70. 2-1 APM32 工程模板/user/
  71. 2-1 APM32 工程模板/user/apm32e10x_int.c 2.56KB
  72. 2-1 APM32 工程模板/user/apm32e10x_int.h 1.56KB
  73. 2-1 APM32 工程模板/user/main.c 105B

资源介绍:

创建的apm32工程文件
/*! * @file apm32e10x_tmr.c * * @brief This file provides all the TMR firmware functions. * * @version V1.0.2 * * @date 2022-12-31 * * @attention * * Copyright (C) 2021-2023 Geehy Semiconductor * * You may not use this file except in compliance with the * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE). * * The program is only for reference, which is distributed in the hope * that it will be useful and instructional for customers to develop * their software. Unless required by applicable law or agreed to in * writing, the program is distributed on an "AS IS" BASIS, WITHOUT * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied. * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions * and limitations under the License. */ #include "apm32e10x_tmr.h" #include "apm32e10x_rcm.h" /** @addtogroup APM32E10x_StdPeriphDriver @{ */ /** @addtogroup TMR_Driver * @brief TMR driver modules @{ */ /** @defgroup TMR_Functions Functions @{ */ static void TI1Config(TMR_T* tmr, uint16_t ICpolarity, uint16_t ICselection, uint16_t ICfilter); static void TI2Config(TMR_T* tmr, uint16_t ICpolarity, uint16_t ICselection, uint16_t ICfilter); static void TI3Config(TMR_T* tmr, uint16_t ICpolarity, uint16_t ICselection, uint16_t ICfilter); static void TI4Config(TMR_T* tmr, uint16_t ICpolarity, uint16_t ICselection, uint16_t ICfilter); /*! * @brief Deinitializes the TMRx peripheral registers to their default reset values. * * @param tmr: Select TMRx peripheral, The x can be 1 to 8 * * @retval None * * @note */ void TMR_Reset(TMR_T* tmr) { if (tmr == TMR1) { RCM_EnableAPB2PeriphReset(RCM_APB2_PERIPH_TMR1); RCM_DisableAPB2PeriphReset(RCM_APB2_PERIPH_TMR1); } else if (tmr == TMR2) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR2); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR2); } else if (tmr == TMR3) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR3); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR3); } else if (tmr == TMR4) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR4); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR4); } else if (tmr == TMR5) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR5); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR5); } else if (tmr == TMR6) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR6); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR6); } else if (tmr == TMR7) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR7); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR7); } else if (tmr == TMR8) { RCM_EnableAPB2PeriphReset(RCM_APB2_PERIPH_TMR8); RCM_DisableAPB2PeriphReset(RCM_APB2_PERIPH_TMR8); } } /*! * @brief Initializes the base timer through the structure * * @param tmr: Select TMRx peripheral, The x can be 1 to 8 * * @param baseConfig: Pointer to a TMR_BaseConfig_T structure * * @retval None */ void TMR_ConfigTimeBase(TMR_T* tmr, TMR_BaseConfig_T* baseConfig) { uint16_t temp; if ((tmr == TMR1) || (tmr == TMR8) || (tmr == TMR2) || (tmr == TMR3) || (tmr == TMR4) || (tmr == TMR5)) { temp = tmr->CTRL1; temp &= 0x038F; temp |= baseConfig->countMode; tmr->CTRL1 = temp; } if ((tmr != TMR6) && (tmr != TMR7)) { tmr->CTRL1_B.CLKDIV = baseConfig->clockDivision; } tmr->AUTORLD = baseConfig->period; tmr->PSC = baseConfig->division; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->REPCNT = baseConfig->repetitionCounter; } tmr->CEG_B.UEG = 0x01; } /*! * @brief Configure channel 1 according to parameters * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param OC1Config: Pointer to a TMR_OCConfig_T structure * * @retval None */ void TMR_ConfigOC1(TMR_T* tmr, TMR_OCConfig_T* OC1Config) { tmr->CCEN_B.CC1EN = BIT_RESET; tmr->CCM1_COMPARE_B.CC1SEL = BIT_RESET; tmr->CCM1_COMPARE_B.OC1MOD = OC1Config->mode; tmr->CCEN_B.CC1POL = OC1Config->polarity; tmr->CCEN_B.CC1EN = OC1Config->outputState; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->CCEN_B.CC1NPOL = OC1Config->nPolarity; tmr->CCEN_B.CC1NEN = OC1Config->outputNState; tmr->CTRL2_B.OC1OIS = BIT_RESET; tmr->CTRL2_B.OC1NOIS = BIT_RESET; tmr->CTRL2_B.OC1OIS = OC1Config->idleState; tmr->CTRL2_B.OC1NOIS = OC1Config->nIdleState; } tmr->CC1 = OC1Config->pulse; } /*! * @brief Configure channel 2 according to parameters * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param OC2Config: Pointer to a TMR_OCConfig_T structure * * @retval None */ void TMR_ConfigOC2(TMR_T* tmr, TMR_OCConfig_T* OC2Config) { tmr->CCEN_B.CC2EN = BIT_RESET; tmr->CCM1_COMPARE_B.OC2MOD = BIT_RESET; tmr->CCM1_COMPARE_B.CC2SEL = BIT_RESET; tmr->CCM1_COMPARE_B.OC2MOD = OC2Config->mode; tmr->CCEN_B.CC2POL = BIT_RESET; tmr->CCEN_B.CC2POL = OC2Config->polarity; tmr->CCEN_B.CC2EN = OC2Config->outputState; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->CCEN_B.CC2NPOL = BIT_RESET; tmr->CCEN_B.CC2NPOL = OC2Config->nPolarity; tmr->CCEN_B.CC2NEN = BIT_RESET; tmr->CCEN_B.CC2NEN = OC2Config->outputNState; tmr->CTRL2_B.OC2OIS = BIT_RESET; tmr->CTRL2_B.OC2NOIS = BIT_RESET; tmr->CTRL2_B.OC2OIS = OC2Config->idleState; tmr->CTRL2_B.OC2NOIS = OC2Config->nIdleState; } tmr->CC2 = OC2Config->pulse; } /*! * @brief Configure channel 3 according to parameters * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param OC3Config: Pointer to a TMR_OCConfig_T structure * * @retval None */ void TMR_ConfigOC3(TMR_T* tmr, TMR_OCConfig_T* OC3Config) { tmr->CCEN_B.CC3EN = BIT_RESET; tmr->CCM2_COMPARE_B.OC3MOD = BIT_RESET; tmr->CCM2_COMPARE_B.CC3SEL = BIT_RESET; tmr->CCM2_COMPARE_B.OC3MOD = OC3Config->mode; tmr->CCEN_B.CC3POL = BIT_RESET; tmr->CCEN_B.CC3POL = OC3Config->polarity; tmr->CCEN_B.CC3EN = OC3Config->outputState; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->CCEN_B.CC3NPOL = BIT_RESET; tmr->CCEN_B.CC3NPOL = OC3Config->nPolarity; tmr->CCEN_B.CC3NEN = BIT_RESET; tmr->CCEN_B.CC3NEN = OC3Config->outputNState; tmr->CTRL2_B.OC3OIS = BIT_RESET; tmr->CTRL2_B.OC3NOIS = BIT_RESET; tmr->CTRL2_B.OC3OIS = OC3Config->idleState; tmr->CTRL2_B.OC3NOIS = OC3Config->nIdleState; } tmr->CC3 = OC3Config->pulse; } /*! * @brief Configure channel 4 according to parameters * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param OC4Config: Pointer to a TMR_OCConfig_T structure * * @retval None */ void TMR_ConfigOC4(TMR_T* tmr, TMR_OCConfig_T* OC4Config) { tmr->CCEN_B.CC4EN = BIT_RESET; tmr->CCM2_COMPARE_B.OC4MOD = BIT_RESET; tmr->CCM2_COMPARE_B.CC4SEL = BIT_RESET; tmr->CCM2_COMPARE_B.OC4MOD = OC4Config->mode; tmr->CCEN_B.CC4POL = BIT_RESET; tmr->CCEN_B.CC4POL = OC4Config->polarity; tmr->CCEN_B.CC4EN = OC4Config->outputState; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->CTRL2_B.OC4OIS = BIT_RESET; tmr->CTRL2_B.OC4OIS = OC4Config->idleState; } tmr->CC4 = OC4Config->pulse; } /*! * @brief Configure Peripheral equipment * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param ICConfig: Pointer to a TMR_ICConfig_T structure * * @retval None */ void TMR_ConfigIC(TMR
100+评论
captcha