1.. zephyr:board:: rak4631 2 3Overview 4******** 5 6RAK4631 is a WisBlock Core module for RAK WisBlock. 7It extends the WisBlock series with a powerful 8Nordic nRF52840 MCU that supports Bluetooth 5.0 9(Bluetooth Low Energy) and the newest LoRa transceiver 10from Semtech, the SX1262. The Semtech SX1262 has compared 11to the older SX127x series a lower power consumption at 12the same TX power. This makes the RAK4631 an ultra-low 13power communication solution. RAK4631 can be comfortably 14programmed with ZephyrRTOS. 15 16Hardware 17******** 18 19To use a RAK4631, you need at least a WisBlock Base 20to plug the module in. WisBlock Base is the power 21supply for the RAK4631 module and has the 22programming/debug interface. 23 24- nRF52840 ARM Cortex-M4F Processor 25- 64 MHz CPU clock 26- 1 Micro-AB USB OTG host/device 27- Semtech SX1262 low power high range LoRa transceiver 28- iPEX connectors for the LORA antenna and BLE antenna. 29- Multiple interfaces, I2C, UART, GPIO, ADC 30- 2 user LEDs on RAK5005 mother Board 31- Powered by either Micro USB, 3.7V rechargeable battery or a 5V Solar Panel Port 32 33Supported Features 34================== 35 36The ``rak4631/nrf52840`` board configuration supports the following hardware features: 37 38+-----------+------------+----------------------+ 39| Interface | Controller | Driver/Component | 40+===========+============+======================+ 41| ADC | on-chip | adc | 42+-----------+------------+----------------------+ 43| CLOCK | on-chip | clock_control | 44+-----------+------------+----------------------+ 45| FLASH | on-chip | flash | 46+-----------+------------+----------------------+ 47| GPIO | on-chip | gpio | 48+-----------+------------+----------------------+ 49| I2C(M) | on-chip | i2c | 50+-----------+------------+----------------------+ 51| MPU | on-chip | arch/arm | 52+-----------+------------+----------------------+ 53| NVIC | on-chip | arch/arm | 54+-----------+------------+----------------------+ 55| PWM | on-chip | pwm | 56+-----------+------------+----------------------+ 57| RADIO | on-chip | Bluetooth, | 58| | | ieee802154 | 59+-----------+------------+----------------------+ 60| RADIO | on-board | LoRa (SX1262) | 61+-----------+------------+----------------------+ 62| RTC | on-chip | system clock | 63+-----------+------------+----------------------+ 64| SPI(M/S) | on-chip | spi | 65+-----------+------------+----------------------+ 66| UART | on-chip | serial | 67+-----------+------------+----------------------+ 68| USB | on-chip | usb | 69+-----------+------------+----------------------+ 70| WDT | on-chip | watchdog | 71+-----------+------------+----------------------+ 72 73The default board configuration can be found in 74:zephyr_file:`boards/rakwireless/rak4631/rak4631_nrf52840_defconfig` 75 76Connections and IOs 77=================== 78 79LED 80--- 81 82* LED1 (green) = P1.3 83* LED2 (blue) = P1.4 84 85Programming and Debugging 86************************* 87 88The RAK4631 board shall be connected to a Segger Embedded Debugger Unit 89`J-Link OB <https://www.segger.com/jlink-ob.html>`_. This provides a debug 90interface to the NRF52840 chip. You can use JLink to communicate with 91the NRF52840. 92 93Flashing 94======== 95 96#. Download JLink from the Segger `JLink Downloads Page`_. Go to the section 97 "J-Link Software and Documentation Pack" and install the "J-Link Software 98 and Documentation pack for Linux". The application JLinkExe needs to be 99 accessible from your path. 100 101#. Run your favorite terminal program to listen for output. Under Linux the 102 terminal should be :code:`/dev/ttyACM0`. For example: 103 104 .. code-block:: console 105 106 $ minicom -D /dev/ttyACM0 -o 107 108 The -o option tells minicom not to send the modem initialization string. 109 Connection should be configured as follows: 110 111 - Speed: 115200 112 - Data: 8 bits 113 - Parity: None 114 - Stop bits: 1 115 116#. Connect the RAK4631 board to your host computer using the USB debug port. 117 Then build and flash the :zephyr:code-sample:`hello_world` application. 118 119 .. zephyr-app-commands:: 120 :zephyr-app: samples/hello_world 121 :board: rak4631/nrf52840 122 :goals: build flash 123 124 You should see "Hello World! rak4631_nrf52840" in your terminal. 125 126Debugging 127========= 128 129You can debug an application in the usual way. Here is an example for the 130:zephyr:code-sample:`hello_world` application. 131 132.. zephyr-app-commands:: 133 :zephyr-app: samples/hello_world 134 :board: rak4631/nrf52840 135 :maybe-skip-config: 136 :goals: debug 137 138References 139********** 140 141.. target-notes:: 142 143.. _RAK4631 Product Description: 144 https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/#overview 145 146.. _JLink Downloads Page: 147 https://www.segger.com/downloads/jlink 148