AM263x Digital Power SDK  09.01.00
Exponential moving average Test

Exponential moving average on ramp signal using utilities/emavg and rampgen library

It demonstrates how to run exponential moving average library(emavg). This test generates ramp signal of frequency 1KHz and passing generated software ramp signal as input to emavg library with weightage for present input as 0.05 which leads to output as straight line with oscillation varrying within 1.712 to 1.511 V. EMAVG output signal can be observed in DAC port.

Files and directory structure

Folder/Files Description
emavg_main.c Main function for emavg test
rampgen.h rampgen library header file
emavg.h emavg library header file
emavg.syscfg DAC configuration as per test usage

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
r5fss0-0 freertos
Toolchain ti-arm-clang
Boards am263x-cc
Example folder examples/utilities/emavg

Steps to Run the Example

Sample Output

Shown below is a sample output when the application is run,

Output will be the exponential moving average of ramp signal with 1KHz frequency as shown in figure and can be observed from DAC port for 10sec:

EMAVG of ramp signal observed from logic analyzer
- Ramp generated and output after exponential moving average - observed through DAC output ...
- Test completed