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

Commit

Permalink
v1.3.1 to fix warnings in PWM examples
Browse files Browse the repository at this point in the history
### Releases v1.3.1

1. Fix warnings in PWM examples
  • Loading branch information
khoih-prog committed Sep 22, 2021
1 parent 62ebd1f commit eadcaf8
Show file tree
Hide file tree
Showing 37 changed files with 94 additions and 56 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ In this example, 16 independent ISR Timers are used, yet utilized just one Hardw

```
Starting ISR_16_Timers_Array_Complex on PORTENTA_H7_M7
Portenta_H7_TimerInterrupt v1.3.0
Portenta_H7_TimerInterrupt v1.3.1
[TISR] Portenta_H7_TimerInterrupt: Timer Input Freq (Hz) = 200000000
[TISR] Frequency = 1000000.00 , _count = 10000
Starting ITimer OK, millis() = 1111
Expand Down Expand Up @@ -1025,7 +1025,7 @@ The following is the sample terminal output when running example [**TimerInterru

```
Starting TimerInterruptTest on PORTENTA_H7_M7
Portenta_H7_TimerInterrupt v1.3.0
Portenta_H7_TimerInterrupt v1.3.1
[TISR] Portenta_H7_TimerInterrupt: Timer Input Freq (Hz) = 200000000
[TISR] Frequency = 1000000.00 , _count = 1000000
Starting ITimer0 OK, millis() = 1410
Expand All @@ -1051,7 +1051,7 @@ The following is the sample terminal output when running example [**Argument_Non

```
Starting Argument_None on PORTENTA_H7_M7
Portenta_H7_TimerInterrupt v1.3.0
Portenta_H7_TimerInterrupt v1.3.1
[TISR] Portenta_H7_TimerInterrupt: Timer Input Freq (Hz) = 100000000
[TISR] Frequency = 1000000.00 , _count = 1000000
Starting ITimer0 OK, millis() = 1009
Expand All @@ -1071,7 +1071,7 @@ The following is the sample terminal output when running example [Change_Interva

```
Starting Change_Interval on PORTENTA_H7_M7
Portenta_H7_TimerInterrupt v1.3.0
Portenta_H7_TimerInterrupt v1.3.1
[TISR] Portenta_H7_TimerInterrupt: Timer Input Freq (Hz) = 200000000
[TISR] Frequency = 1000000.00 , _count = 500000
Starting Timer0 OK, millis() = 1415
Expand Down Expand Up @@ -1111,7 +1111,7 @@ While software-based `SimpleTimer`, **programmed for 2s, is activated after 10.0

```
Starting ISR_16_Timers_Array on PORTENTA_H7_M7
Portenta_H7_TimerInterrupt v1.3.0
Portenta_H7_TimerInterrupt v1.3.1
[TISR] Portenta_H7_TimerInterrupt: Timer Input Freq (Hz) = 200000000
[TISR] Frequency = 1000000.00 , _count = 100
Starting ITimer OK, millis() = 1109
Expand Down Expand Up @@ -1177,7 +1177,7 @@ The following is the sample terminal output when running new example [PWM_Multi_

```
Starting PWM_Multi_Args on PORTENTA_H7_M7
Portenta_H7_TimerInterrupt v1.3.0
Portenta_H7_TimerInterrupt v1.3.1
Index = 0, Instance = 0x40010000, channel = 3, TimerIndex = 0
Index = 1, Instance = 0x40000800, channel = 1, TimerIndex = 3
Index = 2, Instance = 0x40001400, channel = 2, TimerIndex = 6
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Releases v1.3.1](#Releases-v131)
* [Releases v1.3.0](#Releases-v130)
* [Initial Releases v1.2.1](#Initial-Releases-v121)

Expand All @@ -20,6 +21,10 @@

## Changelog

### Releases v1.3.1

1. Fix warnings in PWM examples

### Releases v1.3.0

1. Add PWM features and examples
Expand Down
3 changes: 2 additions & 1 deletion examples/Argument_None/Argument_None.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

/*
Expand Down
3 changes: 2 additions & 1 deletion examples/Change_Interval/Change_Interval.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

/*
Expand Down
3 changes: 2 additions & 1 deletion examples/ISR_16_Timers_Array/ISR_16_Timers_Array.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/
/*
Notes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/
/*
Notes:
Expand Down
17 changes: 9 additions & 8 deletions examples/PWM/PWM_Multi/PWM_Multi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/
/*
In cores/arduino/stm32/PeripheralPins.h => #define PinMap_PWM PinMap_TIM
Expand Down Expand Up @@ -170,7 +171,7 @@ TIM_TypeDef *TimerInstance[] = { TIM1, TIM4, TIM7, TIM8, TIM12, TIM13, TIM14 };

volatile uint32_t callbackTime[] = { 0, 0, 0, 0, 0, 0, 0 };

callback_function_t PeriodCallback0()
void PeriodCallback0()
{
static bool ledON = LED_OFF;

Expand All @@ -181,7 +182,7 @@ callback_function_t PeriodCallback0()
ledON = !ledON;
}

callback_function_t PeriodCallback1()
void PeriodCallback1()
{
static bool ledON = LED_OFF;

Expand All @@ -192,7 +193,7 @@ callback_function_t PeriodCallback1()
ledON = !ledON;
}

callback_function_t PeriodCallback2()
void PeriodCallback2()
{
static bool ledON = LED_OFF;

Expand All @@ -203,22 +204,22 @@ callback_function_t PeriodCallback2()
ledON = !ledON;
}

callback_function_t PeriodCallback3()
void PeriodCallback3()
{
callbackTime[3]++;
}

callback_function_t PeriodCallback4()
void PeriodCallback4()
{
callbackTime[4]++;
}

callback_function_t PeriodCallback5()
void PeriodCallback5()
{
callbackTime[5]++;
}

callback_function_t PeriodCallback6()
void PeriodCallback6()
{
callbackTime[6]++;
}
Expand Down
3 changes: 2 additions & 1 deletion examples/PWM/PWM_Multi_Args/PWM_Multi_Args.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

/*
Expand Down
3 changes: 2 additions & 1 deletion examples/SwitchDebounce/SwitchDebounce.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/
/*
Notes:
Expand Down
3 changes: 2 additions & 1 deletion examples/TimerInterruptLEDDemo/TimerInterruptLEDDemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

/*
Expand Down
3 changes: 2 additions & 1 deletion examples/TimerInterruptTest/TimerInterruptTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/
/*
Notes:
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Portenta_H7_TimerInterrupt",
"version": "1.3.0",
"version": "1.3.1",
"keywords": "timing, device, control, timer, pwm, interrupt, isr, isr-based, hardware-timer, mission-critical, accuracy, non-blocking, mbed, mbed-portenta, portenta-h7, portentah7, portenta-h7-m7, portenta-h7-m4, portentah7-m7, portentah7-m4, stm32h7, stm32, precise, hardware",
"description": "This library enables you to use Interrupt from Hardware Timers on an STM32H7-based Portenta_H7 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. PWM feature can now be used",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Portenta_H7_TimerInterrupt
version=1.3.0
version=1.3.1
author=Khoi Hoang <khoih.prog@gmail.com>
maintainer=Khoi Hoang <khoih.prog@gmail.com>
sentence=This library enables you to use Interrupt from Hardware Timers on an STM32H7-based Portenta_H7 board. PWM feature can now be used
Expand Down
3 changes: 2 additions & 1 deletion src/Portenta_H7_ISR_Timer-Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

#pragma once
Expand Down
7 changes: 4 additions & 3 deletions src/Portenta_H7_ISR_Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Licensed under MIT license
Now even you use all these new 16 ISR-based timers,with their maximum interval practically unlimited (limited only by
unsigned long miliseconds), you just consume only one Portenta_H7 STM32 timer and avoid conflicting with other cores' tasks.
unsigned long miliseconds), you just consume only one Portenta_H7 STM32 timer and a1void conflicting with other cores' tasks.
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Expand All @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

#pragma once
Expand All @@ -37,7 +38,7 @@
#endif

#ifndef PORTENTA_H7_TIMER_INTERRUPT_VERSION
#define PORTENTA_H7_TIMER_INTERRUPT_VERSION "Portenta_H7_TimerInterrupt v1.3.0"
#define PORTENTA_H7_TIMER_INTERRUPT_VERSION "Portenta_H7_TimerInterrupt v1.3.1"
#endif

#include "TimerInterrupt_Generic_Debug.h"
Expand Down
5 changes: 3 additions & 2 deletions src/Portenta_H7_TimerInterrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

#pragma once
Expand Down Expand Up @@ -52,7 +53,7 @@
#endif

#ifndef PORTENTA_H7_TIMER_INTERRUPT_VERSION
#define PORTENTA_H7_TIMER_INTERRUPT_VERSION "Portenta_H7_TimerInterrupt v1.3.0"
#define PORTENTA_H7_TIMER_INTERRUPT_VERSION "Portenta_H7_TimerInterrupt v1.3.1"
#endif


Expand Down
3 changes: 2 additions & 1 deletion src/TimerInterrupt_Generic_Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/stm32/HardwareTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

// Modified from stm32 core v2.0.0
Expand Down
3 changes: 2 additions & 1 deletion src/stm32/HardwareTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.2.1 K.Hoang 15/09/2021 Initial coding for Portenta_H7
1.3.0 K.Hoang 17/09/2021 Add PWM features and examples
1.3.1 K.Hoang 21/09/2021 Fix warnings in PWM examples
*****************************************************************************************************************************/

// Modified from stm32 core v2.0.0
Expand Down
Loading

0 comments on commit eadcaf8

Please sign in to comment.