|
| 1 | +.. _frdm_k82f: |
| 2 | + |
| 3 | +NXP FRDM-K82F |
| 4 | +############## |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The FRDM-K82F is a low-cost development platform for Kinetis K80, K81, |
| 10 | +and K82 MCUs. |
| 11 | + |
| 12 | +- Form-factor compatible with the Arduino R3 pin layout |
| 13 | +- Peripherals enable rapid prototyping, including a six-axis digital |
| 14 | + accelerometer and magnetometer to create full eCompass capabilities, a |
| 15 | + tri-colored LED and two user push-buttons for direct interaction, 2x32 Mb |
| 16 | + QuadSPI external flash, FlexIO camera header, touchpads and headers for use |
| 17 | + with Bluetooth and 2.4 GHz radio add-on modules |
| 18 | +- OpenSDAv2.1, the NXP open source hardware embedded serial and debug adapter |
| 19 | + running an open source bootloader, offers options for serial communication, |
| 20 | + flash programming, and run-control debugging |
| 21 | + |
| 22 | +.. image:: ./frdm_k82f.jpg |
| 23 | + :width: 720px |
| 24 | + :align: center |
| 25 | + :alt: FRDM-K82F |
| 26 | + |
| 27 | +Hardware |
| 28 | +******** |
| 29 | + |
| 30 | +- MK82FN256VLL15 MCU (150 MHz, 256 KB flash memory, 256 KB RAM, low-power, |
| 31 | + crystal-less USB, and 100 Low profile Quad Flat Package (LQFP)) |
| 32 | +- Dual role USB interface with micro-B USB connector |
| 33 | +- RGB LED |
| 34 | +- FXOS8700CQ accelerometer and magnetometer |
| 35 | +- Two user push buttons |
| 36 | +- 2x 32 Mb QSPI flash |
| 37 | +- Flexible power supply option - OpenSDAv2.1 USB, Kinetis K82 USB, and external source |
| 38 | +- Easy access to MCU input/output through Arduino R3 compatible I/O connectors |
| 39 | +- Programmable OpenSDAv2.1 debug circuit supporting the CMSIS-DAP Interface |
| 40 | + software that provides: |
| 41 | + |
| 42 | + - Mass storage device (MSD) flash programming interface |
| 43 | + - CMSIS-DAP debug interface over a driver-less USB HID connection providing |
| 44 | + run-control debugging and compatibility with IDE tools |
| 45 | + - Virtual serial port interface |
| 46 | + - Open source CMSIS-DAP software project |
| 47 | + |
| 48 | +- FlexIO header |
| 49 | + |
| 50 | +For more information about the K82F SoC and FRDM-K82F board: |
| 51 | + |
| 52 | +- `K82F Website`_ |
| 53 | +- `K82F Datasheet`_ |
| 54 | +- `K82F Reference Manual`_ |
| 55 | +- `FRDM-K82F Website`_ |
| 56 | +- `FRDM-K82F User Guide`_ |
| 57 | +- `FRDM-K82F Schematics`_ |
| 58 | + |
| 59 | +Supported Features |
| 60 | +================== |
| 61 | + |
| 62 | +The frdm_k82f board configuration supports the following hardware features: |
| 63 | + |
| 64 | ++-----------+------------+-------------------------------------+ |
| 65 | +| Interface | Controller | Driver/Component | |
| 66 | ++===========+============+=====================================+ |
| 67 | +| NVIC | on-chip | nested vector interrupt controller | |
| 68 | ++-----------+------------+-------------------------------------+ |
| 69 | +| SYSTICK | on-chip | systick | |
| 70 | ++-----------+------------+-------------------------------------+ |
| 71 | +| PINMUX | on-chip | pinmux | |
| 72 | ++-----------+------------+-------------------------------------+ |
| 73 | +| ADC | on-chip | adc | |
| 74 | ++-----------+------------+-------------------------------------+ |
| 75 | +| FLASH | on-chip | soc flash | |
| 76 | ++-----------+------------+-------------------------------------+ |
| 77 | +| FLASH | off-chip | QSPI flash | |
| 78 | ++-----------+------------+-------------------------------------+ |
| 79 | +| GPIO | on-chip | gpio | |
| 80 | ++-----------+------------+-------------------------------------+ |
| 81 | +| I2C | on-chip | i2c | |
| 82 | ++-----------+------------+-------------------------------------+ |
| 83 | +| PWM | on-chip | pwm | |
| 84 | ++-----------+------------+-------------------------------------+ |
| 85 | +| RTC | on-chip | rtc | |
| 86 | ++-----------+------------+-------------------------------------+ |
| 87 | +| SENSOR | off-chip | fxos8700 polling; | |
| 88 | +| | | fxos8700 trigger | |
| 89 | ++-----------+------------+-------------------------------------+ |
| 90 | +| SPI | on-chip | spi | |
| 91 | ++-----------+------------+-------------------------------------+ |
| 92 | +| UART | on-chip | serial port-polling; | |
| 93 | +| | | serial port-interrupt | |
| 94 | ++-----------+------------+-------------------------------------+ |
| 95 | +| USB | on-chip | USB device | |
| 96 | ++-----------+------------+-------------------------------------+ |
| 97 | +| WATCHDOG | on-chip | watchdog | |
| 98 | ++-----------+------------+-------------------------------------+ |
| 99 | + |
| 100 | +The default configuration can be found in the defconfig file: |
| 101 | + |
| 102 | + ``boards/arm/frdm_k82f/frdm_k82f_defconfig`` |
| 103 | + |
| 104 | +Other hardware features are not currently supported by the port. |
| 105 | + |
| 106 | +System Clock |
| 107 | +============ |
| 108 | + |
| 109 | +The K82F SoC is configured to use the 12 MHz external oscillator on the board |
| 110 | +with the on-chip PLL to generate a 120 MHz system clock. |
| 111 | + |
| 112 | +Serial Port |
| 113 | +=========== |
| 114 | + |
| 115 | +The K82F SoC has five UARTs. One is configured for the console, the remaining |
| 116 | +ones are not used. |
| 117 | + |
| 118 | +USB |
| 119 | +=== |
| 120 | + |
| 121 | +The K82F SoC has a USB OTG (USBOTG) controller that supports both |
| 122 | +device and host functions through its micro USB connector (J11). |
| 123 | +Only USB device function is supported in Zephyr at the moment. |
| 124 | + |
| 125 | +Programming and Debugging |
| 126 | +************************* |
| 127 | + |
| 128 | +Build and flash applications as usual (see :ref:`build_an_application` and |
| 129 | +:ref:`application_run` for more details). |
| 130 | + |
| 131 | +Configuring a Debug Probe |
| 132 | +========================= |
| 133 | + |
| 134 | +A debug probe is used for both flashing and debugging the board. This board is |
| 135 | +configured by default to use the :ref:`opensda-daplink-onboard-debug-probe`. |
| 136 | + |
| 137 | +Early versions of this board have an outdated version of the OpenSDA bootloader |
| 138 | +and require an update. Please see the `DAPLink Bootloader Update`_ page for |
| 139 | +instructions to update from the CMSIS-DAP bootloader to the DAPLink bootloader. |
| 140 | + |
| 141 | +Option 1: :ref:`opensda-daplink-onboard-debug-probe` (Recommended) |
| 142 | +------------------------------------------------------------------ |
| 143 | + |
| 144 | +Install the :ref:`pyocd-debug-host-tools` and make sure they are in your search |
| 145 | +path. |
| 146 | + |
| 147 | +Follow the instructions in :ref:`opensda-daplink-onboard-debug-probe` to program |
| 148 | +the `OpenSDA DAPLink FRDM-K82F Firmware`_. |
| 149 | + |
| 150 | +Option 2: :ref:`opensda-jlink-onboard-debug-probe` |
| 151 | +-------------------------------------------------- |
| 152 | + |
| 153 | +Install the :ref:`jlink-debug-host-tools` and make sure they are in your search |
| 154 | +path. |
| 155 | + |
| 156 | +Follow the instructions in :ref:`opensda-jlink-onboard-debug-probe` to program |
| 157 | +the `OpenSDA J-Link Firmware for FRDM-K82F`_. |
| 158 | + |
| 159 | +Add the argument ``-DOPENSDA_FW=jlink`` when you invoke ``west build`` or |
| 160 | +``cmake`` to override the default runner from pyOCD to J-Link: |
| 161 | + |
| 162 | +.. zephyr-app-commands:: |
| 163 | + :zephyr-app: samples/hello_world |
| 164 | + :tool: all |
| 165 | + :board: frdm_k82f |
| 166 | + :gen-args: -DOPENSDA_FW=jlink |
| 167 | + :goals: build |
| 168 | + |
| 169 | +Configuring a Console |
| 170 | +===================== |
| 171 | + |
| 172 | +Regardless of your choice in debug probe, we will use the OpenSDA |
| 173 | +microcontroller as a usb-to-serial adapter for the serial console. |
| 174 | + |
| 175 | +Connect a USB cable from your PC to J5. |
| 176 | + |
| 177 | +Use the following settings with your serial terminal of choice (minicom, putty, |
| 178 | +etc.): |
| 179 | + |
| 180 | +- Speed: 115200 |
| 181 | +- Data: 8 bits |
| 182 | +- Parity: None |
| 183 | +- Stop bits: 1 |
| 184 | + |
| 185 | +Flashing |
| 186 | +======== |
| 187 | + |
| 188 | +Here is an example for the :ref:`hello_world` application. |
| 189 | + |
| 190 | +.. zephyr-app-commands:: |
| 191 | + :zephyr-app: samples/hello_world |
| 192 | + :board: frdm_k82f |
| 193 | + :goals: flash |
| 194 | + |
| 195 | +Open a serial terminal, reset the board (press the SW1 button), and you should |
| 196 | +see the following message in the terminal: |
| 197 | + |
| 198 | +.. code-block:: console |
| 199 | +
|
| 200 | + ***** Booting Zephyr OS v1.14.0-xxx-gxxxxxxxxxxxx ***** |
| 201 | + Hello World! frdm_k82f |
| 202 | +
|
| 203 | +Debugging |
| 204 | +========= |
| 205 | + |
| 206 | +Here is an example for the :ref:`hello_world` application. |
| 207 | + |
| 208 | +.. zephyr-app-commands:: |
| 209 | + :zephyr-app: samples/hello_world |
| 210 | + :board: frdm_k82f |
| 211 | + :goals: debug |
| 212 | + |
| 213 | +Open a serial terminal, step through the application in your debugger, and you |
| 214 | +should see the following message in the terminal: |
| 215 | + |
| 216 | +.. code-block:: console |
| 217 | +
|
| 218 | + ***** Booting Zephyr OS v1.14.0-xxx-gxxxxxxxxxxxx ***** |
| 219 | + Hello World! frdm_k82f |
| 220 | +
|
| 221 | +.. _FRDM-K82F Website: |
| 222 | + https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/freedom-development-platform-for-kinetis-k82-k81-and-k80-mcus:FRDM-K82F |
| 223 | + |
| 224 | +.. _FRDM-K82F User Guide: |
| 225 | + https://www.nxp.com/docs/en/user-guide/FRDMK82FUG.pdf |
| 226 | + |
| 227 | +.. _FRDM-K82F Schematics: |
| 228 | + https://www.nxp.com/downloads/en/schematics/FRDM-K82F-SCH.pdf |
| 229 | + |
| 230 | +.. _K82F Website: |
| 231 | + https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k8x-secure/kinetis-k82-150-mhz-hw-cryptographic-co-processor-quadspi-microcontrollers-mcus-based-on-arm-cortex-m4-core:K82_150 |
| 232 | + |
| 233 | +.. _K82F Datasheet: |
| 234 | + https://www.nxp.com/docs/en/data-sheet/K82P121M150SF5.pdf |
| 235 | + |
| 236 | +.. _K82F Reference Manual: |
| 237 | + https://www.nxp.com/docs/en/reference-manual/K82P121M150SF5RM.pdf |
| 238 | + |
| 239 | +.. _DAPLink Bootloader Update: |
| 240 | + https://os.mbed.com/blog/entry/DAPLink-bootloader-update/ |
| 241 | + |
| 242 | +.. _OpenSDA DAPLink FRDM-K82F Firmware: |
| 243 | + https://www.nxp.com/assets/downloads/data/en/snippets-boot-code-headers-monitors/k20dx_frdmk82f_if_crc_legacy_0x8000.bin |
| 244 | + |
| 245 | +.. _OpenSDA J-Link Firmware for FRDM-K82F: |
| 246 | + https://www.segger.com/downloads/jlink/OpenSDA_FRDM-K82F |
0 commit comments