Jump to content

[help] setup pwm frequency for Tiva C in Energia

Recommended Posts

Hello everyone,

I'm trying setup pwm frequency for tiva C in Energia but failed at this line: analogFrequency(PWM_FREQ)

// define PWM pins
#define PWM_1 PD_6

// define PWM frequency
#define PWM_FREQ 20000

void setup()
  pinMode(PWM_1, OUTPUT);

void loop()
   analogWrite(PWM_1, 50);


Can help me with the problem, thank! 

Link to post
Share on other sites

I recognized some problems:

1. How to use Tivaware for Energia to configure frequency PWM

2. How to fix pin_map.h problem


Problem 1: After install Energia  1.6.10E18 version, run Energia and select: board --> boards manager --> install Energia Tivac board

                  After installed Energia Tivac, Tivaware library is taken your system following link:


Where bonho is my PC name, this link is hidden, to see this link in your PC, select view ---> show hidden file on the taskbar

                  Create new file in Enrgia, include Energia file as file is included below

                  I has one example to you compare between CCS programing and Energia programing included below 

Problem 2: preference this topic: I fixed the problem success






Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...