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.

Problem with timer-based PWM on a 16-bit CCP.

Other Parts Discussed in Thread: TM4C123GH6PM

Hi,

    I want to genarate PWM using timer0, so I had added the API for timer based PWM from tivaware ver 1.1. But I had got the error during compiling, need solution.

Build target 'Target 1'
compiling pwm.c...
C:\ti\TivaWare_C_Series-1.1\examples\peripherals\timer\pwm.c(42): error:  #5: cannot open source input file "inc/hw_gpio.h": No such file or directory
  #include "inc/hw_gpio.h"
C:\ti\TivaWare_C_Series-1.1\examples\peripherals\timer\pwm.c: 0 warnings, 1 error
".\pwmtimer0.axf" - 1 Error(s), 0 Warning(s).
Target not created

  • Might your solution lie in "telling" your IDE your MCU's part number and Rev identification?  Many, many posts here detail, "how/where/why..."

    Should such info exist - and be proper in location & format - some way/how your "link" to the containing driver library is unclear to your compiler...  (again - solved via same resource as above)

  • I am using TM4C123GH6PM ,Keil IDE and the tivaware revision 2.1. I had done API project from tivaware ie from the examples->project folder in tivaware and worked successfully. But in the same way I had done the settings in my current project(timer0 based pwm) but failed.Also I want to know how to set the linker options ie scatter file and Misc controls.Below attaching the screen shots

  • Hi,

        I want to know the options for target settings for tiva c series (TM4C123GH6PM). I am using Keil IDE and tivaware revision 2.1. I had already done the example project from tivaware and worked successfully. In the same way I had done my current project(timer0 based pwm) but compiled with errors. I had added the driver library and done the proper settings in the target options need solution

  • Hi,

    To get rid of these errors, you need to add the Tiva installation folder path to Search include options - don' t know where it is in Keil; for CCS is simpler. You can find out by opening an already good working project and watching/learning all compiler/linker options - you need to do that, it will be useful for next projects. Take into account that each project may need its special "tweking/tunning" so you need to know where all this can be done.

    Petrei