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

NRF_ERROR_NO_MEM when initializing second PWM instance

Hello, I am getting NRF_ERROR_NO_MEM when initializing second PWM instance, I tried to find the reason, but no luck. Please help.

I am using nRF51822 with SDK9 (+fixed pwm library from sdk10).

First two easy questions that I found contradictory answers using the search:

- When using SD130, do we have 8 free ppi channels (like is said here on august devzone.nordicsemi.com/.../) or 14 (like is written on s130 specification from june)?

- Should we initialize PWM (and enable it) before or after Softdevice initialization?

Now the real question:

- Why am I getting the NRF_ERROR_NO_MEM error when initializing second instance of pwm library?

I guess it is because I am running out of free ppi or gpiote channels, but I don't know why. First PWM instance only uses 6 ppi channels (2 channel pwm). My app is also using: TWI, BSP (only leds not buttons), APP TIMERS, SCHEDULER, ADC... NUS SERVICE, SCAN, ADVERTISING, CONNECTION... and that's all I think. Do any of these things use any ppi or gpiote channel by default?

Thank you very much for your help and time,

Luis Rodenas

Related