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

Commit fe3c16b

Browse files
authored
v1.3.3 add support to new Adafruit boards
### Releases v1.3.3 1. Add support to new Adafruit boards such as QTPY_ESP32S2, FEATHER_ESP32S3_NOPSRAM and QTPY_ESP32S3_NOPSRAM
1 parent a2def18 commit fe3c16b

File tree

12 files changed

+113
-30
lines changed

12 files changed

+113
-30
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Arduino IDE version: 1.8.19
3434
ESP32 core v2.0.3
3535
ESP32S3_DEV Module
3636
OS: Ubuntu 20.04 LTS
37-
Linux xy-Inspiron-3593 5.13.0-40-generic #45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 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
3838
3939
Context:
4040
I encountered a crash while using TimerInterrupt.
@@ -55,3 +55,4 @@ There are usually some outstanding feature requests in the [existing issues list
5555
### Sending Pull Requests
5656

5757
Pull Requests with changes and fixes are also welcome!
58+

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
127127
### Currently supported Boards
128128

129129
1. ESP32 boards, such as `ESP32_DEV`, etc.
130-
2. ESP32S2-based boards, such as `ESP32S2_DEV`, `ESP32_S2 Saola`, etc.
130+
2. ESP32S2-based boards, such as `ESP32S2_DEV`, `ESP32_S2 Saola`, Adafruit QTPY_ESP32S2, etc.
131131
3. ESP32C3-based boards, such as `ESP32C3_DEV`, etc. **New**
132-
4. ESP32_S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) **New**
132+
4. ESP32_S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, FEATHER_ESP32S3_NOPSRAM and QTPY_ESP32S3_NOPSRAM, etc.) **New**
133133

134134

135135
---
@@ -309,7 +309,7 @@ The following is the sample terminal output when running example [ISR_16_PWMs_Ar
309309

310310
```
311311
Starting ISR_16_PWMs_Array_Complex on ESP32_DEV
312-
ESP32_PWM v1.3.2
312+
ESP32_PWM v1.3.3
313313
CPU Frequency = 240 MHz
314314
[PWM] ESP32_TimerInterrupt: _timerNo = 1 , _fre = 1000000
315315
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -377,7 +377,7 @@ The following is the sample terminal output when running example [ISR_16_PWMs_Ar
377377

378378
```
379379
Starting ISR_16_PWMs_Array on ESP32_DEV
380-
ESP32_PWM v1.3.2
380+
ESP32_PWM v1.3.3
381381
CPU Frequency = 240 MHz
382382
[PWM] ESP32_TimerInterrupt: _timerNo = 1 , _fre = 1000000
383383
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -412,7 +412,7 @@ The following is the sample terminal output when running example [ISR_16_PWMs_Ar
412412

413413
```
414414
Starting ISR_16_PWMs_Array_Simple on ESP32_DEV
415-
ESP32_PWM v1.3.2
415+
ESP32_PWM v1.3.3
416416
CPU Frequency = 240 MHz
417417
[PWM] ESP32_TimerInterrupt: _timerNo = 1 , _fre = 1000000
418418
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -446,7 +446,7 @@ The following is the sample terminal output when running example [ISR_Modify_PWM
446446

447447
```
448448
Starting ISR_Modify_PWM on ESP32_DEV
449-
ESP32_PWM v1.3.2
449+
ESP32_PWM v1.3.3
450450
CPU Frequency = 240 MHz
451451
[PWM] ESP32_TimerInterrupt: _timerNo = 1 , _fre = 1000000
452452
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -482,7 +482,7 @@ The following is the sample terminal output when running example [ISR_Changing_P
482482

483483
```
484484
Starting ISR_Changing_PWM on ESP32_DEV
485-
ESP32_PWM v1.3.2
485+
ESP32_PWM v1.3.3
486486
CPU Frequency = 240 MHz
487487
[PWM] ESP32_TimerInterrupt: _timerNo = 1 , _fre = 1000000
488488
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -516,7 +516,7 @@ The following is the sample terminal output when running example [ISR_Modify_PWM
516516

517517
```
518518
Starting ISR_Modify_PWM on ESP32S2_DEV
519-
ESP32_PWM v1.3.2
519+
ESP32_PWM v1.3.3
520520
CPU Frequency = 240 MHz
521521
[PWM] ESP32_S2_TimerInterrupt: _timerNo = 1 , _fre = 1000000
522522
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -552,7 +552,7 @@ The following is the sample terminal output when running example [ISR_Changing_P
552552

553553
```
554554
Starting ISR_Changing_PWM on ESP32S2_DEV
555-
ESP32_PWM v1.3.2
555+
ESP32_PWM v1.3.3
556556
CPU Frequency = 240 MHz
557557
[PWM] ESP32_S2_TimerInterrupt: _timerNo = 1 , _fre = 1000000
558558
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -578,7 +578,7 @@ The following is the sample terminal output when running example [ISR_Modify_PWM
578578

579579
```
580580
Starting ISR_Modify_PWM on ESP32C3_DEV
581-
ESP32_PWM v1.3.2
581+
ESP32_PWM v1.3.3
582582
CPU Frequency = 160 MHz
583583
[PWM] ESP32_TimerInterrupt: _timerNo = 1 , _fre = 1000000
584584
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -614,7 +614,7 @@ The following is the sample terminal output when running example [ISR_Changing_P
614614

615615
```
616616
Starting ISR_Changing_PWM on ESP32C3_DEV
617-
ESP32_PWM v1.3.2
617+
ESP32_PWM v1.3.3
618618
CPU Frequency = 160 MHz
619619
[PWM] ESP32_TimerInterrupt: _timerNo = 1 , _fre = 1000000
620620
[PWM] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
@@ -643,7 +643,7 @@ The following is the sample terminal output when running example [ISR_16_PWMs_Ar
643643

644644
```
645645
Starting ISR_16_PWMs_Array_Complex on ESP32S3_DEV
646-
ESP32_PWM v1.3.2
646+
ESP32_PWM v1.3.3
647647
CPU Frequency = 240 MHz
648648
[PWM] ESP32_S3_TimerInterrupt: _timerNo = 1 , _fre = 1000000
649649
[PWM] 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.3.3](#releases-v133)
1516
* [Releases v1.3.2](#releases-v132)
1617
* [Releases v1.3.1](#releases-v131)
1718
* [Releases v1.3.0](#releases-v130)
@@ -28,6 +29,10 @@
2829

2930
## Changelog
3031

32+
### Releases v1.3.3
33+
34+
1. Add support to new Adafruit boards such as QTPY_ESP32S2, FEATHER_ESP32S3_NOPSRAM and QTPY_ESP32S3_NOPSRAM
35+
3136
### Releases v1.3.2
3237

3338
1. Remove crashing `PIN_D24` from examples

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ESP32_PWM",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"keywords": "timing, device, control, pwm, 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, synchronized-PWM, on-the-fly",
55
"description": "This library enables you to use Interrupt from Hardware Timers on an ESP32, ESP32_S2, ESP32_S3 or ESP32_C3-based board to create and output PWM to pins. It now supports 16 ISR-based synchronized PWM channels, while consuming only 1 Hardware Timer. PWM interval can be very long (uint32_t millisecs). The most important feature is they're ISR-based PWM channels. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks. These hardware PWM channels, 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. Now you can change the PWM settings on-the-fly",
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_PWM
2-
version=1.3.2
2+
version=1.3.3
33
author=Khoi Hoang <[email protected]>
44
maintainer=Khoi Hoang <[email protected]>
55
sentence=This library enables you to use Interrupt from Hardware Timers on an ESP32, ESP32_S2, ESP32_S3 or ESP32_C3-based board to create and output PWM to pins.

platformio/platformio.ini

Lines changed: 70 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

@@ -79,3 +83,69 @@ board = esp32doit-devkit-v1
7983
;board = iotbusio
8084
;board = iotbusproteus
8185
;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_PWM.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Therefore, their executions are not blocked by bad-behaving functions / tasks.
2323
This important feature is absolutely necessary for mission-critical tasks.
2424
25-
Version: 1.3.2
25+
Version: 1.3.3
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -36,6 +36,7 @@
3636
1.3.0 K Hoang 12/02/2022 Add support to new ESP32-S3
3737
1.3.1 K Hoang 04/03/2022 Fix `DutyCycle` and `New Period` display bugs. Display warning only when debug level > 3
3838
1.3.2 K Hoang 09/05/2022 Remove crashing PIN_D24 from examples
39+
1.3.3 K Hoang 16/06/2022 Add support to new Adafruit boards
3940
*****************************************************************************************************************************/
4041

4142
#pragma once

src/ESP32_PWM.hpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Therefore, their executions are not blocked by bad-behaving functions / tasks.
2323
This important feature is absolutely necessary for mission-critical tasks.
2424
25-
Version: 1.3.2
25+
Version: 1.3.3
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
@@ -36,6 +36,7 @@
3636
1.3.0 K Hoang 12/02/2022 Add support to new ESP32-S3
3737
1.3.1 K Hoang 04/03/2022 Fix `DutyCycle` and `New Period` display bugs. Display warning only when debug level > 3
3838
1.3.2 K Hoang 09/05/2022 Remove crashing PIN_D24 from examples
39+
1.3.3 K Hoang 16/06/2022 Add support to new Adafruit boards
3940
*****************************************************************************************************************************/
4041

4142
#pragma once
@@ -48,11 +49,12 @@
4849
#endif
4950

5051
#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
51-
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
52-
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM )
52+
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
53+
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM || ARDUINO_ADAFRUIT_QTPY_ESP32S2)
5354
#define USING_ESP32_S2_PWM true
5455
#elif ( defined(ARDUINO_ESP32S3_DEV) || defined(ARDUINO_ESP32_S3_BOX) || defined(ARDUINO_TINYS3) || \
55-
defined(ARDUINO_PROS3) || defined(ARDUINO_FEATHERS3) )
56+
defined(ARDUINO_PROS3) || defined(ARDUINO_FEATHERS3) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_NOPSRAM) || \
57+
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM))
5658
#define USING_ESP32_S3_PWM true
5759
#elif ( ARDUINO_ESP32C3_DEV )
5860
#define USING_ESP32_C3_PWM true
@@ -71,13 +73,13 @@
7173
#endif
7274

7375
#ifndef ESP32_PWM_VERSION
74-
#define ESP32_PWM_VERSION "ESP32_PWM v1.3.2"
76+
#define ESP32_PWM_VERSION "ESP32_PWM v1.3.3"
7577

7678
#define ESP32_PWM_VERSION_MAJOR 1
7779
#define ESP32_PWM_VERSION_MINOR 3
78-
#define ESP32_PWM_VERSION_PATCH 2
80+
#define ESP32_PWM_VERSION_PATCH 3
7981

80-
#define ESP32_PWM_VERSION_INT 1003002
82+
#define ESP32_PWM_VERSION_INT 1003003
8183
#endif
8284

8385
#ifndef TIMER_INTERRUPT_DEBUG

src/ESP32_PWM_ISR.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Therefore, their executions are not blocked by bad-behaving functions / tasks.
2222
This important feature is absolutely necessary for mission-critical tasks.
2323
24-
Version: 1.3.2
24+
Version: 1.3.3
2525
2626
Version Modified By Date Comments
2727
------- ----------- ---------- -----------
@@ -35,6 +35,7 @@
3535
1.3.0 K Hoang 12/02/2022 Add support to new ESP32-S3
3636
1.3.1 K Hoang 04/03/2022 Fix `DutyCycle` and `New Period` display bugs. Display warning only when debug level > 3
3737
1.3.2 K Hoang 09/05/2022 Remove crashing PIN_D24 from examples
38+
1.3.3 K Hoang 16/06/2022 Add support to new Adafruit boards
3839
*****************************************************************************************************************************/
3940

4041
#pragma once

src/ESP32_PWM_ISR.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Therefore, their executions are not blocked by bad-behaving functions / tasks.
2222
This important feature is absolutely necessary for mission-critical tasks.
2323
24-
Version: 1.3.2
24+
Version: 1.3.3
2525
2626
Version Modified By Date Comments
2727
------- ----------- ---------- -----------
@@ -35,6 +35,7 @@
3535
1.3.0 K Hoang 12/02/2022 Add support to new ESP32-S3
3636
1.3.1 K Hoang 04/03/2022 Fix `DutyCycle` and `New Period` display bugs. Display warning only when debug level > 3
3737
1.3.2 K Hoang 09/05/2022 Remove crashing PIN_D24 from examples
38+
1.3.3 K Hoang 16/06/2022 Add support to new Adafruit boards
3839
*****************************************************************************************************************************/
3940

4041
#pragma once
@@ -55,13 +56,13 @@
5556
#endif
5657

5758
#ifndef ESP32_PWM_VERSION
58-
#define ESP32_PWM_VERSION "ESP32_PWM v1.3.2"
59+
#define ESP32_PWM_VERSION "ESP32_PWM v1.3.3"
5960

6061
#define ESP32_PWM_VERSION_MAJOR 1
6162
#define ESP32_PWM_VERSION_MINOR 3
62-
#define ESP32_PWM_VERSION_PATCH 2
63+
#define ESP32_PWM_VERSION_PATCH 3
6364

64-
#define ESP32_PWM_VERSION_INT 1003002
65+
#define ESP32_PWM_VERSION_INT 1003003
6566
#endif
6667

6768
#ifndef _PWM_LOGLEVEL_

0 commit comments

Comments
 (0)