PWM Event
Overview
This sample provides an example application using the PWM API event API to get events on a PWM signal. The sample demonstrates how events can be used to precisely time x periods of a PWM signal. A usecase for this would be the transmitting part of an IR remote, where precise pulse timing is needed.
Requirements
This sample requires the support of the PWM API event API.
Building and Running
west build -b sam4s_xplained samples/drivers/pwm/event west build -t run
Sample Output
When capturing the signal using an oscilloscope or logic analyzer, it should look like the following repeating sequence (after a startup transient)
┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ─┘ └─┘ └─┘ └─┘ └─┘ └───────────────────┘ └─┘ └─┘ └─┘ └─┘ └─────