Skip to content

Commit

Permalink
added external interrupt example
Browse files Browse the repository at this point in the history
  • Loading branch information
fcayci committed Mar 19, 2017
1 parent 7469fa4 commit 1c4cf72
Show file tree
Hide file tree
Showing 4 changed files with 619 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clock/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,16 @@ void set_system_clock_to_25Mhz(void)

/*
* By default 8 MHz internal clock is used (HSI)
* Set up as 72 MHz
* Set up as 72 MHz (HSE-PLL)
*
* 25M -> /5 -> *8 -> /5 -> *9 -> 72 MHz
* HSE -> PreDiv2 -> Pll2Mul -> PreDiv1 -> PllMul -> System Clock
* Set Prediv1Src = PLL2, Set PllSrc as Prediv1
*
* 25 MHz External clock is selected as the source clock (HSE)
* It is divided by 5 with PreDiv2, then muliplied by 8 with Pll2Mul
* Then it is divided by 5 with PreDiv1, then multiplied by 9 with PllMul
* Then choose Pll as the clock source
*
* 25Mhz / 5 * 8 / 5 * 9 = 72 MHz
*/
void set_system_clock_to_72Mhz(void)
{
Expand Down
Loading

0 comments on commit 1c4cf72

Please sign in to comment.