例6-1 UCOSIII任务创建和删除.zip

  • lu008
    了解作者
  • C/C++
    开发工具
  • 1.9MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2021-03-16 19:38
    上传日期
UCOSiii操作系统的任务移植和删除!
例6-1 UCOSIII任务创建和删除.zip
内容介绍
/** ****************************************************************************** * @file stm32h7xx_hal_hrtim.c * @author MCD Application Team * @version V1.2.0 * @date 29-December-2017 * @brief HRTIM HAL module driver. * This file provides firmware functions to manage the following * functionalities of the High Resolution Timer (HRTIM) peripheral: * + HRTIM Initialization * + Timer Time Base Unit Configuration * + Simple Time Base Start/Stop * + Simple Time Base Start/Stop Interrupt * + Simple Time Base Start/Stop DMA Request * + Simple Output Compare/PWM Channel Configuration * + Simple Output Compare/PWM Channel Start/Stop Interrupt * + Simple Output Compare/PWM Channel Start/Stop DMA Request * + Simple Input Capture Channel Configuration * + Simple Input Capture Channel Start/Stop Interrupt * + Simple Input Capture Channel Start/Stop DMA Request * + Simple One Pulse Channel Configuration * + Simple One Pulse Channel Start/Stop Interrupt * + HRTIM External Synchronization Configuration * + HRTIM Burst Mode Controller Configuration * + HRTIM Burst Mode Controller Enabling * + HRTIM External Events Conditioning Configuration * + HRTIM Faults Conditioning Configuration * + HRTIM Faults Enabling * + HRTIM ADC trigger Configuration * + Waveform Timer Configuration * + Waveform Event Filtering Configuration * + Waveform Dead Time Insertion Configuration * + Waveform Chopper Mode Configuration * + Waveform Compare Unit Configuration * + Waveform Capture Unit Configuration * + Waveform Output Configuration * + Waveform Counter Start/Stop * + Waveform Counter Start/Stop Interrupt * + Waveform Counter Start/Stop DMA Request * + Waveform Output Enabling * + Waveform Output Level Set/Get * + Waveform Output State Get * + Waveform Burst DMA Operation Configuration * + Waveform Burst DMA Operation Start * + Waveform Timer Counter Software Reset * + Waveform Capture Software Trigger * + Waveform Burst Mode Controller Software Trigger * + Waveform Timer Pre-loadable Registers Update Enabling * + Waveform Timer Pre-loadable Registers Software Update * + Waveform Timer Delayed Protection Status Get * + Waveform Timer Burst Status Get * + Waveform Timer Push-Pull Status Get * + Peripheral State Get @verbatim ============================================================================== ##### Simple mode v.s. waveform mode ##### ============================================================================== [..] The HRTIM HAL API is split into 2 categories: (#)Simple functions: these functions allow for using a HRTIM timer as a general purpose timer with high resolution capabilities. Following simple modes are proposed: (+)Output compare mode (+)PWM output mode (+)Input capture mode (+)One pulse mode HRTIM simple modes are managed through the set of functions named HAL_HRTIM_Simple<Function>. These functions are similar in name and usage to the one defined for the TIM peripheral. When a HRTIM timer operates in simple mode, only a very limited set of HRTIM features are used. (#)Waveform functions: These functions allow taking advantage of the HRTIM flexibility to produce numerous types of control signal. When a HRTIM timer operates in waveform mode, all the HRTIM features are accessible without any restriction. HRTIM waveform modes are managed through the set of functions named HAL_HRTIM_Waveform<Function> ============================================================================== ##### How to use this driver ##### ============================================================================== [..] (#)Initialize the HRTIM low level resources by implementing the HAL_HRTIM_MspInit() function: (##)Enable the HRTIM clock source using __HRTIMx_CLK_ENABLE() (##)Connect HRTIM pins to MCU I/Os (+++) Enable the clock for the HRTIM GPIOs using the following function: __GPIOx_CLK_ENABLE() (+++) Configure these GPIO pins in Alternate Function mode using HAL_GPIO_Init() (##)When using DMA to control data transfer (e.g HAL_HRTIM_SimpleBaseStart_DMA()) (+++)Enable the DMAx interface clock using __DMAx_CLK_ENABLE() (+++)Initialize the DMA handle (+++)Associate the initialized DMA handle to the appropriate DMA handle of the HRTIM handle using __HAL_LINKDMA() (+++)Initialize the DMA channel using HAL_DMA_Init() (+++)Configure the priority and enable the NVIC for the transfer complete interrupt on the DMA channel using HAL_NVIC_SetPriority() and HAL_NVIC_EnableIRQ() (##)In case of using interrupt mode (e.g HAL_HRTIM_SimpleBaseStart_IT()) (+++)Configure the priority and enable the NVIC for the concerned HRTIM interrupt using HAL_NVIC_SetPriority() and HAL_NVIC_EnableIRQ() (#)Initialize the HRTIM HAL using HAL_HRTIM_Init(). The HRTIM configuration structure (field of the HRTIM handle) specifies which global interrupt of whole HRTIM must be enabled (Burst mode period, System fault, Faults). It also contains the HRTIM external synchronization configuration. HRTIM can act as a master (generating a synchronization signal) or as a slave (waiting for a trigger to be synchronized). (#) Configure HRTIM resources shared by all HRTIM timers (##)Burst Mode Controller: (+++)HAL_HRTIM_BurstModeConfig(): configures the HRTIM burst mode controller: operating mode (continuous or -shot mode), clock (source, prescaler) , trigger(s), period, idle duration. (##)External Events Conditionning: (+++)HAL_HRTIM_EventConfig(): configures the conditioning of an external event channel: source, polarity, edge-sensitivity. External event can be used as triggers (timer reset, input capture, burst mode, ADC triggers, delayed protection, �) They can also be used to set or reset timer outputs. Up to 10 event channels are available. (+++)HAL_HRTIM_EventPrescalerConfig(): configures the external event sampling clock (used for digital filtering). (##)Fault Conditionning: (+++)HAL_HRTIM_FaultConfig(): configures the conditioning of a fault channel: source, polarity, edge-sensitivity. Fault channels are used to disable the outputs in case of an abnormal operation. Up to 5 fault channels are available. (+++)HAL_HRTIM_FaultPrescalerConfig(): configures the fault sampling clock (used for digital filtering). (+++)HAL_HRTIM_FaultModeCtl(): Enables or disables fault input(s) circuitry. By default all fault inputs are disabled. (##)ADC trigger: (+++)HAL_HRTIM_ADCTriggerConfig(): configures the source triggering the update of the ADC trigger re
评论
    相关推荐
    • ucosIII.rar
      移植ucosIII到stm32f303,提供两个测试任务,led灯,和浮点运算,测试均通过
    • UCOSIII资料
      uC/OS-III(Micro C OS Three 微型的C 语言编写的操作系统第3版)是一个可升级的,可固化的,基于优先级的实时内核。它对任务的个数无限制。uC/OS-III 是一个第3 代的系统内核,支持现代的实时内核所期待的大部分功能...
    • UCOS III F103版
      基于stm32f103系列的UCOS III移植,自己一直在用。有修改会立即更新
    • uCOSIII移植教程
      本例程基于stm32f1系列单片机,介绍uCOSIII的移植教程,基于HAL库。
    • uCOSIII-F1
      基于正点原子uCOSIII开发手册进行移植的uCOS-III移植源码,亲测可用。内含正点原子STM32F1 UCOSIII开发手册V2
    • EWARM uCOS III
      EWARM uCOS III
    • uCos III 光盘资料
      uCos III 一书提供的光盘资料,配套STM32F107开发板。
    • ucosIII文件系统
      该工程文件是keil-MDK作为编译环境的以UCOSIII作为嵌入式操作系统的移植代码。代码中已经将嵌入式操作系统和文件系统融合在一起了,可以直接使用。控制芯片是stm32,已经将库函数包含进去。
    • uCOS III 工程模板.zip
      uCOS III 工程模板,适用于STM32F1系列芯片移植,可以直接使用,已对公司源码进行整理确保使用方便。
    • Proteus7.12.rar
      Proteus7.12完美破解版.rar电路仿真软件很好用可以仿真单片数字模拟电路