Actions
Feature #14
closedChange laser PWM control: rewrite using own PWM function
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
firmware
Target version:
-
Start date:
2012-07-19
Due date:
% Done:
0%
Estimated time:
Description
The Laser PWM control currently uses the MBED libary PWM functions:
http://mbed.org/handbook/PwmOut
The PWM function has some limitations: It is limited to the PWM1 outputs,
The initial state of the output cannot be set and floating point is used in the implementation to set the PWM duration.
A new object LaosPWM() should be implemented, that allows more flexibility.
Constructor: LaosPWM(pin,freq,initialpwm)
methods: write(pwm), read()
- it should use CMSIS and the NXP peripheral library.
- Initially it should function for PWM1 peripheral (similar to current PWM), pin can be p21..p26
- PWM value should be in range of 0 to 10000 for 0 to 100%
- Writing should be fast (low overhead),inline function
- Clipping of set value between 0 and 100%
- Writing should be double buffered (no glitches)
Updated by peteruithoven almost 9 years ago
- Status changed from New to Closed
Actions