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

Commit d26fe91

Browse files
authored
v1.3.0 to work with ESP32 core v2.0.1+
### Releases v1.3.0 1. Fix breaking issue caused by **ESP32 core v2.0.1+** by increasing `TIMER_INTERVAL_MICRO` to `12uS` from `10uS`. Tested OK with ESP32 core v2.0.3 now
1 parent 7ae4e47 commit d26fe91

File tree

12 files changed

+46
-26
lines changed

12 files changed

+46
-26
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ 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)
18+
* `ESP32` Core Version (e.g. ESP32 core v2.0.3)
1919
* `ESP32` Board type (e.g. ESP32_DEV Module, etc.)
2020
* `ESP32-S2` Board type (e.g. ESP32S2_DEV Module, ESP32_S2_Saola, etc.)
2121
* `ESP32_S3` Board type (e.g. ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.)
@@ -31,10 +31,10 @@ Please ensure to specify the following:
3131

3232
```
3333
Arduino IDE version: 1.8.19
34-
ESP32 core v2.0.2
34+
ESP32 core v2.0.3
3535
ESP32S3_DEV Module
36-
OS: Ubuntu 21.04 LTS
37-
Linux kh-Inspiron-3593 5.13.0-30-generic #33-Ubuntu SMP Fri Feb 4 17:03:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
36+
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
3838
3939
Context:
4040
I encountered a crash while trying to use the Timer Interrupt.
@@ -54,3 +54,4 @@ There are usually some outstanding feature requests in the [existing issues list
5454
### Sending Pull Requests
5555

5656
Pull Requests with changes and fixes are also welcome!
57+

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
## Table of Contents
1616

17+
* [Important Change from v1.3.0](#Important-Change-from-v130)
1718
* [Important Change from v1.2.0](#Important-Change-from-v120)
1819
* [Why do we need this ESP32_ISR_Servo library](#why-do-we-need-this-esp32_isr_servo-library)
1920
* [Features](#features)
@@ -62,6 +63,10 @@
6263
---
6364
---
6465

66+
### Important Change from v1.3.0
67+
68+
Please use the **new v1.3.0+** for **ESP32 core v2.0.1+**, or the library won't work anymore.
69+
6570
### Important Change from v1.2.0
6671

6772
Please have a look at [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error)
@@ -116,7 +121,7 @@ This [**ESP32_ISR_Servo** library](https://github.com/khoih-prog/ESP32_ISR_Servo
116121
## Prerequisites
117122

118123
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)
119-
2. [`ESP32 Core 2.0.2+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
124+
2. [`ESP32 Core 2.0.3+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
120125

121126
---
122127
---
@@ -395,7 +400,7 @@ https://github.com/khoih-prog/ESP32_ISR_Servo/blob/60aa83a0db13a348f29ae84f53616
395400

396401
```
397402
Starting ESP32_MultipleRandomServos on ESP32_DEV
398-
ESP32_ISR_Servo v1.2.1
403+
ESP32_ISR_Servo v1.3.0
399404
Setup OK Servo index = 0
400405
Setup OK Servo index = 1
401406
Setup OK Servo index = 2
@@ -457,7 +462,7 @@ Servos idx = 5, act. pos. (deg) = 180, pulseWidth (us) = 2450
457462

458463
```
459464
Starting ESP32_ISR_MultiServos on ESP32_DEV
460-
ESP32_ISR_Servo v1.2.1
465+
ESP32_ISR_Servo v1.3.0
461466
Setup Servo1 OK
462467
Setup Servo2 OK
463468
Servo1 pos = 0, Servo2 pos = 180
@@ -502,7 +507,7 @@ Servo1 pos = 150, Servo2 pos = 30
502507

503508
```
504509
Starting MultipleRandomServos on ESP32S3_DEV
505-
ESP32_ISR_Servo v1.2.1
510+
ESP32_ISR_Servo v1.3.0
506511
[ISR_SERVO] ESP32_S3_TimerInterrupt: _timerNo = 3 , _fre = 1000000
507512
[ISR_SERVO] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
508513
[ISR_SERVO] _timerIndex = 1 , _timerGroup = 1
@@ -596,7 +601,7 @@ Servos idx = 3, act. pos. (deg) = [ISR_SERVO] Idx = 3
596601

597602
```
598603
Starting ESP32_ISR_MultiServos on ESP32S2_DEV
599-
ESP32_ISR_Servo v1.2.1
604+
ESP32_ISR_Servo v1.3.0
600605
[ISR_SERVO] ESP32_S2_TimerInterrupt: _timerNo = 3 , _fre = 1000000
601606
[ISR_SERVO] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
602607
[ISR_SERVO] _timerIndex = 1 , _timerGroup = 1
@@ -681,7 +686,7 @@ Submit issues to: [ESP32_ISR_Servo issues](https://github.com/khoih-prog/ESP32_I
681686
9. Optimize library code by using `reference-passing` instead of `value-passing`
682687
10. Improve accuracy by using `float`, instead of `uint32_t` for `position` in degrees
683688
11. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project
684-
689+
12. Fix breaking issue caused by **ESP32 core v2.0.1+** by increasing `TIMER_INTERVAL_MICRO` to `12uS` from `10uS`
685690

686691
---
687692
---
@@ -718,3 +723,4 @@ If you want to contribute to this project:
718723
## Copyright
719724

720725
Copyright 2019- Khoi Hoang
726+

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.0](#releases-v130)
1516
* [Releases v1.2.1](#releases-v121)
1617
* [Releases v1.2.0](#releases-v120)
1718
* [Releases v1.1.0](#releases-v110)
@@ -23,6 +24,10 @@
2324

2425
## Changelog
2526

27+
### Releases v1.3.0
28+
29+
1. Fix breaking issue caused by **ESP32 core v2.0.1+** by increasing `TIMER_INTERVAL_MICRO` to `12uS` from `10uS`. Tested OK with ESP32 core v2.0.3 now
30+
2631
### Releases v1.2.1
2732

2833
1. Fix bug

examples/ESP32_ISR_MultiServos/ESP32_ISR_MultiServos.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void setup()
149149
//Select ESP32 timer USE_ESP32_TIMER_NO
150150
ESP32_ISR_Servos.useTimer(USE_ESP32_TIMER_NO);
151151

152-
servoIndex1 = ESP32_ISR_Servos.setupServo(PIN_D3, MIN_MICROS, MAX_MICROS);
152+
servoIndex1 = ESP32_ISR_Servos.setupServo(PIN_D2, MIN_MICROS, MAX_MICROS);
153153
servoIndex2 = ESP32_ISR_Servos.setupServo(PIN_D4, MIN_MICROS, MAX_MICROS);
154154

155155
if (servoIndex1 != -1)

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "ESP32_ISR_Servo",
3-
"version": "1.2.1",
3+
"version": "1.3.0",
44
"keywords": "timer, interrupt, isr, hardware, servo, isr-based-servo, servo-control, esp32, esp32-s2, esp32-s3, esp32-c3, mission-critical, precise, non-blocking",
5-
"description": "This library enables you to use 1 Hardware Timer on an ESP32-based board to control up to 16 or more servo motors. Now supporting ESP32, ESP32_S2, ESP32_S3, ESP32_C3-based boards",
5+
"description": "This library enables you to use 1 Hardware Timer on an ESP32-based board to control up to 16 or more servo motors. Now supporting ESP32, ESP32_S2, ESP32_S3, ESP32_C3-based boards. Tested OK with ESP32 core v2.0.3",
66
"authors":
77
{
88
"name": "Khoi Hoang",

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name=ESP32_ISR_Servo
2-
version=1.2.1
2+
version=1.3.0
33
author=Khoi Hoang
44
maintainer=Khoi Hoang <[email protected]>
55
license=MIT
66
sentence=This library enables you to use Interrupt from Hardware Timers on an ESP32 board to control multiple servo motors.
7-
paragraph=This library enables you to use 1 Hardware Timer on an ESP32-based board to control 16 or more servo motors. Now supporting ESP32, ESP32_S2, ESP32_S3, ESP32_C3-based boards
7+
paragraph=This library enables you to use 1 Hardware Timer on an ESP32-based board to control 16 or more servo motors. Now supporting ESP32, ESP32_S2, ESP32_S3, ESP32_C3-based boards. Tested OK with ESP32 core v2.0.3
88
category=Device Control
99
url=https://github.com/khoih-prog/ESP32_ISR_Servo
1010
architectures=esp32

platformio/platformio.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ upload_speed = 921600
3131

3232
; Checks for the compatibility with frameworks and dev/platforms
3333
lib_compat_mode = strict
34+
lib_ldf_mode = chain+
35+
;lib_ldf_mode = deep+
3436

3537
lib_deps =
3638

src/ESP32FastTimerInterrupt.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Therefore, their executions are not blocked by bad-behaving functions / tasks.
1313
This important feature is absolutely necessary for mission-critical tasks.
1414
15-
Version: 1.2.1
15+
Version: 1.3.0
1616
1717
Version Modified By Date Comments
1818
------- ----------- ---------- -----------
@@ -22,6 +22,7 @@
2222
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
2323
1.2.0 K Hoang 06/03/2022 Convert to `h-only` style. Optimize code by using passing by `reference`
2424
1.2.1 K Hoang 07/03/2022 Fix bug
25+
1.3.0 K Hoang 08/05/2022 Fix issue with ESP32 core v2.0.1+
2526
*****************************************************************************************************************************/
2627

2728
#pragma once

src/ESP32_ISR_Servo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Therefore, their executions are not blocked by bad-behaving functions / tasks.
1212
This important feature is absolutely necessary for mission-critical tasks.
1313
14-
Version: 1.2.1
14+
Version: 1.3.0
1515
1616
Version Modified By Date Comments
1717
------- ----------- ---------- -----------
@@ -21,6 +21,7 @@
2121
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
2222
1.2.0 K Hoang 06/03/2022 Convert to `h-only` style. Optimize code by using passing by `reference`
2323
1.2.1 K Hoang 07/03/2022 Fix bug
24+
1.3.0 K Hoang 08/05/2022 Fix issue with ESP32 core v2.0.1+
2425
*****************************************************************************************************************************/
2526

2627
#pragma once

src/ESP32_ISR_Servo.hpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Therefore, their executions are not blocked by bad-behaving functions / tasks.
1212
This important feature is absolutely necessary for mission-critical tasks.
1313
14-
Version: 1.2.1
14+
Version: 1.3.0
1515
1616
Version Modified By Date Comments
1717
------- ----------- ---------- -----------
@@ -21,6 +21,7 @@
2121
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
2222
1.2.0 K Hoang 06/03/2022 Convert to `h-only` style. Optimize code by using passing by `reference`
2323
1.2.1 K Hoang 07/03/2022 Fix bug
24+
1.3.0 K Hoang 08/05/2022 Fix issue with ESP32 core v2.0.1+
2425
*****************************************************************************************************************************/
2526

2627
#pragma once
@@ -44,13 +45,13 @@
4445
#endif
4546

4647
#if !defined(ESP32_ISR_SERVO_VERSION)
47-
#define ESP32_ISR_SERVO_VERSION "ESP32_ISR_Servo v1.2.1"
48+
#define ESP32_ISR_SERVO_VERSION "ESP32_ISR_Servo v1.3.0"
4849

4950
#define ESP32_ISR_SERVO_VERSION_MAJOR 1
50-
#define ESP32_ISR_SERVO_VERSION_MINOR 2
51-
#define ESP32_ISR_SERVO_VERSION_PATCH 1
51+
#define ESP32_ISR_SERVO_VERSION_MINOR 3
52+
#define ESP32_ISR_SERVO_VERSION_PATCH 0
5253

53-
#define ESP32_ISR_SERVO_VERSION_INT 1002001
54+
#define ESP32_ISR_SERVO_VERSION_INT 1003000
5455

5556
#endif
5657

@@ -176,8 +177,9 @@ class ESP32_ISR_Servo
176177

177178
private:
178179

179-
// Use 10 microsecs timer, just fine enough to control Servo, normally requiring pulse width (PWM) 500-2000us in 20ms.
180-
#define TIMER_INTERVAL_MICRO 10
180+
// Use 10 microsecs timer => not working from core v2.0.1+
181+
// Use 12 microsecs timer now, just fine enough to control Servo, normally requiring pulse width (PWM) 500-2000us in 20ms.
182+
#define TIMER_INTERVAL_MICRO 12
181183

182184
void init()
183185
{

0 commit comments

Comments
 (0)