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
ScfClockTim3.hpp
- Committer:
- MikamiUitOpen
- Date:
- 2014-10-20
- Revision:
- 0:6e0ed5adfe47
File content as of revision 0:6e0ed5adfe47:
//--------------------------------------------------------
// 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