Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UIT2_MovingAverage UIT2_AllpassReverb UIT2_CombReverb UIT2_FIR_LPF_Symmetry ... more
Diff: ScfClockTim3.hpp
- Revision:
- 0:6e0ed5adfe47
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ScfClockTim3.hpp Mon Oct 20 03:01:11 2014 +0000
@@ -0,0 +1,24 @@
+//--------------------------------------------------------
+// Clock generator for SCF using PwmOut class
+// Output pin: D9 (PC7) ------ TIM3 CH2
+// 2014/09/30, Copyright (c) 2014 MIKAMI, Naoki
+//--------------------------------------------------------
+
+#ifndef SCF_CLOCK_TIM3_HPP
+#define SCF_CLOCK_TIM3_HPP
+
+#include "mbed.h"
+
+namespace Mikami
+{
+ void ScfClockTim3(uint32_t clock)
+ {
+ PwmOut clockSCF_(D9);
+
+ TIM3->ARR = SystemCoreClock/clock - 1;
+ TIM3->PSC = 0;
+ // Set capture/compare register 2
+ TIM3->CCR2 = (TIM3->ARR + 1)/2;
+ }
+}
+#endif // SCF_CLOCK_TIM3_HPP
\ No newline at end of file