PWM API's

hi team,

I using nrf52840DK controller and nRF5_SDK_17.1.0.  I want to change PWM module Frequency dynamically (it has to change frequency automatically) at different time instants. 

Is there any APIs or reference  example code to achieve the task?

Also what is the difference between PWM driver - legacy layerPWM driver and PWM HAL APIs?

  • Hi,

    kunchalaRajesh said:
    i tried without delay i am getting fatal error

    I would not expect a delay to be needed, but it would be interesting to know what happens. As stated, you can check what the "fatal error" really was as explained in my previous post. That needs to be done in order to know what happened. Once you know which function returned which error code, you can look more into the details.

    kunchalaRajesh said:
    this controller gpios have a capacity to sense 1000 interrupts per sec can you please explain why i getting  fluctuation.

    Which fluctuations are you describing now? What is the problem? If you are loogging too much/fast it could be that you loose some UART data, if that is what you are seeing and asking about. That is not unexpected. 

    PS: Please share code by using Insert -> Insert Code instead of screenshots. That makes it much easier to get a full picture.

Related