Skip to content

Commit bf79906

Browse files
committed
docs: Added supported frequencies values.
Signed-off-by: MDin <[email protected]>
1 parent 2d744ba commit bf79906

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/arduino-deviations.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ The default for XMC1xxx is 4 with a change XMC4xxxx should be 16
7474

7575
Tone has frequency range of maximum = 500 Hz minimum = 1 Hz
7676

77+
Due to the Systick periodicity, only discrete frequencies are supported as listed below:
78+
[1, 2, 4, 5, 10, 20, 25, 50, 100, 125, 250, 500]
79+
7780
This is due to the fact that the tone frequency is software derived from the Systick handler, Systick has a time period of 1 ms. At maximum each handler event for Systick toggles a GPIO pin, so at minimum period of 1 ms the output is toggled, so TWO events produce one square wave cycle, therefore the maximum output frequency is 500Hz.
7881

7982
The minimum is due to the fact that tone function only accepts an unsigned integer (32 bit) for the frequency, so the minimum usable frequency is 1.

0 commit comments

Comments
 (0)