This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] RTOS/EK-TM4C1294XL:使用 TI-RTOS 驱动程序的 PWM 实例

Guru**** 2482225 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/721795/rtos-ek-tm4c1294xl-pwm-instances-using-ti-rtos-drivers

器件型号:EK-TM4C1294XL

工具/软件:TI-RTOS

CCS v8

tirtos_tivac_2_16_01_14

TivaWare_C_Series-2.1.4.178

xdctools_3_32_00_06

我不熟悉 RTOS、我一直在用我的头敲打砖墙一段时间、试图弄清楚它想要通过 RTOS 配置 PWM 的信息。 我找不到任何示例/说明。 我需要使用6个 PWM 输出 BTW。 我只是尝试先配置一个 PWM_OUT_1、因为我现在让 LED 保持闪烁、这与 PWM_OUT_0的用法相同。

我关闭了 PWM_params、如文档中的示例所示。 但我不知道如何配置 PWMTiva_HWAttrs 和 PWM_Config 指针。 如中所示、我不知道从哪里开始。

我从该主题中获得了很多有用的信息、但他使用的是 MSP、所有 MSP 行话都使得很难遵循所有内容。

http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/709372?tisearch=e2e-sitesearch&keymatch=pwm%20rtos

我认为我已经拥有了所有需要的头文件。

///--------------------------------
// BIOS 头文件
//---------------
#include //mand强制-对于 BIOS 类型
#include、必须首先包含 //mandedis-如果您调用诸如 BIOS_start()
#include 之类的 API //needed 用于任何 Log_info()调用
#include 用于静态定义的对象/句柄
#include 的//头文件 
///----------------------
// TivaWare 头文件
//---------------
#include 
#include 

#include "inc/hw_types.h"
#include "lib/hw_memmap.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "inc/hw_ints.h"
#include "driverlib/interrupts.h"

#include "driverlib/interrupts.h"#include "driver.h"#include "driverlib.h"#include "#包含"driverlib.h"#包含"driverlib.h"#包含"driverlib.h"



#include 
#include 

我想我终于从我提到的那个帖子中得到了 PWMTiva_HWAttrs 信息的挂起。 我现在将其放入 main.c 文件中、它是否必须位于不同的文件中?

const PWMTiva_HWAttrs Intensive_PWM_HW ={
{
baseAddr = PWM0_BASE、
pwmGenOpts = PWM_OUT_1、
pwmOutput = PWM_GEN_MODE_DOWN | PWM_GEN_MODE_DBG_RUN
}
};

const PWM_Config Intensity_pwm_cfg =
{

.fxnTablePtr =&Intensity_pwm_fxnTable、
.hwAttrs =&Intensity_pwm_HW、
.object =&Intensity_pwmObjects
}
; 

但我不知道它要求什么以及如何向它发送 PWM_Config 信息的参数。 它是自动生成的、还是需要创建 fxnTable、Objects、它是否指向我在 PWM_Config 之前创建的 HWAttrs 常量?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

     您是否有机会了解 TM4C129器件的 TI-RTOS PWM 示例? 我认为它将帮助您开始扩展到6 PWM。