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