I need to change the PWM duty cycle through DMA.
Is there an example on how to do so in the nrf connect sdk?
I need to change the PWM duty cycle through DMA.
Is there an example on how to do so in the nrf connect sdk?
Hi, I will look into it.
Is the goal to change the PWM frequency after the initial start or at the start of the PWM?
Regards
Runar
I will keep the frequency the same but change the duty cycle.
The application is to send data over IR (infrared) like a remote control without cpu intervention.
I have not found any examples for it unfortunately. If its only the initial duty cycle is should be fine to set in the initial function call. However if you want to change the duty cycle after the initial function call there is a potential for a issue where the CPU overwrites the memory area at the same time as the DMA tries to access it.
Regards
Runar
Note. From end of work today the office will be closed until Tuesday the 11th due to public holiday in Norway
I understand.
So if a sequence cannot be sent using the Zephyr PWM driver I guess I will use nrfx hal directly.
If I override the Zephyr PWM driver completely (manually calling nrf_pwm_configure, nrfx_pwm_simple_playback, etc), should I leave the `pwm0` DT binding `status = "disabled";`?
Hi
I don't think you need to set as disabled. From what I recall all you should need to do to use the NRFX driver is to enable it in pjr.conf as seen in the example below
Here is also an example from a coworker regarding PWM and NRFX driver https://github.com/zephyrproject-rtos/hal_nordic/blob/master/nrfx/samples/src/nrfx_pwm/common_mode/main.c
Regards
Runar
Hi
I don't think you need to set as disabled. From what I recall all you should need to do to use the NRFX driver is to enable it in pjr.conf as seen in the example below
Here is also an example from a coworker regarding PWM and NRFX driver https://github.com/zephyrproject-rtos/hal_nordic/blob/master/nrfx/samples/src/nrfx_pwm/common_mode/main.c
Regards
Runar