2 days, 18 hours ago.

FastPwm.h and .cpp for nordic semiconductor

An error occured displaying this content.
Comment on this question

1 Answer

2 days, 8 hours ago.

Something seems to have gone wrong here. But FastPWM does not support the Nordic MCUs. Actually something I can have a look at, but no time frame I can promise :). (Since it is just whenever I feel like working on it).

I had a look at it. First of all, it is ridiculously complicated to generate a PWM signal on the NRF51822. The mbed library needs to use three different peripherals and software time (so PwmOut on an NRF51822 relies on interrupts being handled, it is somewhere halfway between software PWM and hardware PWM) just to generate a single PWM output.

Nordic's own library does manage to do it without the interrupts, so it runs independent of what the CPU is doing, which is good. But it consumes even more hardware resources.

Conclusion is that I am not going to add some kind of half software PWM to FastPWM, since that will never actually run fast. I would like to have a further look at Nordic's own solution, but it seems to be closed source. So I might be able to make the same they did, but maybe not. And if I do finish it, it might also be a standalone library since I am a bit afraid it is going to be large.

posted by Erik Olieman 19 Feb 2017

To post an answer, please log in.