This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

pwm can not work with softdevice, when i use s110(v7.1) , sdk 6.1

Hi Nordics,

I copy pwm sample code into my proximity project, to drive a buzzer .

I init pwm before softdevice. but, once "SOFTDEVICE_HANDLER_INIT" is excuted, the buzzer pin no longer toggle.

My question is , softdevice use TIMER0, my pwm use TIMER2, it seems that they are independent two modules. why pwm not working ?

Many thanks !

Bob

  • If you are using the code in pwm_example it may be because the example access some registers that are restricted when using SoftDevice, more specific NRF_CLOCK and NRF_POWER, see here. You will need to use sd_clock_hfclk_request and sd_power_mode_set instead, although these are not necessary (pwm will work fine with RC clock and not constant latency mode).

    This PWM example has a high possibility of inverting when using it with a SoftDevice. I will recommend to update to our newest SDK to use the newest driver which does not have this bug. You will need to update the SoftDevice also.

  • Ole Bauck, thanks for your answer. however, when i go to newest SDK, all samples are using S130 etc., costing much more space of my NRF51822QFAB, so space not enough. i do not want to change to NRF51822QFAA. do you have any idea ?

  • SDK 10 should also work fine, it has S110 examples.

  • Hi, Ole Bauck, The proximity example from SDK10 can run on my board. My board is using NRF51822QFABC0 and External XTAL 16MHz, but no XTAL 32.76khz.

  • Then you need to change to SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL) or similar.

Related