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: PWM instances using TI-RTOS drivers

Part Number: EK-TM4C1294XL

Tool/software: TI-RTOS

-CCS v8

-tirtos_tivac_2_16_01_14

-TivaWare_C_Series-2.1.4.178

-xdctools_3_32_00_06

I am new to RTOS, I have been banging my head against the brick wall for a while trying to figure out what information it wants to configure the PWM's through RTOS. I can't find any examples/instruction on it. I need to use 6 PWM outputs BTW. I am just trying to configure one first, PWM_OUT_1 because I am leaving the LED flashing for now, and that uses the same as PWM_OUT_0.

I got the PWM_params down, that is in the example in the documentation. But I don't know how to configure the PWMTiva_HWAttrs and PWM_Config pointers. As in I don't know where to start.

I got a lot of good info from this thread but he is using MSP and all the MSP jargon makes it very hard to follow everything.

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

I have all the needed header files I think.

//----------------------------------------
// BIOS header files
//----------------------------------------
#include <xdc/std.h>                        //mandatory - have to include first, for BIOS types
#include <ti/sysbios/BIOS.h>                //mandatory - if you call APIs like BIOS_start()
#include <xdc/runtime/Log.h>                //needed for any Log_info() call
#include <xdc/cfg/global.h>                 //header file for statically defined objects/handles
#include <EK_TM4C1294XL.h>
//------------------------------------------
// TivaWare Header Files
//------------------------------------------
#include <stdint.h>
#include <stdbool.h>

#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "inc/hw_ints.h"
#include "driverlib/interrupt.h"
#include "driverlib/timer.h"
#include "driverlib/pwm.h"

#include "Board.h"
#include <ti/drivers/GPIO.h>
#include <ti/drivers/PWM.h>
#include <ti/drivers/pwm/PWMTiva.h>

I think I finally got the hang of the PWMTiva_HWAttrs info from that post I mentioned. I just put it in my main.c file for now, does it have to be in a different file?

const PWMTiva_HWAttrs intensity_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
 }
};

But I don't know what it is asking for and how to send it the parameters for the PWM_Config information. Is it something that is automatically generated or do I need to create the fxnTable, Objects, and does it point to the HWAttrs constant that I created before the PWM_Config?