1.. _rcar_h3ulcb_boards:
2
3Renesas R-Car H3ULCB
4####################
5
6Overview
7********
8- The H3 Starter Kit board is designed for evaluating the features and performance of the R-CAR H3 device from Renesas Electronics and it is also used for developing and evaluating application software for these R-CAR H3.
9
10- The H3 Starter Kit, based on the R-CAR H3 SIP, comes with LPDDR4 @4GB in 2-channel, each 64-bit wide+Hyperflash @64MB, CSI2 interfaces and several communication interfaces like USB, Ethernet, HDMI and can work standalone or can be adapted to other boards, via 440pin connector on bottom side.
11
12It is possible to order 2 different types of H3 Starter Kit Boards, one with Ethernet connection onboard and one with Ethernet connection on ComExpress.
13
14.. figure:: img/rcar_h3ulcb_starter_kit.jpg
15   :align: center
16   :alt: R-Car starter kit
17
18.. note:: The H3ULCB board can be plugged on a Renesas Kingfisher Infotainment daughter board through COM Express connector in order to physically access more I/O. CAUTION: In this case, power supply is managed by the daughter board.
19
20More information about the board can be found at `Renesas R-Car Starter Kit website`_.
21
22Hardware
23********
24
25Hardware capabilities for the H3ULCB for can be found on the `eLinux H3SK page`_ of the board.
26
27.. figure:: img/rcar_h3ulcb_features.jpg
28   :align: center
29   :alt: R-Car starter kit features
30
31.. note:: Zephyr will be booted on the CR7 processor provided for RTOS purpose.
32
33More information about the SoC that equips the board can be found here:
34
35- `Renesas R-Car H3 chip`_
36
37Supported Features
38==================
39
40Here is the current supported features when running Zephyr Project on the R-Car ULCB CR7:
41
42+-----------+------------------------------+--------------------------------+
43| Interface | Driver/components            | Support level                  |
44+===========+==============================+================================+
45| PINMUX    | pinmux                       |                                |
46+-----------+------------------------------+--------------------------------+
47| CLOCK     | clock_control                |                                |
48+-----------+------------------------------+--------------------------------+
49| GPIO      | gpio                         |                                |
50+-----------+------------------------------+--------------------------------+
51| UART      | uart                         | serial port-polling            |
52+           +                              +                                +
53|           | FT232RQ / CP2102             | serial port-interrupt          |
54+-----------+------------------------------+--------------------------------+
55| CAN       | can                          | normal mode                    |
56+           +                              +                                +
57|           | TCAN332GDCNT                 | loopback mode                  |
58+-----------+------------------------------+--------------------------------+
59| I2C       | i2c                          | interrupt driven               |
60+-----------+------------------------------+--------------------------------+
61| PWM       | pwm                          | All channels                   |
62+-----------+------------------------------+--------------------------------+
63
64It's also currently possible to write on the ram console.
65
66More features will be supported soon.
67
68Connections and IOs
69===================
70
71H3ULCB Board
72------------
73
74Here are official IOs figures from eLinux for H3ULCB board:
75
76`H3SK top view`_
77
78`H3SK bottom view`_
79
80Kingfisher Infotainment daughter board
81--------------------------------------
82
83When connected to Kingfisher Infotainment board through COMExpress connector, the board is exposing much more IOs.
84
85Here are official IOs figures from eLinux for Kingfisher Infotainment board:
86
87`Kingfisher top view`_
88
89`Kingfisher bottom view`_
90
91GPIO
92----
93
94By running Zephyr on H3ULCB, the software readable push button 'SW3' can be used as input, and the software controllable LED 'LED5' can be used as output.
95
96UART
97----
98
99H3ULCB board is providing two serial ports, only one is commonly available on the board, however, the second one can be made available either by welding components or by plugging the board on a Kingfisher Infotainment daughter board.
100
101Here is information about these serial ports:
102
103+--------------------+-------------------+--------------------+-----------+--------------------------------------+
104| Physical Interface | Physical Location | Software Interface | Converter | Further Information                  |
105+====================+===================+====================+===========+======================================+
106| CN12 DEBUG SERIAL  | ULCB Board        | SCIF2              | FT232RQ   | Used by U-BOOT & Linux               |
107+--------------------+-------------------+--------------------+-----------+--------------------------------------+
108| CN10 DEBUG SERIAL  | ULCB Board        | SCIF1              | CP2102    | Non-welded                           |
109+--------------------+-------------------+--------------------+-----------+--------------------------------------+
110| CN04 DEBUG SERIAL  | Kingfisher        | SCIF1              |           | Secondary UART // Through ComExpress |
111+--------------------+-------------------+--------------------+-----------+--------------------------------------+
112
113.. note:: The Zephyr console output is assigned to SCIF1 (commonly used on Kingfisher daughter board) with settings 115200 8N1 without hardware flow control by default.
114
115Here is CN04 UART interface pinout (depending on your Kingfisher board version):
116
117+--------+----------+----------+
118| Signal | Pin KF03 | Pin KF04 |
119+========+==========+==========+
120| RXD    | 3        | 4        |
121+--------+----------+----------+
122| TXD    | 5        | 2        |
123+--------+----------+----------+
124| RTS    | 4        | 1        |
125+--------+----------+----------+
126| CTS    | 6        | 3        |
127+--------+----------+----------+
128| GND    | 9        | 6        |
129+--------+----------+----------+
130
131CAN
132---
133
134H3ULCB board provides two CAN interfaces. Both interfaces are available on the Kingfisher daughter board.
135
136+--------------------+--------------------+--------------+
137| Physical Interface | Software Interface | Transceiver  |
138+====================+====================+==============+
139| CN17               | CAN0               | TCAN332GDCNT |
140+--------------------+--------------------+--------------+
141| CN18               | CAN1               | TCAN332GDCNT |
142+--------------------+--------------------+--------------+
143
144.. note:: Interfaces are set to 125 kbit/s by default.
145
146The following table lists CAN physical interfaces pinout:
147
148+-----+--------+
149| Pin | Signal |
150+=====+========+
151| 1   | CANH   |
152+-----+--------+
153| 2   | CANL   |
154+-----+--------+
155| 3   | GND    |
156+-----+--------+
157
158I2C
159---
160
161H3ULCB board provides two I2C buses. Unfortunately direct access to these buses is not available through connectors.
162
163I2C is mainly used to manage and power on multiple of onboard chips on the H3ULCB and Kingfisher daughter board.
164
165Embedded I2C devices and I/O expanders are not yet supported. The current I2C support therefore does not make any devices available to the user at this time.
166
167PWM
168---
169
170ULCB boards provide one PWM controller with a maximum of 7 channels [0..6]. H3ULCB does provide the pwm0 from test pin CP8 only.
171
172When plugged on a Kingfisher daughter board, pwm4 channel is available on CN7 LVDS connector.
173
174Programming and Debugging
175*************************
176
177Build and flash applications as usual (see :ref:`build_an_application` and
178:ref:`application_run` for more details).
179
180Supported Debug Probe
181=====================
182
183The "Olimex ARM-USB-OCD-H" probe is the only officially supported probe. This probe is supported by OpenOCD that is shipped with the Zephyr SDK.
184
185The "Olimex ARM-USB-OCD-H" probe needs to be connected with a SICA20I2P adapter to CN3 on H3ULCB.
186
187.. note::
188    See `eLinux Kingfisher page`_ "Known issues" section if you encounter problem with JTAG.
189
190Configuring a Console
191=====================
192
193Connect a USB cable from your PC to CN04 of your Kingfisher daughter board.
194
195Use the following settings with your serial terminal of choice (minicom, putty,
196etc.):
197
198- Speed: 115200
199- Data: 8 bits
200- Parity: None
201- Stop bits: 1
202
203Flashing
204========
205
206First of all, open your serial terminal.
207
208Applications for the ``rcar_h3ulcb/r8a77951/r7`` board configuration can be built in the usual way (see :ref:`build_an_application` for more details).
209
210.. zephyr-app-commands::
211   :zephyr-app: samples/hello_world
212   :board: rcar_h3ulcb/r8a77951/r7
213   :goals: flash
214
215You should see the following message in the terminal:
216
217.. code-block:: console
218
219	*** Booting Zephyr OS build v2.6.0-rc1 ***
220	Hello World! rcar_h3ulcb
221
222Debugging
223=========
224
225First of all, open your serial terminal.
226
227Here is an example for the :zephyr:code-sample:`hello_world` application.
228
229.. zephyr-app-commands::
230   :zephyr-app: samples/hello_world
231   :board: rcar_h3ulcb/r8a77951/r7
232   :goals: debug
233
234You will then get access to a GDB session for debug.
235
236By continuing the app, you should see the following message in the terminal:
237
238.. code-block:: console
239
240	*** Booting Zephyr OS build v2.6.0-rc1 ***
241	Hello World! rcar_h3ulcb
242
243References
244**********
245
246- `Renesas R-Car Starter Kit website`_
247- `Renesas R-Car H3 chip`_
248- `eLinux H3SK page`_
249- `eLinux Kingfisher page`_
250
251.. _Renesas R-Car Starter Kit website:
252   https://www.renesas.com/br/en/products/automotive-products/automotive-system-chips-socs/r-car-h3-m3-starter-kit
253
254.. _Renesas R-Car H3 chip:
255	https://www.renesas.com/eu/en/products/automotive-products/automotive-system-chips-socs/r-car-h3-high-end-automotive-system-chip-soc-vehicle-infotainment-and-driving-safety-support
256
257.. _eLinux H3SK page:
258	https://elinux.org/R-Car/Boards/H3SK
259
260.. _H3SK top view:
261	https://elinux.org/images/1/1f/R-Car-H3-topview.jpg
262
263.. _H3SK bottom view:
264	https://elinux.org/images/c/c2/R-Car-H3-bottomview.jpg
265
266.. _eLinux Kingfisher page:
267	https://elinux.org/R-Car/Boards/Kingfisher
268
269.. _Kingfisher top view:
270	https://elinux.org/images/0/08/Kfisher_top_specs.png
271
272.. _Kingfisher bottom view:
273	https://elinux.org/images/0/06/Kfisher_bot_specs.png
274
275.. _Install a toolchain:
276	https://docs.zephyrproject.org/latest/getting_started/index.html#install-a-toolchain
277