Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mcuconf.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #ifndef _MCUCONF_H_
  14. #define _MCUCONF_H_
  15. #define KL2x_MCUCONF
  16. /*
  17. * HAL driver system settings.
  18. */
  19. #if 1
  20. /* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */
  21. #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE
  22. #define KINETIS_PLLCLK_FREQUENCY 96000000UL
  23. #define KINETIS_SYSCLK_FREQUENCY 48000000UL
  24. #endif
  25. #if 0
  26. /* crystal-less FEI mode - 48 MHz with internal 32.768 kHz crystal */
  27. #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI
  28. #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */
  29. #define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */
  30. #define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */
  31. #define KINETIS_CLKDIV1_OUTDIV1 1 /* do not divide system clock */
  32. #endif
  33. /*
  34. * SERIAL driver system settings.
  35. */
  36. #define KINETIS_SERIAL_USE_UART0 TRUE
  37. /*
  38. * USB driver settings
  39. */
  40. #define KINETIS_USB_USE_USB0 TRUE
  41. /* Need to redefine this, since the default is for K20x */
  42. /* This is for Teensy LC; you should comment it out (or change to 5)
  43. * for Teensy 3.x */
  44. #define KINETIS_USB_USB0_IRQ_PRIORITY 2
  45. #endif /* _MCUCONF_H_ */