How can I generate waveforms with the Low Energy Timer while in EM2?

by Administrator Siliconlabs ‎09-18-2015 01:19 PM - edited ‎08-04-2017 10:21 AM


How can I generate pulses, PWM, and other waveforms with the Low Energy Timer (LETIMER) while in EM2?


The Low Energy Timer (LETIMER) is a 16-bit timer that can be used in energy mode EM2. Due to its low power consumption it can be used for timing and output generation when most of the device is powered down. This makes it possible for the LETIMER to achieve high energy efficiency.


The LETIMER can be used to generate a variety of waveforms with minimal software intervention, like PWM and pulses with the duraction of one LFACLK LETIMER period.



Fig: LETIMER Overview


Among the key features of the LETIMER are two compare match registers that can generate an interrupt when the counter value of LETIMERn_CNT becomes equal to their value. Five interrupts are available in the LETIMER: one for when each of the Repeat Counters reaches zero, one when the LETIMER counter matches the value of each compare register, and one when the LETIMER underflows.


Register access and synchronization of writes from the high frequency domain to the low frequency domain are also required. This is because the LETIMER is a Low Energy Peripheral and makes use of a low frequency clock, which is asynchronous to the HFCORECLK.


Read the complete application note here for more details and software examples.