Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit 6a75dba

Browse files
authored
v1.2.1 add support to new Adafruit boards
### Releases v1.2.1 1. Add support to new Adafruit boards such as QTPY_ESP32S2, FEATHER_ESP32S3_NOPSRAM and QTPY_ESP32S3_NOPSRAM
1 parent 97d092e commit 6a75dba

11 files changed

+118
-32
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1515
Please ensure to specify the following:
1616

1717
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18-
* `ESP32` Core Version (e.g. ESP32 core v2.0.2)
19-
* `ESP32` Board type (e.g. ESP32_DEV Module, ESP32_S2_DEV, ESP32_S3_DEV, ESP32_C3_DEV, etc.)
18+
* `ESP32` Core Version (e.g. ESP32 core v2.0.3)
19+
* `ESP32` Board type (e.g. ESP32_DEV Module, etc.)
20+
* `ESP32-S2` Board type (e.g. ESP32S2_DEV Module, ESP32_S2_Saola, etc.)
21+
* `ESP32_S3` Board type (e.g. ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.)
22+
* `ESP32-C3` Board type (e.g. ESP32C3_DEV Module, etc.)
2023
* Contextual information (e.g. what you were trying to achieve)
2124
* Simplest possible steps to reproduce
2225
* Anything that might be relevant in your opinion, such as:
@@ -28,10 +31,10 @@ Please ensure to specify the following:
2831

2932
```
3033
Arduino IDE version: 1.8.19
31-
ESP32 Core Version 2.0.2
34+
ESP32 Core Version 2.0.3
3235
ESP32S2_DEV Module
3336
OS: Ubuntu 20.04 LTS
34-
Linux xy-Inspiron-3593 5.4.0-99-generic #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
37+
Linux xy-Inspiron-3593 5.13.0-44-generic #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3538
3639
Context:
3740
I encountered a crash while using ESP32_New_TimerInterrupt.

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
111111

112112
### Currently supported Boards
113113

114-
1. ESP32 boards, such as ESP32_DEV, etc.
115-
2. ESP32_S2-based boards, such as ESP32S2_DEV, ESP32_S2 Saola, etc.
116-
3. ESP32_C3-based boards, such as ESP32C3_DEV, etc.
117-
4. ESP32_S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) **New**
114+
1. ESP32 boards, such as `ESP32_DEV`, etc.
115+
2. ESP32S2-based boards, such as `ESP32S2_DEV`, `ESP32_S2 Saola`, Adafruit QTPY_ESP32S2, etc.
116+
3. ESP32C3-based boards, such as `ESP32C3_DEV`, etc. **New**
117+
4. ESP32_S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, FEATHER_ESP32S3_NOPSRAM and QTPY_ESP32S3_NOPSRAM, etc.) **New**
118118

119119

120120
---
@@ -132,7 +132,7 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
132132
## Prerequisites
133133

134134
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
135-
2. [`ESP32 Core 2.0.2+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards (ESP32, ESP32_S2, ESP32_S3 and ESP32_C3). [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/).
135+
2. [`ESP32 Core 2.0.3+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards (ESP32, ESP32_S2, ESP32_S3 and ESP32_C3). [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/).
136136

137137
---
138138
---
@@ -179,7 +179,7 @@ You can use
179179
#include <ESP32_New_TimerInterrupt.hpp> //https://github.com/khoih-prog/ESP32_New_TimerInterrupt
180180
```
181181

182-
in many files. But be sure to use the following `#include <ESP32_New_TimerInterrupt.h>` **in just 1 `.h`, `.cpp` or `.ino` file**, which must **not be included in any other file**, to avoid `Multiple Definitions` Linker Error
182+
in many files. But be sure to use the following `#include <ESP32_New_ISR_Timer.h>` **in just 1 `.h`, `.cpp` or `.ino` file**, which must **not be included in any other file**, to avoid `Multiple Definitions` Linker Error
183183

184184
```
185185
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
@@ -617,7 +617,7 @@ The following is the sample terminal output when running example [TimerInterrupt
617617
```
618618
619619
Starting TimerInterruptTest on ESP32_DEV
620-
ESP32_New_TimerInterrupt v1.2.0
620+
ESP32_New_TimerInterrupt v1.2.1
621621
CPU Frequency = 240 MHz
622622
[TISR] ESP32_TimerInterrupt: _timerNo = 0 , _fre = 1000000
623623
[TISR] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -650,7 +650,7 @@ The following is the sample terminal output when running example [Change_Interva
650650

651651
```
652652
Starting Change_Interval on ESP32_DEV
653-
ESP32_New_TimerInterrupt v1.2.0
653+
ESP32_New_TimerInterrupt v1.2.1
654654
CPU Frequency = 240 MHz
655655
Starting ITimer0 OK, millis() = 136
656656
Starting ITimer1 OK, millis() = 147
@@ -679,7 +679,7 @@ The following is the sample terminal output when running example [Argument_None]
679679

680680
```
681681
Starting Argument_None on ESP32S2_DEV
682-
ESP32_New_TimerInterrupt v1.2.0
682+
ESP32_New_TimerInterrupt v1.2.1
683683
CPU Frequency = 240 MHz
684684
[TISR] ESP32_S2_TimerInterrupt: _timerNo = 0 , _fre = 1000000
685685
[TISR] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -731,7 +731,7 @@ The following is the sample terminal output when running example [ISR_16_Timers_
731731

732732
```
733733
Starting ISR_16_Timers_Array_Complex on ESP32C3_DEV
734-
ESP32_New_TimerInterrupt v1.2.0
734+
ESP32_New_TimerInterrupt v1.2.1
735735
CPU Frequency = 160 MHz
736736
Starting ITimer OK, millis() = 2187
737737
SimpleTimer : 2, ms : 12193, Dms : 10004
@@ -882,7 +882,7 @@ The following is the sample terminal output when running example [ISR_16_Timers_
882882

883883
```
884884
Starting ISR_16_Timers_Array on ESP32S2_DEV
885-
ESP32_New_TimerInterrupt v1.2.0
885+
ESP32_New_TimerInterrupt v1.2.1
886886
CPU Frequency = 240 MHz
887887
Starting ITimer OK, millis() = 2538
888888
simpleTimerDoingSomething2s: Delta programmed ms = 2000, actual = 10008
@@ -897,7 +897,7 @@ The following is the sample terminal output when running example [ISR_16_Timers_
897897

898898
```
899899
Starting ISR_16_Timers_Array_Complex on ESP32S3_DEV
900-
ESP32_New_TimerInterrupt v1.2.0
900+
ESP32_New_TimerInterrupt v1.2.1
901901
CPU Frequency = 240 MHz
902902
[TISR] ESP32_S3_TimerInterrupt: _timerNo = 1 , _fre = 1000000
903903
[TISR] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
## Table of Contents
1313

1414
* [Changelog](#changelog)
15+
* [Releases v1.2.1](#releases-v121)
1516
* [Releases v1.2.0](#releases-v120)
1617
* [Releases v1.1.0](#releases-v110)
1718
* [Releases v1.0.1](#releases-v101)
@@ -23,6 +24,10 @@
2324

2425
## Changelog
2526

27+
### Releases v1.2.1
28+
29+
1. Add support to new Adafruit boards such as QTPY_ESP32S2, FEATHER_ESP32S3_NOPSRAM and QTPY_ESP32S3_NOPSRAM
30+
2631
### Releases v1.2.0
2732

2833
1. Add support to new `ESP32-S3`

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ESP32_New_TimerInterrupt",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"keywords": "timing, device, control, timer, interrupt, timer-interrupt, hardware, isr, isr-based, hardware-timer, isr-timer, isr-based-timer, mission-critical, accuracy, precise, non-blocking, esp32, esp32-s2, esp32-c3, esp32-s3",
55
"description": "This library enables you to use Interrupt from Hardware Timers on an ESP32, ESP32_S2, ESP32_S3 or ESP32_C3-based board. It now supports 16 ISR-based timers, while consuming only 1 Hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks. These hardware timers, using interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micros(). That's necessary if you need to measure some data requiring better accuracy.",
66
"authors":

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP32_New_TimerInterrupt
2-
version=1.2.0
2+
version=1.2.1
33
author=Khoi Hoang <khoih.prog@gmail.com>
44
maintainer=Khoi Hoang <khoih.prog@gmail.com>
55
sentence=This library enables you to use Interrupt from Hardware Timers on an ESP32, ESP32_S2, ESP32_S3 or ESP32_C3-based board

platformio/platformio.ini

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
; ============================================================
1313
; chose environment:
1414
; ESP32
15+
; esp32s2
16+
; esp32s3
17+
; esp32c3
18+
1519
; ============================================================
1620
default_envs = ESP32
1721

@@ -27,6 +31,8 @@ upload_speed = 921600
2731

2832
; Checks for the compatibility with frameworks and dev/platforms
2933
lib_compat_mode = strict
34+
lib_ldf_mode = chain+
35+
;lib_ldf_mode = deep+
3036

3137
lib_deps =
3238

@@ -77,3 +83,69 @@ board = esp32doit-devkit-v1
7783
;board = iotbusio
7884
;board = iotbusproteus
7985
;board = nina_w10
86+
87+
[env:esp32s2]
88+
platform = espressif32
89+
framework = arduino
90+
91+
; toolchain download links see
92+
; refer "name": "xtensa-esp32s2-elf-gcc","version": "gcc8_4_0-esp-2021r1" section of
93+
; https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
94+
; e.g. Windows: https://github.com/espressif/crosstool-NG/releases/download/esp-2021r1/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r1-win32.zip
95+
platform_packages =
96+
toolchain-xtensa32s2@file://C:\Users\Max\Downloads\xtensa-esp32s2-elf
97+
framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#a4118ea88987c28aac3a49bcb9cc5d6c0acc6f3f
98+
platformio/tool-esptoolpy @ ~1.30100
99+
framework = arduino
100+
board = esp32dev
101+
board_build.mcu = esp32s2
102+
board_build.partitions = huge_app.csv
103+
board_build.variant = esp32s2
104+
board_build.f_cpu = 240000000L
105+
board_build.f_flash = 80000000L
106+
board_build.flash_mode = qio
107+
board_build.arduino.ldscript = esp32s2_out.ld
108+
build_unflags =
109+
-DARDUINO_ESP32_DEV
110+
-DARDUINO_VARIANT="esp32"
111+
build_flags =
112+
-DARDUINO_ESP32S2_DEV
113+
-DARDUINO_VARIANT="esp32s2"
114+
115+
116+
[env:esp32s3]
117+
platform = espressif32
118+
framework = arduino
119+
120+
board_build.mcu = esp32s3
121+
board_build.partitions = huge_app.csv
122+
board_build.variant = esp32s3
123+
board_build.f_cpu = 240000000L
124+
board_build.f_flash = 80000000L
125+
board_build.flash_mode = qio
126+
board_build.arduino.ldscript = esp32s3_out.ld
127+
build_unflags =
128+
-DARDUINO_ESP32_DEV
129+
-DARDUINO_VARIANT="esp32"
130+
build_flags =
131+
-DARDUINO_ESP32S3_DEV
132+
-DARDUINO_VARIANT="esp32s3"
133+
134+
135+
[env:esp32sc3]
136+
platform = espressif32
137+
framework = arduino
138+
139+
board_build.mcu = esp32c3
140+
board_build.partitions = huge_app.csv
141+
board_build.variant = esp32c3
142+
board_build.f_cpu = 160000000L
143+
board_build.f_flash = 80000000L
144+
board_build.flash_mode = qio
145+
board_build.arduino.ldscript = esp32c3_out.ld
146+
build_unflags =
147+
-DARDUINO_ESP32_DEV
148+
-DARDUINO_VARIANT="esp32"
149+
build_flags =
150+
-DARDUINO_ESP32S3_DEV
151+
-DARDUINO_VARIANT="esp32c3"

src/ESP32_New_ISR_Timer-Impl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
2727
Based on BlynkTimer.h
2828
Author: Volodymyr Shymanskyy
2929
30-
Version: 1.2.0
30+
Version: 1.2.1
3131
3232
Version Modified By Date Comments
3333
------- ----------- ---------- -----------
3434
1.0.0 K Hoang 15/08/2021 Initial coding for ESP32, ESP32_S2, ESP32_C3 boards with ESP32 core v2.0.0-rc1+
3535
1.0.1 K.Hoang 14/11/2021 Avoid using float and D1 in examples due to issue with core v2.0.0 and v2.0.1
3636
1.1.0 K.Hoang 18/01/2022 Fix `multiple-definitions` linker error.
3737
1.2.0 K Hoang 12/02/2022 Add support to new ESP32-S3
38+
1.2.1 K Hoang 16/06/2022 Add support to new Adafruit boards
3839
*****************************************************************************************************************************/
3940

4041
#pragma once

src/ESP32_New_ISR_Timer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
2727
Based on BlynkTimer.h
2828
Author: Volodymyr Shymanskyy
2929
30-
Version: 1.2.0
30+
Version: 1.2.1
3131
3232
Version Modified By Date Comments
3333
------- ----------- ---------- -----------
3434
1.0.0 K Hoang 15/08/2021 Initial coding for ESP32, ESP32_S2, ESP32_C3 boards with ESP32 core v2.0.0-rc1+
3535
1.0.1 K.Hoang 14/11/2021 Avoid using float and D1 in examples due to issue with core v2.0.0 and v2.0.1
3636
1.1.0 K.Hoang 18/01/2022 Fix `multiple-definitions` linker error.
3737
1.2.0 K Hoang 12/02/2022 Add support to new ESP32-S3
38+
1.2.1 K Hoang 16/06/2022 Add support to new Adafruit boards
3839
*****************************************************************************************************************************/
3940

4041
#pragma once

src/ESP32_New_ISR_Timer.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
2727
Based on BlynkTimer.h
2828
Author: Volodymyr Shymanskyy
2929
30-
Version: 1.2.0
30+
Version: 1.2.1
3131
3232
Version Modified By Date Comments
3333
------- ----------- ---------- -----------
3434
1.0.0 K Hoang 15/08/2021 Initial coding for ESP32, ESP32_S2, ESP32_C3 boards with ESP32 core v2.0.0-rc1+
3535
1.0.1 K.Hoang 14/11/2021 Avoid using float and D1 in examples due to issue with core v2.0.0 and v2.0.1
3636
1.1.0 K.Hoang 18/01/2022 Fix `multiple-definitions` linker error.
3737
1.2.0 K Hoang 12/02/2022 Add support to new ESP32-S3
38+
1.2.1 K Hoang 16/06/2022 Add support to new Adafruit boards
3839
*****************************************************************************************************************************/
3940

4041
#pragma once
@@ -47,13 +48,13 @@
4748
#endif
4849

4950
#ifndef ESP32_NEW_TIMERINTERRUPT_VERSION
50-
#define ESP32_NEW_TIMERINTERRUPT_VERSION "ESP32_New_TimerInterrupt v1.2.0"
51+
#define ESP32_NEW_TIMERINTERRUPT_VERSION "ESP32_New_TimerInterrupt v1.2.1"
5152

5253
#define ESP32_NEW_TIMERINTERRUPT_VERSION_MAJOR 1
5354
#define ESP32_NEW_TIMERINTERRUPT_VERSION_MINOR 2
54-
#define ESP32_NEW_TIMERINTERRUPT_VERSION_PATCH 0
55+
#define ESP32_NEW_TIMERINTERRUPT_VERSION_PATCH 1
5556

56-
#define ESP32_NEW_TIMERINTERRUPT_VERSION_INT 1002000
57+
#define ESP32_NEW_TIMERINTERRUPT_VERSION_INT 1002001
5758
#endif
5859

5960
#include "TimerInterrupt_Generic_Debug.h"

src/ESP32_New_TimerInterrupt.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@
2828
Based on BlynkTimer.h
2929
Author: Volodymyr Shymanskyy
3030
31-
Version: 1.2.0
31+
Version: 1.2.1
3232
3333
Version Modified By Date Comments
3434
------- ----------- ---------- -----------
3535
1.0.0 K Hoang 15/08/2021 Initial coding for ESP32, ESP32_S2, ESP32_C3 boards with ESP32 core v2.0.0-rc1+
3636
1.0.1 K.Hoang 14/11/2021 Avoid using float and D1 in examples due to issue with core v2.0.0 and v2.0.1
3737
1.1.0 K.Hoang 18/01/2022 Fix `multiple-definitions` linker error.
3838
1.2.0 K Hoang 12/02/2022 Add support to new ESP32-S3
39+
1.2.1 K Hoang 16/06/2022 Add support to new Adafruit boards
3940
*****************************************************************************************************************************/
4041

4142
#pragma once
@@ -44,11 +45,12 @@
4445
#define ESP32_NEW_TIMERINTERRUPT_H
4546

4647
#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
47-
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
48-
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM )
48+
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
49+
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM || ARDUINO_ADAFRUIT_QTPY_ESP32S2)
4950
#define USING_ESP32_S2_NEW_TIMERINTERRUPT true
5051
#elif ( defined(ARDUINO_ESP32S3_DEV) || defined(ARDUINO_ESP32_S3_BOX) || defined(ARDUINO_TINYS3) || \
51-
defined(ARDUINO_PROS3) || defined(ARDUINO_FEATHERS3) )
52+
defined(ARDUINO_PROS3) || defined(ARDUINO_FEATHERS3) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_NOPSRAM) || \
53+
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM))
5254
#define USING_ESP32_S3_NEW_TIMERINTERRUPT true
5355
#elif ( ARDUINO_ESP32C3_DEV )
5456
#define USING_ESP32_C3_NEW_TIMERINTERRUPT true
@@ -59,13 +61,13 @@
5961
#endif
6062

6163
#ifndef ESP32_NEW_TIMERINTERRUPT_VERSION
62-
#define ESP32_NEW_TIMERINTERRUPT_VERSION "ESP32_New_TimerInterrupt v1.2.0"
64+
#define ESP32_NEW_TIMERINTERRUPT_VERSION "ESP32_New_TimerInterrupt v1.2.1"
6365

6466
#define ESP32_NEW_TIMERINTERRUPT_VERSION_MAJOR 1
6567
#define ESP32_NEW_TIMERINTERRUPT_VERSION_MINOR 2
66-
#define ESP32_NEW_TIMERINTERRUPT_VERSION_PATCH 0
68+
#define ESP32_NEW_TIMERINTERRUPT_VERSION_PATCH 1
6769

68-
#define ESP32_NEW_TIMERINTERRUPT_VERSION_INT 1002000
70+
#define ESP32_NEW_TIMERINTERRUPT_VERSION_INT 1002001
6971
#endif
7072

7173
#ifndef TIMER_INTERRUPT_DEBUG

0 commit comments

Comments
 (0)