Skip to content

Commit

Permalink
Fixed the firmware to use a more stable clock
Browse files Browse the repository at this point in the history
I have no need for the external crystal and from scope measurements I
saw that it was incredibly bad looking. I may have damaged the crystal
and I was getting intermittent behavior from the microcontroller,
especially once I started sending LED commands over SPI.
  • Loading branch information
kcuzner committed Dec 16, 2018
1 parent af87ff3 commit 101b9f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kl2-ws2811/src/main.c
Expand Up @@ -25,9 +25,9 @@ int main(void)
SIM_SOPT2 |= SIM_SOPT2_CLKOUTSEL(2);
PORTC_PCR3 = PORT_PCR_MUX(5);*/

// Set the PLL to 96MHz (divided by 2 for the 48MHz system clock and
// by 2 again for the 24MHz bus clock).
osc_set_pll(96000000, 1, 1);
// Use the internal FLL. The circuit on my board for the external crystal
// is badly designed and I believe its unstable.
osc_set_fll(OSC_FLL_48MHZ, 0, 1);

// Select the PLL for the USB clock source

Expand Down

0 comments on commit 101b9f5

Please sign in to comment.