This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

mpu9250 values to pwm pin

i was trying to send acceleromter values of mpu9250 to pwm pins. for this i have merge to different examples i.e. nRF-mpu-simple and pwm library example. but it showing error that no such file or directory. but i have included that files

*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'nrf52832_xxaa'
compiling nrf_drv_mpu_twi.c...
compiling main.c...
..\..\..\main.c(18): error:  #5: cannot open source input file "app_pwm.h": No such file or directory
  #include "app_pwm.h"
..\..\..\main.c: 0 warnings, 1 error
compiling app_pwm.c...
..\..\..\..\..\..\components\libraries\pwm\app_pwm.h(38): error:  #5: cannot open source input file "nrf_drv_timer.h": No such file or directory
  #include "nrf_drv_timer.h"
..\..\..\..\..\..\components\libraries\pwm\app_pwm.c: 0 warnings, 1 error
compiling app_mpu.c...
compiling app_uart_fifo.c...
compiling nrf_drv_common.c...
compiling nrf_delay.c...
compiling nrf_drv_twi.c...
compiling nrf_drv_gpiote.c...
compiling nrf_drv_uart.c...
compiling nrf_drv_timer.c...
..\..\..\..\..\..\components\drivers_nrf\timer\nrf_drv_timer.c(18): error:  #35: #error directive: "No TIMER instances enabled in the driver configuration file."
      #error "No TIMER instances enabled in the driver configuration file."
..\..\..\..\..\..\components\drivers_nrf\timer\nrf_drv_timer.c: 0 warnings, 1 error
compiling nrf_nvic.c...
compiling nrf_drv_ppi.c...
compiling nrf_soc.c...
compiling app_error.c...
compiling app_error_weak.c...
compiling app_fifo.c...
compiling app_util_platform.c...
compiling nrf_assert.c...
assembling arm_startup_nrf52.s...
compiling retarget.c...
compiling system_nrf52.c...
".\_build\nrf52832_xxaa.axf" - 3 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:16

how can i resolve this problem main.c

i am using sdk 11.0.0, nrf52 dk

Parents
  • Hi,

    • Add app_pwm.h" to the included paths in Keil IDE. You can do this by going into “Options for Target ‘nrf..’”, C/C++ tab, and add the path to the “Include Paths”. Add ..\..\..\..\..\..\components\libraries\pwm to the list. Also add app_pwm.c to the project files.
    • In the nrf_drv_config.h file, make sure that the TIMER you are trying to use is enabled. E.g. TIMER1_ENABLED is set to 1, if you are using TIMER1.
Reply
  • Hi,

    • Add app_pwm.h" to the included paths in Keil IDE. You can do this by going into “Options for Target ‘nrf..’”, C/C++ tab, and add the path to the “Include Paths”. Add ..\..\..\..\..\..\components\libraries\pwm to the list. Also add app_pwm.c to the project files.
    • In the nrf_drv_config.h file, make sure that the TIMER you are trying to use is enabled. E.g. TIMER1_ENABLED is set to 1, if you are using TIMER1.
Children
Related