|
14 | 14 | * [Why do we need this NRF52_MBED_TimerInterrupt library](#why-do-we-need-this-nrf52_mbed_timerinterrupt-library)
|
15 | 15 | * [Features](#features)
|
16 | 16 | * [Why using ISR-based Hardware Timer Interrupt is better](#why-using-isr-based-hardware-timer-interrupt-is-better)
|
| 17 | + * [Important notes about NRF_TIMER_1](#important-notes-about-nrf_timer_1) |
17 | 18 | * [Currently supported Boards](#currently-supported-boards)
|
18 | 19 | * [Important Notes about ISR](#important-notes-about-isr)
|
19 |
| -* [Changelog](#changelog) |
20 |
| - * [Releases v1.2.1](#releases-v121) |
21 |
| - * [Releases v1.2.0](#releases-v120) |
22 |
| - * [Releases v1.1.1](#releases-v111) |
23 |
| - * [Releases v1.0.2](#releases-v102) |
24 |
| - * [Releases v1.0.1](#releases-v101) |
25 | 20 | * [Prerequisites](#prerequisites)
|
26 | 21 | * [Installation](#installation)
|
27 | 22 | * [Use Arduino Library Manager](#use-arduino-library-manager)
|
|
63 | 58 | * [5. Change_Interval on Arduino Nano_33_BLE](#5-change_interval-on-arduino-nano_33_ble)
|
64 | 59 | * [Debug](#debug)
|
65 | 60 | * [Troubleshooting](#troubleshooting)
|
66 |
| -* [Releases](#releases) |
67 | 61 | * [Issues](#issues)
|
68 | 62 | * [TO DO](#to-do)
|
69 | 63 | * [DONE](#done)
|
@@ -114,6 +108,21 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
|
114 | 108 |
|
115 | 109 | [**HOWTO Attach Interrupt**](https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/)
|
116 | 110 |
|
| 111 | + |
| 112 | +### Important notes about NRF_TIMER_1 |
| 113 | + |
| 114 | +- Starting from core mbed_nano core v2.0.0+, NRF_TIMER_1 stops working. |
| 115 | + |
| 116 | +``` |
| 117 | +// For core mbed core 1.3.2- |
| 118 | +// Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_1,NRF_TIMER_3,NRF_TIMER_4 (1,3 and 4) |
| 119 | +// If you select the already-used NRF_TIMER_0 or NRF_TIMER_2, it'll be auto modified to use NRF_TIMER_1 |
| 120 | +
|
| 121 | +// For core mbed core 2.0.0- |
| 122 | +// Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_3,NRF_TIMER_4 (3 and 4) |
| 123 | +// If you select the already-used NRF_TIMER_0, NRF_TIMER_1 or NRF_TIMER_2, it'll be auto modified to use NRF_TIMER_3 |
| 124 | +``` |
| 125 | + |
117 | 126 | ---
|
118 | 127 |
|
119 | 128 | ### Currently supported Boards
|
@@ -145,45 +154,16 @@ mbed_portenta: Portenta H7
|
145 | 154 | The mbed architecture should be retained for backwards support, but the new mbed_nano should also be added to avoid spurious incompatibility warnings and the library's examples being shown under the File > Examples > INCOMPATIBLE menu of the Arduino IDE when the Nano 33 BLE board is selected.
|
146 | 155 | ```
|
147 | 156 |
|
148 |
| ---- |
149 |
| ---- |
150 |
| - |
151 |
| -## Changelog |
152 |
| - |
153 |
| -### Releases v1.2.1 |
154 |
| - |
155 |
| -1. Add **mbed_nano** to list of compatible architectures. For more info, Check [Add mbed_nano to list of compatible architectures #3](https://github.com/khoih-prog/NRF52_MBED_TimerInterrupt/pull/3). |
156 |
| - |
157 |
| - |
158 |
| -### Releases v1.2.0 |
159 |
| - |
160 |
| -1. Add better debug feature. |
161 |
| -2. Optimize code and examples to reduce RAM usage |
162 |
| -3. Add Table of Contents |
163 |
| - |
164 |
| -### Releases v1.1.1 |
165 |
| - |
166 |
| -1. Add example [**Change_Interval**](examples/Change_Interval) |
167 |
| -2. Bump up version to sync with other TimerInterrupt Libraries. Modify Version String. |
168 |
| - |
169 |
| -### Releases v1.0.2 |
170 |
| - |
171 |
| -1. Add example [**ISR_16_Timers_Array_Complex**](examples/ISR_16_Timers_Array_Complex) and optimize example [**ISR_16_Timers_Array**](examples/ISR_16_Timers_Array) |
172 |
| - |
173 |
| -### Releases v1.0.1 |
174 |
| - |
175 |
| -1. Initial coding for Nano-33-BLE and sync with [**NRF52_TimerInterrupt Library**](https://github.com/khoih-prog/NRF52_TimerInterrupt) |
176 |
| - |
177 |
| - |
178 | 157 | ---
|
179 | 158 | ---
|
180 | 159 |
|
181 | 160 | ## Prerequisites
|
182 | 161 |
|
183 |
| - 1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software) |
184 |
| - 2. [`Arduino mbed core v1.3.2+`](https://github.com/arduino/ArduinoCore-mbed) for NRF52-based board using mbed-RTOS such as Nano-33-BLE. [](https://github.com/arduino/ArduinoCore-mbed/releases/latest) |
185 |
| - 3. To use with certain examples |
186 |
| - - [`SimpleTimer library`](https://github.com/schinken/SimpleTimer) for [ISR_16_Timers_Array example](examples/ISR_16_Timers_Array). |
| 162 | + 1. [`Arduino IDE 1.8.16+` for Arduino](https://www.arduino.cc/en/Main/Software) |
| 163 | + 2. [`Arduino mbed core v1.3.2-`](https://github.com/arduino/ArduinoCore-mbed) for NRF52-based board using mbed-RTOS such as Nano-33-BLE if you'd like to use `NRF_TIMER_1`. [](https://github.com/arduino/ArduinoCore-mbed/release s/latest) |
| 164 | + 3. [`Arduino mbed_nano core 2.4.1+`](https://github.com/arduino/ArduinoCore-mbed) for NRF52-based board using mbed-RTOS such as Nano-33-BLE if you don't use `NRF_TIMER_1`. [](https://github.com/arduino/ArduinoCore-mbed/releases/latest) |
| 165 | + 4. To use with certain examples |
| 166 | + - [`SimpleTimer library`](https://github.com/jfturcot/SimpleTimer) for [ISR_16_Timers_Array example](examples/ISR_16_Timers_Array). |
187 | 167 |
|
188 | 168 | ---
|
189 | 169 | ---
|
@@ -329,9 +309,14 @@ Before using any Timer, you have to make sure the Timer has not been used by any
|
329 | 309 | #### 1.1 Init Hardware Timer
|
330 | 310 |
|
331 | 311 | ```
|
| 312 | +// For core mbed core 1.3.2- |
332 | 313 | // Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_1,NRF_TIMER_3,NRF_TIMER_4 (1,3 and 4)
|
333 | 314 | // If you select the already-used NRF_TIMER_0 or NRF_TIMER_2, it'll be auto modified to use NRF_TIMER_1
|
334 | 315 |
|
| 316 | +// For core mbed core 2.0.0- |
| 317 | +// Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_3,NRF_TIMER_4 (3 and 4) |
| 318 | +// If you select the already-used NRF_TIMER_0, NRF_TIMER_1 or NRF_TIMER_2, it'll be auto modified to use NRF_TIMER_3 |
| 319 | +
|
335 | 320 | // Init NRF52 timer NRF_TIMER3
|
336 | 321 | NRF52_MBED_Timer ITimer(NRF_TIMER_3);
|
337 | 322 | ```
|
@@ -421,9 +406,14 @@ The 16 ISR_based Timers, designed for long timer intervals, only support using *
|
421 | 406 | ### 2.2 Init Hardware Timer and ISR-based Timer
|
422 | 407 |
|
423 | 408 | ```
|
| 409 | +// For core mbed core 1.3.2- |
424 | 410 | // Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_1,NRF_TIMER_3,NRF_TIMER_4 (1,3 and 4)
|
425 | 411 | // If you select the already-used NRF_TIMER_0 or NRF_TIMER_2, it'll be auto modified to use NRF_TIMER_1
|
426 | 412 |
|
| 413 | +// For core mbed core 2.0.0- |
| 414 | +// Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_3,NRF_TIMER_4 (3 and 4) |
| 415 | +// If you select the already-used NRF_TIMER_0, NRF_TIMER_1 or NRF_TIMER_2, it'll be auto modified to use NRF_TIMER_3 |
| 416 | +
|
427 | 417 | // Init NRF52 timer NRF_TIMER3
|
428 | 418 | NRF52_MBED_Timer ITimer(NRF_TIMER_3);
|
429 | 419 |
|
@@ -545,9 +535,14 @@ void setup()
|
545 | 535 |
|
546 | 536 | volatile uint32_t startMillis = 0;
|
547 | 537 |
|
| 538 | +// For core mbed core 1.3.2- |
548 | 539 | // Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_1,NRF_TIMER_3,NRF_TIMER_4 (1,3 and 4)
|
549 | 540 | // If you select the already-used NRF_TIMER_0 or NRF_TIMER_2, it'll be auto modified to use NRF_TIMER_1
|
550 | 541 |
|
| 542 | +// For core mbed core 2.0.0- |
| 543 | +// Depending on the board, you can select NRF52 Hardware Timer from NRF_TIMER_3,NRF_TIMER_4 (3 and 4) |
| 544 | +// If you select the already-used NRF_TIMER_0, NRF_TIMER_1 or NRF_TIMER_2, it'll be auto modified to use NRF_TIMER_3 |
| 545 | +
|
551 | 546 | // Init NRF52 timer NRF_TIMER3
|
552 | 547 | NRF52_MBED_Timer ITimer(NRF_TIMER_3);
|
553 | 548 |
|
@@ -852,7 +847,7 @@ While software timer, **programmed for 2s, is activated after more than 3.000s i
|
852 | 847 |
|
853 | 848 | ```
|
854 | 849 | Starting ISR_16_Timers_Array_Complex on Nano 33 BLE
|
855 |
| -NRF52_MBED_TimerInterrupt v1.2.1 |
| 850 | +NRF52_MBED_TimerInterrupt v1.3.0 |
856 | 851 | NRF52_MBED_TimerInterrupt: Timer = NRF_TIMER3
|
857 | 852 | NRF52_MBED_TimerInterrupt: _fre = 1000000.00, _count = 10000
|
858 | 853 | Starting ITimer OK, millis() = 714
|
@@ -1326,7 +1321,7 @@ The following is the sample terminal output when running example [**TimerInterru
|
1326 | 1321 |
|
1327 | 1322 | ```
|
1328 | 1323 | Starting TimerInterruptTest on Nano 33 BLE
|
1329 |
| -NRF52_MBED_TimerInterrupt v1.2.1 |
| 1324 | +NRF52_MBED_TimerInterrupt v1.3.0 |
1330 | 1325 | NRF52_MBED_TimerInterrupt: Timer = NRF_TIMER3
|
1331 | 1326 | NRF52_MBED_TimerInterrupt: _fre = 1000000.00, _count = 1000000
|
1332 | 1327 | Starting ITimer0 OK, millis() = 5660
|
@@ -1359,7 +1354,7 @@ The following is the sample terminal output when running example [**Argument_Non
|
1359 | 1354 |
|
1360 | 1355 | ```
|
1361 | 1356 | Starting Argument_None on Nano 33 BLE
|
1362 |
| -NRF52_MBED_TimerInterrupt v1.2.1 |
| 1357 | +NRF52_MBED_TimerInterrupt v1.3.0 |
1363 | 1358 | NRF52_MBED_TimerInterrupt: Timer = NRF_TIMER1
|
1364 | 1359 | NRF52_MBED_TimerInterrupt: _fre = 1000000.00, _count = 500000
|
1365 | 1360 | Starting ITimer0 OK, millis() = 1519
|
@@ -1387,7 +1382,7 @@ The following is the sample terminal output when running example [FakeAnalogWrit
|
1387 | 1382 |
|
1388 | 1383 | ```
|
1389 | 1384 | Starting FakeAnalogWrite on Nano 33 BLE
|
1390 |
| -NRF52_MBED_TimerInterrupt v1.2.1 |
| 1385 | +NRF52_MBED_TimerInterrupt v1.3.0 |
1391 | 1386 | NRF52_MBED_TimerInterrupt: Timer = NRF_TIMER3
|
1392 | 1387 | NRF52_MBED_TimerInterrupt: _fre = 1000000.00, _count = 100
|
1393 | 1388 | Starting ITimer OK, millis() = 1811
|
@@ -1492,7 +1487,7 @@ The following is the sample terminal output when running example [Change_Interva
|
1492 | 1487 |
|
1493 | 1488 | ```
|
1494 | 1489 | Starting Change_Interval on Nano 33 BLE
|
1495 |
| -NRF52_MBED_TimerInterrupt v1.2.1 |
| 1490 | +NRF52_MBED_TimerInterrupt v1.3.0 |
1496 | 1491 | Starting ITimer0 OK, millis() = 801
|
1497 | 1492 | Starting ITimer1 OK, millis() = 805
|
1498 | 1493 | Time = 10001, Timer0Count = 18, , Timer1Count = 4
|
@@ -1548,33 +1543,6 @@ Sometimes, the library will only work if you update the board core to the latest
|
1548 | 1543 | ---
|
1549 | 1544 | ---
|
1550 | 1545 |
|
1551 |
| -## Releases |
1552 |
| - |
1553 |
| -### Releases v1.2.1 |
1554 |
| - |
1555 |
| -1. Add **mbed_nano** to list of compatible architectures. For more info, Check PR [Add mbed_nano to list of compatible architectures #3](https://github.com/khoih-prog/NRF52_MBED_TimerInterrupt/pull/3). |
1556 |
| - |
1557 |
| -### Releases v1.2.0 |
1558 |
| - |
1559 |
| -1. Add better debug feature. |
1560 |
| -2. Optimize code and examples to reduce RAM usage |
1561 |
| -3. Add Table of Contents |
1562 |
| - |
1563 |
| -### Releases v1.1.1 |
1564 |
| - |
1565 |
| -1. Add example [**Change_Interval**](examples/Change_Interval) |
1566 |
| -2. Bump up version to sync with other TimerInterrupt Libraries. Modify Version String. |
1567 |
| - |
1568 |
| -### Releases v1.0.2 |
1569 |
| - |
1570 |
| -1. Add example [ISR_16_Timers_Array_Complex](examples/ISR_16_Timers_Array_Complex) and optimize example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) |
1571 |
| - |
1572 |
| -### Releases v1.0.1 |
1573 |
| - |
1574 |
| -1. Initial coding for Nano-33-BLE and sync with [**NRF52_TimerInterrupt Library**](https://github.com/khoih-prog/NRF52_TimerInterrupt) |
1575 |
| - |
1576 |
| ---- |
1577 |
| - |
1578 | 1546 | #### Supported Boards
|
1579 | 1547 |
|
1580 | 1548 | - **Arduino Nano-33-BLE**
|
|
0 commit comments