diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2020-04-18 10:58:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 10:58:59 -0700 |
commit | 7918f7d61d6d3035c9418093623665c9689ab950 (patch) | |
tree | 8f650c985bf8c85b822084451d2e9358c0f0e120 | |
parent | 55b43f02f0f55c3b233bbbd5f3e52eee2c47cc1a (diff) | |
download | qmk_firmware-7918f7d61d6d3035c9418093623665c9689ab950.tar.gz qmk_firmware-7918f7d61d6d3035c9418093623665c9689ab950.zip |
Document the Proton C pins for manual Pro Micro conversion (#7043)
-rw-r--r-- | docs/proton_c_conversion.md | 69 |
1 files changed, 63 insertions, 6 deletions
diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md index dc0a3f484..98f1508a9 100644 --- a/docs/proton_c_conversion.md +++ b/docs/proton_c_conversion.md | |||
@@ -1,5 +1,9 @@ | |||
1 | # Converting a board to use the Proton C | 1 | # Converting a board to use the Proton C |
2 | 2 | ||
3 | Since the Proton C is a drop-in replacement for a Pro Micro we've made it easy to use. This page documents a handy automated process for converting keyboards, as well as documenting the manual process if you'd like to make use of Proton C features that aren't available on Pro Micros. | ||
4 | |||
5 | ## Automatic Conversion | ||
6 | |||
3 | If a board currently supported in QMK uses a Pro Micro (or compatible board) and you want to use the Proton C, you can generate the firmware by appending `CONVERT_TO_PROTON_C=yes` (or `CTPC=yes`) to your make argument, like this: | 7 | If a board currently supported in QMK uses a Pro Micro (or compatible board) and you want to use the Proton C, you can generate the firmware by appending `CONVERT_TO_PROTON_C=yes` (or `CTPC=yes`) to your make argument, like this: |
4 | 8 | ||
5 | make 40percentclub/mf68:default CTPC=yes | 9 | make 40percentclub/mf68:default CTPC=yes |
@@ -8,13 +12,15 @@ You can add the same argument to your keymap's `rules.mk`, which will accomplish | |||
8 | 12 | ||
9 | This exposes the `CONVERT_TO_PROTON_C` flag that you can use in your code with `#ifdef`s, like this: | 13 | This exposes the `CONVERT_TO_PROTON_C` flag that you can use in your code with `#ifdef`s, like this: |
10 | 14 | ||
11 | #ifdef CONVERT_TO_PROTON_C | 15 | ```c |
12 | // Proton C code | 16 | #ifdef CONVERT_TO_PROTON_C |
13 | #else | 17 | // Proton C code |
14 | // Pro Micro code | 18 | #else |
15 | #endif | 19 | // Pro Micro code |
20 | #endif | ||
21 | ``` | ||
16 | 22 | ||
17 | Before being able to compile, you may get some errors about `PORTB/DDRB`, etc not being defined, so you'll need to convert the keyboard's code to use the [GPIO Controls](internals_gpio_control.md) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. | 23 | If you get errors about `PORTB/DDRB`, etc not being defined, so you'll need to convert the keyboard's code to use the [GPIO Controls](internals_gpio_control.md) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. |
18 | 24 | ||
19 | The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is mapped to it. If you want the RXLED (B0) mapped to it instead, add this like to your `config.h`: | 25 | The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is mapped to it. If you want the RXLED (B0) mapped to it instead, add this like to your `config.h`: |
20 | 26 | ||
@@ -31,3 +37,54 @@ These are defaults based on what has been implemented for ARM boards. | |||
31 | | [Backlight](feature_backlight.md) | Forces [task driven PWM](feature_backlight.md#software-pwm-driver) until ARM can provide automatic configuration | | 37 | | [Backlight](feature_backlight.md) | Forces [task driven PWM](feature_backlight.md#software-pwm-driver) until ARM can provide automatic configuration | |
32 | | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | | 38 | | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | |
33 | | [Split keyboards](feature_split_keyboard.md) | Not supported yet | | 39 | | [Split keyboards](feature_split_keyboard.md) | Not supported yet | |
40 | |||
41 | ## Manual Conversion | ||
42 | |||
43 | To use the Proton C natively, without having to specify `CTPC=yes`, you need to change the `MCU` line in `rules.mk`: | ||
44 | |||
45 | ``` | ||
46 | MCU = STM32F303 | ||
47 | ``` | ||
48 | |||
49 | Remove these variables if they exist: | ||
50 | |||
51 | * `BOOTLOADER` | ||
52 | * `EXTRA_FLAGS` | ||
53 | |||
54 | Finally convert all pin assignments in `config.h` to the stm32 equivalents. | ||
55 | |||
56 | | Pro Micro Left | Proton C Left | | Proton C Right | Pro Micro Right | | ||
57 | |-----------|----------|-|----------|-----------| | ||
58 | | `D3` | `A9` | | 5v | RAW (5v) | | ||
59 | | `D2` | `A10` | | GND | GND | | ||
60 | | GND | GND | | FLASH | RESET | | ||
61 | | GND | GND | | 3.3v | VCC <sup>1</sup> | | ||
62 | | `D1` | `B7` | | `A2` | `F4` | | ||
63 | | `D0` | `B6` | | `A1` | `F5` | | ||
64 | | `D4` | `B5` | | `A0` | `F6` | | ||
65 | | `C6` | `B4` | | `B8` | `F7` | | ||
66 | | `D7` | `B3` | | `B13` | `B1` | | ||
67 | | `E6` | `B2` | | `B14` | `B3` | | ||
68 | | `B4` | `B1` | | `B15` | `B2` | | ||
69 | | `B5` | `B0` | | `B9` | `B6` | | ||
70 | | `B0` (RX LED) | `C13` <sup>2</sup> | | `C13` <sup>2</sup> | `D5` (TX LED) | | ||
71 | |||
72 | You can also make use of several new pins on the extended portion of the Proton C: | ||
73 | |||
74 | | Left | | Right | | ||
75 | |------|-|-------| | ||
76 | | `A4`<sup>3</sup> | | `B10` | | ||
77 | | `A5`<sup>4</sup> | | `B11` | | ||
78 | | `A6` | | `B12` | | ||
79 | | `A7` | | `A14`<sup>5</sup> (SWCLK) | | ||
80 | | `A8` | | `A13`<sup>5</sup> (SWDIO) | | ||
81 | | `A15` | | RESET<sup>6</sup> | | ||
82 | |||
83 | Notes: | ||
84 | |||
85 | 1. On a Pro Micro VCC can be 3.3v or 5v. | ||
86 | 2. A Proton C only has one onboard LED, not two like a Pro Micro. The Pro Micro has an RX LED on `D5` and a TX LED on `B0`. | ||
87 | 3. `A4` is shared with the speaker. | ||
88 | 4. `A5` is shared with the speaker. | ||
89 | 5. `A13` and `A14` are used for hardware debugging (SWD). You can also use them for GPIO, but should use them last. | ||
90 | 6. Short RESET to 3.3v (pull high) to reboot the MCU. This does not enter bootloader mode like a Pro Micro, it only resets the MCU. | ||