|
| 1 | +.. _dt_bl10_devkit: |
| 2 | + |
| 3 | +BL602 Development Board |
| 4 | +####################### |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +BL602/BL604 is a Wi-Fi+BLE chipset introduced by Bouffalo Lab, which is used |
| 10 | +for low power consumption and high performance application development. The |
| 11 | +wireless subsystem includes 2.4G radio, Wi-Fi 802.11b/g/n and BLE 5.0 |
| 12 | +baseband/MAC design. The microcontroller subsystem includes a 32-bit RISC CPU |
| 13 | +with low power consumption, cache and memory. The power management unit |
| 14 | +controls the low power consumption mode. In addition, it also supports |
| 15 | +various security features. The external interfaces include SDIO, SPI, UART, |
| 16 | +I2C, IR remote, PWM, ADC, DAC, PIR and GPIO. |
| 17 | + |
| 18 | +The BL602 Development Board features a SiFive E24 32 bit RISC-V CPU with FPU, |
| 19 | +it supports High Frequency clock up to 192Mhz, have 128k ROM, 276kB RAM, |
| 20 | +2.4 GHz WIFI 1T1R mode, support 20 MHz, data rate up to 72.2 Mbps, BLE 5.0 |
| 21 | +with 2MB phy. It is a secure MCU which supports Secure boot, ECC-256 signed |
| 22 | +image, QSPI/SPI Flash On-The-Fly AES Decryption and PKA (Public Key |
| 23 | +Accelerator). |
| 24 | + |
| 25 | +.. image:: img/dt_bl10_devkit.jpg |
| 26 | + :width: 450px |
| 27 | + :align: center |
| 28 | + :alt: dt_bl10_devkit |
| 29 | + |
| 30 | +Hardware |
| 31 | +******** |
| 32 | + |
| 33 | +For more information about the Bouffalo Lab BL-602 MCU: |
| 34 | + |
| 35 | +- `Bouffalo Lab BL602 MCU Website`_ |
| 36 | +- `Bouffalo Lab BL602 MCU Datasheet`_ |
| 37 | +- `Bouffalo Lab Development Zone`_ |
| 38 | +- `dt_bl10_devkit Schematic`_ |
| 39 | +- `Doctors of Intelligence & Technology (www.doiting.com)`_ |
| 40 | +- `The RISC-V BL602 Book`_ |
| 41 | + |
| 42 | +Supported Features |
| 43 | +================== |
| 44 | + |
| 45 | +The board configuration supports the following hardware features: |
| 46 | + |
| 47 | ++-----------+------------+-----------------------+ |
| 48 | +| Interface | Controller | Driver/Component | |
| 49 | ++===========+============+=======================+ |
| 50 | +| MTIMER | on-chip | RISC-V Machine Timer | |
| 51 | ++-----------+------------+-----------------------+ |
| 52 | +| PINCTRL | on-chip | pin muxing | |
| 53 | ++-----------+------------+-----------------------+ |
| 54 | +| UART | on-chip | serial port-polling | |
| 55 | ++-----------+------------+-----------------------+ |
| 56 | + |
| 57 | + |
| 58 | +The default configurations can be found in the Kconfig |
| 59 | +:zephyr_file:`boards/risc/dt_bl10_devkit/dt_bl10_devkit_defconfig`. |
| 60 | + |
| 61 | +System Clock |
| 62 | +============ |
| 63 | + |
| 64 | +The BL602 Development Board is configured to run at max speed (192MHz). |
| 65 | + |
| 66 | +Serial Port |
| 67 | +=========== |
| 68 | + |
| 69 | +The dt_bl10_devkit_ uses UART0 as default serial port. It is connected to |
| 70 | +USB Serial converter and port is used for both program and console. |
| 71 | + |
| 72 | + |
| 73 | +Programming and Debugging |
| 74 | +************************* |
| 75 | + |
| 76 | +BL Flash tool |
| 77 | +============= |
| 78 | + |
| 79 | +The BL-602 have a ROM bootloader that allows user flash device by serial port. |
| 80 | +There are some tools available at internet and this will describe one of them. |
| 81 | +The below guide was created based on RISC-V BL602 Book, chapter 3 |
| 82 | +`Flashing Firmware to BL602`_. |
| 83 | + |
| 84 | +#. `Install Rustup`_ |
| 85 | + |
| 86 | +#. Clone blflash rust version |
| 87 | + |
| 88 | + .. code-block:: console |
| 89 | +
|
| 90 | + $ git clone --recursive https://github.com/spacemeowx2/blflash |
| 91 | +
|
| 92 | +#. Build blflash |
| 93 | + |
| 94 | + .. code-block:: console |
| 95 | +
|
| 96 | + $ cd blflash |
| 97 | + $ cargo build --release |
| 98 | +
|
| 99 | +#. Install blflash. The recommended use is copy to home folder |
| 100 | + |
| 101 | + .. code-block:: console |
| 102 | +
|
| 103 | + $ cp blflash ~/bin/ |
| 104 | +
|
| 105 | +#. Test |
| 106 | + |
| 107 | + .. code-block:: console |
| 108 | +
|
| 109 | + $ blflash -V |
| 110 | +
|
| 111 | + It will print blflash version |
| 112 | + |
| 113 | + .. code-block:: console |
| 114 | +
|
| 115 | + $ blflash 0.3.3 |
| 116 | +
|
| 117 | +Samples |
| 118 | +======= |
| 119 | + |
| 120 | +#. Build the Zephyr kernel and the :ref:`hello_world` sample application: |
| 121 | + |
| 122 | + .. zephyr-app-commands:: |
| 123 | + :zephyr-app: samples/hello_world |
| 124 | + :board: dt_bl10_devkit |
| 125 | + :goals: build |
| 126 | + :compact: |
| 127 | + |
| 128 | +#. To flash an image using blflash runner: |
| 129 | + |
| 130 | + #. Press D8 button |
| 131 | + |
| 132 | + #. Press and release EN button |
| 133 | + |
| 134 | + #. Release D8 button |
| 135 | + |
| 136 | + .. code-block:: console |
| 137 | +
|
| 138 | + west flash -r blflash |
| 139 | +
|
| 140 | +#. Run your favorite terminal program to listen for output. Under Linux the |
| 141 | + terminal should be :code:`/dev/ttyUSB0`. For example: |
| 142 | + |
| 143 | + .. code-block:: console |
| 144 | +
|
| 145 | + $ minicom -D /dev/ttyUSB0 -o |
| 146 | +
|
| 147 | + The -o option tells minicom not to send the modem initialization |
| 148 | + string. Connection should be configured as follows: |
| 149 | + |
| 150 | + - Speed: 115200 |
| 151 | + - Data: 8 bits |
| 152 | + - Parity: None |
| 153 | + - Stop bits: 1 |
| 154 | + |
| 155 | + Then, press and release EN button |
| 156 | + |
| 157 | + .. code-block:: console |
| 158 | +
|
| 159 | + *** Booting Zephyr OS build zephyr-v2.6.0-1729-g22140c728537 *** |
| 160 | + Hello World! dt_bl10_devkit |
| 161 | +
|
| 162 | +Congratulations, you have `dt_bl10_devkit`_ configured and running Zephyr. |
| 163 | + |
| 164 | + |
| 165 | +.. _Bouffalo Lab BL602 MCU Website: |
| 166 | + https://www.bouffalolab.com/bl602 |
| 167 | + |
| 168 | +.. _Bouffalo Lab BL602 MCU Datasheet: |
| 169 | + https://github.com/bouffalolab/bl_docs/tree/main/BL602_DS/en |
| 170 | + |
| 171 | +.. _Bouffalo Lab Development Zone: |
| 172 | + https://dev.bouffalolab.com/home?id=guest |
| 173 | + |
| 174 | +.. _dt_bl10_devkit Schematic: |
| 175 | + https://github.com/SmartArduino/Doiting_BL/blob/master/board/DT-BL10%20User%20Mannual.pdf |
| 176 | + |
| 177 | +.. _Doctors of Intelligence & Technology (www.doiting.com): |
| 178 | + https://www.doiting.com |
| 179 | + |
| 180 | +.. _Install Rustup: |
| 181 | + https://rustup.rs/ |
| 182 | + |
| 183 | +.. _The RISC-V BL602 Book: |
| 184 | + https://lupyuen.github.io/articles/book |
| 185 | + |
| 186 | +.. _Flashing Firmware to BL602: |
| 187 | + https://lupyuen.github.io/articles/book#flashing-firmware-to-bl602 |
0 commit comments