Project

General

Profile

Feature #14

Change laser PWM control: rewrite using own PWM function

Added by peter about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
firmware
Target version:
-
Start date:
2012-07-19
Due date:
% Done:

0%


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()

Requirements;
  • 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)

History

#1 Updated by peter about 8 years ago

  • Category set to firmware

#2 Updated by peteruithoven about 6 years ago

  • Status changed from New to Closed

Also available in: Atom PDF