lpcware

How to PWM using a RTOS

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by SnEAky on Thu Mar 18 04:25:58 MST 2010
Hello,

How is it possible to control a servo motor using a 50Hz PWM. It's for a  LPCXpresso 1343. I've managed to port the FreeRTOS to 1343, but I have  no idea how to use the timers. I got the PWM code working -without- FreeRTOS but I can't get it working -with- FreeRTOS.

I  just have no idea how to make this work in FreeRTOS. I've put the init  in setuphardware(); and i call that function in the main.
Next I start a  task that will set the pulse width, but for some reason  nothing happens, the output is just a logical '1' and nothing happens.

I hope that someone can help me,

Thanks in advance

Outcomes