hvbon2010 0 Posted September 12, 2017 Share Posted September 12, 2017 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); analogFrequency(PWM_FREQ); } void loop() { analogWrite(PWM_1, 50); } Can help me with the problem, thank! Quote Link to post Share on other sites
hvbon2010 0 Posted September 15, 2017 Author Share Posted September 15, 2017 I recognized some problems: 1. How to use Tivaware for Energia to configure frequency PWM 2. How to fix pin_map.h problem Resolve: 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: /home/bonho/.energia15/packages/energia/hardware/tivac/1.0.2/system/driverlib 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 GPIO.h include.h pin_map_tm4c123gh6pm.h PWM.ino Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.