Skip to content

Commit 7592db0

Browse files
committed
[ISSUE-44]: example app for examining recurrent alarms
1 parent 80e4d0b commit 7592db0

File tree

6 files changed

+440
-1
lines changed

6 files changed

+440
-1
lines changed

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ AC_CONFIG_SUBDIRS([examples])
1818
AC_CONFIG_SUBDIRS([examples/0blink])
1919
AC_CONFIG_SUBDIRS([examples/0hello])
2020
AC_CONFIG_SUBDIRS([examples/0ledctrl])
21+
AC_CONFIG_SUBDIRS([examples/0timgalarm])
2122
AC_CONFIG_SUBDIRS([examples/0uart])
2223
AC_CONFIG_SUBDIRS([examples/0udma])
2324
AC_CONFIG_SUBDIRS([examples/1i2cssd1306])
@@ -39,6 +40,7 @@ AC_CONFIG_FILES([
3940
examples/0button/Makefile
4041
examples/0hello/Makefile
4142
examples/0ledctrl/Makefile
43+
examples/0timgalarm/Makefile
4244
examples/0uart/Makefile
4345
examples/0udma/Makefile
4446
examples/1i2cssd1306/Makefile

examples/0timgalarm/Makefile.am

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
include $(top_srcdir)/scripts/elf2bin.mk
2+
include $(top_srcdir)/ld/flags.mk
3+
4+
noinst_HEADERS = defines.h
5+
6+
if WITH_BINARIES
7+
AM_LDFLAGS += \
8+
-T $(top_srcdir)/ld/esp32.rom.ld \
9+
-T $(top_srcdir)/ld/esp32.rom.libgcc.ld \
10+
-T $(top_srcdir)/ld/esp32.rom.newlib-data.ld \
11+
-T $(top_srcdir)/ld/esp32.rom.newlib-locale.ld \
12+
-T $(top_srcdir)/ld/esp32.rom.newlib-nano.ld \
13+
-T $(top_srcdir)/ld/esp32.rom.newlib-time.ld \
14+
-T $(top_srcdir)/ld/esp32.rom.redefined.ld \
15+
-T $(top_srcdir)/ld/esp32.rom.syscalls.ld
16+
else
17+
AM_LDFLAGS += \
18+
-T $(top_srcdir)/ld/esp32.rom.ld \
19+
-T $(top_srcdir)/ld/esp32.rom.libgcc.ld \
20+
-T $(top_srcdir)/ld/esp32.rom.redefined.ld \
21+
-T $(top_srcdir)/ld/esp32.rom.syscalls.ld
22+
endif
23+
24+
AM_CFLAGS = -std=c11 -flto
25+
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir)
26+
LDADD = $(top_builddir)/src/libesp32basic.a
27+
28+
bin_PROGRAMS = \
29+
alarm.elf
30+
31+
if WITH_BINARIES
32+
CLEANFILES = \
33+
alarm.bin
34+
endif
35+
36+
BUILT_SOURCES = $(CLEANFILES)

examples/0timgalarm/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Measuring TIMG alarm accuracy
2+
3+
This example examines periodic TIMG alarm behaviour for very low alarm values.
4+
5+
#### Control
6+
7+
* `1`,`2`, `3` selects `timer0_1`,`timer1_0` or `timer1_1` for measurement.
8+
* `a`,`b` selects how to implement recurrency: `a` for timer autoreload, `b` for incrementing `ALARM` value of the timer.
9+
* `[`,`]` for decrease/increase sampling length by `1`.
10+
* `{`,`}` for decrease/increase sampling length by `10`.
11+
* `,`,`.` for decrease/increase alarm period by `1`.
12+
* `<`,`>` for decrease/increase alarm period by `10`.
13+
* `s` starts the measurement.
14+
* `r` prints the result of the last measurement.
15+
* `c` prints some register information for debugging.

0 commit comments

Comments
 (0)