Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

PWM issue?

Hello all,

I am using the PWM and TIMER drivers on the nRF52DK board among other drivers like TWI and I get this error when trying to compile, eg. today Slight smile

It can be seen from the compile output that apparently something is wrong here :

" nrf_drv_timer_extended_compare(&TIMER, NRF_TIMER_CC_CHANNEL0, time_ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true) " ;

BUT! Why it is sometimes working with the same code? Is there something wrong with the "linker"? For example, if I delete this project, and copy the same project from elsewhere, yes I did a safe copy, then it works :) 

What am I doing wrong?

I am working on the SDK_config file, because I am actually combining two project into one, indeed, both work ok separately when compiling and running on the board, except the pwm_timer does not want to open the CMSIS, although it works... Opening the CMSIS in the other project where I want to bring in the PWM and TIMER, has no problems with opening or other code, etc.

I am wondering, because I am editing the SDK_Config file is it possible that the computer should be restarted, or some other thing, like emStudio ... 

Any comments, ideas how to get around this would be more than helpful !

Best.

  • I have noticed the configuration build properties are changed from Debug to Release it compiles ok! 

    Any ideas why?

    Best.

  • Hi,

    Undefined references usually means that the compiler isn't able to find the source file where the function is defined. Go to project settings and double check that the path to the source file that contains the function definition has been included:

    When the configuration in the top left is set to DEBUG then the "User Included Directories" should be set to inherits.

    When you change it to Common, then the User Included Directories" should have the path to the source file containing the function definition.

    BUT! Why it is sometimes working with the same code? Is there something wrong with the "linker"? For example, if I delete this project, and copy the same project from elsewhere, yes I did a safe copy, then it works :) 

    I'm not sure why this would fix it. What do you mean copying it from elsewhere? Is it exactly the same project?

    regards

    Jared 

Related