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.

README.md 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. KL27Z128/256 board
  2. ==================
  3. 2016/11/30
  4. KL27Z is configured to use internal 48MHz RC oscillator.
  5. The board has push button on PTA4 and LED on PTD7. The button works as 'a' key and the LED as an indicator for capslock.
  6. ELF board
  7. ---------
  8. ### prototypte pinout
  9. - pcb layout https://deskthority.net/resources/image/33293
  10. - schematic https://deskthority.net/resources/image/33252
  11. 39 ..... 44 \ conn / 1 ..... 6
  12. 38 |______| LED 7
  13. : Rst :
  14. : :
  15. 32 Bl 13
  16. 31 .........24 23............ 14
  17. 1 PTD6 12 PTC3 23 GND 34 PTE20
  18. 2 PTD5 13 PTC2 24 PTA18 35 PTA20 Reset
  19. 3 PTD4 14 PTC1 25 3.3V 36 PTA3 SWD_DIO
  20. 4 PTD3 15 PTC0 26 NMI 37 PTA0 SWD_CLK
  21. 5 PTD2 16 PTB17 27 PTA2 38 3.3V
  22. 6 PTD1 17 PTB16 28 PTA1 39 GND
  23. 7 PTD0 18 PTB3 29 PTE25 40 VBUS VREGIN
  24. 8 PTC7 19 PTB2 30 PTE24 41 USB D-
  25. 9 PTC6 20 PTB1 31 PTE30 42 USB D+
  26. 10 PTC5 21 PTB0 32 PTE29 43 GND
  27. 11 PTC4 22 PTA19 33 PTE21 44 USB Shield
  28. ### ROM bootloader pins
  29. See Reference Manual Chapter 13.
  30. PTA2 LPUART0_TX
  31. PTA1 LPUART0_RX *
  32. PTB0 I2C0_SCL
  33. PTB1 I2C0_SDA
  34. PTC4 SPI0_SS_b *
  35. PTC7 SPI0_MISO
  36. PTC6 SPI0_MOSI
  37. PTC5 SPI0_SCK *
  38. Due to errata e9457, need to pull-up `SPI0_SS_b`(or `SPI0_SCK`) to prevent false detection of SPI.
  39. The errata doesn't refer UART though, `LPUART0_RX` also requires pull-up or down resisitor from experience.
  40. Without resistor it easily false-detects activity on UART interface with finger touch on the pin.
  41. Resources
  42. ---------
  43. ### Deskthority thread
  44. https://deskthority.net/workshop-f7/can-we-design-the-teensy-alternative-for-keyboards-t13662-510.html
  45. ### Kinetis KL2x
  46. http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/l-series-ultra-low-power-m0-plus/kinetis-kl2x-48-mhz-usb-ultra-low-power-microcontrollers-based-on-arm-cortex-m0-plus:KL2x
  47. ### KL27Z128/256 Data Sheet
  48. http://www.nxp.com/assets/documents/data/en/data-sheets/KL27P64M48SF6.pdf
  49. ### KL27Z128/256 Reference Manual
  50. http://www.nxp.com/assets/documents/data/en/reference-manuals/KL27P64M48SF6RM.pdf
  51. ### Errata
  52. http://www.nxp.com/assets/documents/data/en/errata/KINETIS_L_1N71K.pdf
  53. >>
  54. e9457: Kinetis Flashloader/ ROM Bootloader: The peripheral auto-detect code in
  55. bootloader can falsely detect presence of SPI host causing non-responsive
  56. bootloader
  57. Description: During the active peripheral detection process, the bootloader can interpret spurious data on
  58. the SPI peripheral as valid data. The spurious data causes the bootloader to shutdown all
  59. peripherals except the “falsely detected" SPI and enter the command phase loop using the
  60. SPI. After the bootloader enters the command phase loop using the SPI, the other peripherals
  61. are ignored, so the desired peripheral is no longer active.
  62. The bootloader will not falsely detect activity on the I2C, UART, or USB interfaces, so only the
  63. SPI interface is affected.
  64. Workaround: Ensure that there is an external pull-up on the SPI chip-select pin or that the pin is driven high.
  65. This will prevent the bootloader from seeing spurious data due to activity on the SPI clock pin.
  66. ### Kinetis Bootloader and blhost
  67. http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/kinetis-symbols-footprints-and-models/kinetis-bootloader:KBOOT
  68. Build
  69. -----
  70. make
  71. Program
  72. -------
  73. Flash firmware with ROM bootloader.
  74. blhost -u -- flash-image build/kl27z.hex erase
  75. TODO
  76. ----
  77. - Fix boards/ELF files
  78. - add macro `USBx_CTL_RESUME` to ChibiOS-Contrib/os/common/ext/CMSIS/KINETIS/kl27zxxx.h