You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you execute the _sudo su -_ command, you will be prompted for a password:
281
+
When you execute the _sudo su -_ command, you will be prompted for a password:
282
282
283
283
***The default password is `fio`***
284
284
@@ -1806,7 +1806,16 @@ To configure the Ethernet settings, depending on the paired Portenta board, one
1806
1806
#### Ethernet Interface With Linux
1807
1807
<br></br>
1808
1808
1809
-
Using the Portenta X8 in combination with the Hat Carrier allows you to evaluate the Ethernet speed. First, make sure the Portenta X8 is mounted on the Hat Carrier, and then connect them using a RJ45 LAN cable. To measure the bandwidth, we will use the _iperf3_ tool, which is available [here](https://github.com/userdocs/iperf3-static).
1809
+
Using the Portenta X8 in combination with the Hat Carrier allows you to evaluate the Ethernet speed. First, ensure that the Portenta X8 is mounted on the Hat Carrier, and then connect them using an RJ45 LAN cable.
1810
+
1811
+
Subsequently, open a terminal to access the shell of the Portenta X8 with admin (root) privileges.
1812
+
1813
+
```bash
1814
+
adb shell
1815
+
sudo su -
1816
+
```
1817
+
1818
+
When prompted, enter the password `fio`. To measure the bandwidth, we will use the _iperf3_ tool, which is available [here](https://github.com/userdocs/iperf3-static).
1810
1819
1811
1820
To use the _iperf3_ tool, we will set the Portenta X8 and Hat Carrier as the Server and the controlling computer as the Client. The commands will measure the bandwidth between the Portenta Hat Carrier with Portenta X8 and the computer. For a deeper understanding of _iperf3_, refer to its [official documentation](https://iperf.fr/iperf-doc.php).
1812
1821
@@ -2241,7 +2250,6 @@ For a comprehensive understanding of these connectivity options, kindly refer to
2241
2250
- Portenta H7 connectivity: [Wi-Fi® access point](https://docs.arduino.cc/tutorials/portenta-h7/wifi-access-point) and [BLE connectivity](https://docs.arduino.cc/tutorials/portenta-h7/ble-connectivity)
2242
2251
- Portenta C33 User Manual: [Wi-Fi®](https://docs.arduino.cc/tutorials/portenta-c33/user-manual#wi-fi) and [Bluetooth®](https://docs.arduino.cc/tutorials/portenta-c33/user-manual#bluetooth)
2243
2252
2244
-
2245
2253
## Pins
2246
2254
2247
2255
The Portenta Hat Carrier is a versatile platform, and a significant feature of this carrier is its extensive pin availability. These pins provide a range of functionalities, including power, I/Os, communication, and more.
@@ -2327,11 +2335,30 @@ Next conditions will help you properly set the hardware to test GPIO controls:
2327
2335
2328
2336
1. Begin by positioning the Portenta-X8 securely onto the Portenta Hat Carrier. Make sure the High-Density connectors are securely connected.
2329
2337
2330
-
2. Each GPIO on the Portenta Hat Carrier is versatile and robust, designed to safely accept input voltages ranging between 0.0 V and 3.3 V. This wide range ensures compatibility with a variety of sensors and external devices.
2338
+
2. Each GPIO on the Portenta Hat Carrier is versatile and robust, designed to safely accept input voltages ranging between 0.0 V and 3.3 V. This input range ensures compatibility with an array of sensors and external devices.
2331
2339
2332
2340
3. To prevent floating states and offer a consistent and predictable behavior, internal pull-ups are automatically enabled on all input pins. This default configuration means that, unless actively driven low, the pins will naturally read as high (or 3.3 V).
2333
2341
2334
-
When all conditions are set and in place, use the following script to read all available GPIOs on 40-Pin header:
2342
+
When all conditions are set and in place, access the Portenta X8's shell with admin (root) access as follows:
2343
+
2344
+
```bash
2345
+
adb shell
2346
+
sudo su -
2347
+
```
2348
+
2349
+
Enter the password `fio` when prompted. Next, access the `x8-devel` Docker container with the command:
2350
+
2351
+
```bash
2352
+
docker exec -it x8-devel sh
2353
+
```
2354
+
2355
+
Navigate to the directory containing the GPIO example, named `gpios.py`:
2356
+
2357
+
```bash
2358
+
cd root/examples/portenta-hat-carrier
2359
+
```
2360
+
2361
+
Run the `gpios.py` script to read the status of all available GPIOs on the 40-pin header:
2335
2362
2336
2363
```python
2337
2364
#!/usr/bin/env python3
@@ -2553,6 +2580,101 @@ The pins used for the JTAG debug port on the Portenta Hat Carrier are the follow
2553
2580
| 9 || JTAG_TRST | J1-80 | JTAG TRST |
2554
2581
| 10 || JTAG_RST | J1-73 | JTAG RST |
2555
2582
2583
+
## Understanding Device Tree Blobs (DTB) Overlays
2584
+
2585
+
### Device Tree Blobs (DTB) And DTB Overlays
2586
+
2587
+
In the world of embedded systems, _U-boot_ and the _Linux kernel_ use a concept called __Device Tree Blobs (DTB)__ to describe a board's hardware configuration. This approach allows for a unified main source tree to be used across different board configurations, ensuring consistency.
2588
+
2589
+
The boards, acting as carriers, allow various peripherals to be connected, such as temperature sensors or accelerometers. These carriers serve as expansion connectors. You might want to connect various peripherals and be able to add or remove them easily.
2590
+
2591
+
The concept of modularity is applied to the _DTB_, resulting in __DTB overlays__. The hardware configuration is split into multiple small files, each representing a different peripheral or function in the form of a DTB overlay.
2592
+
2593
+
During the early boot stage, these overlays are merged together into a single DTB and loaded into RAM. This approach enables users to select and change configurations with ease. However, it is important to note that changing the hardware configuration requires a system reboot to maintain system stability.
2594
+
2595
+
### Handling DTB Overlays
2596
+
2597
+
You can modify and maintain the Device Tree Blob (DTB) overlays through a couple of methods. In builds that do not prioritize security, you can edit the file located at the following location:
2598
+
2599
+
```
2600
+
/boot/devicetree/overlays.txt
2601
+
```
2602
+
2603
+
After making the desired changes, it is necessary to save the changes and reboot the system to apply them.
2604
+
2605
+
On the other hand, in builds that prioritize security, the *fw_setenv tool* accessible in user space must be used to apply the corresponding changes to the U-boot settings as follows:
2606
+
2607
+
```
2608
+
fw_setenv overlays=name_ov1 name_ov2
2609
+
```
2610
+
2611
+
Currently, parameters are passed indirectly to the overlays; however, upcoming enhancements to U-boot will introduce direct parameter passing functionality.
2612
+
2613
+
### Custom DTB Overlays
2614
+
2615
+
In cases where the required DTB overlay is not readily available and a specific configuration that is not part of the pre-compiled set is needed, it is possible to create customized DTB overlays.
2616
+
2617
+
DTB overlays originate from readable source files known as _DTS files_. Users with the respective experience can modify these DTS files and cross-compile them to create tailored overlays suited to their needs.
2618
+
2619
+
### Automated Load And Carrier Detection
2620
+
2621
+
U-boot can be configured to automatically load specific DTB overlays based on the carrier board it detects, in this case the Portenta Hat Carrier, either by probing specific hardware or by reading an identification ID from an EEPROM.
2622
+
2623
+
For instance, for a Portenta-X8 placed on a Portenta HAT Carrier, upon logging into the board and executing subsequent commands on the shell, the expected output is as follows:
This information is written by U-boot during boot in a step referred to as _auto carrier detection_. You can modify the variables from user space, but after a reboot, they revert to their default state unless the `carrier_custom` variable is set to `1`.
2637
+
2638
+
```bash
2639
+
fw_setenv carrier_custom 1
2640
+
```
2641
+
2642
+
This serves as an escape mechanism to enable user-based configurations.
The commands above enable functionalities such as a speed-controlled fan connector, an OV5647 based RPi v1.3 camera, and an IQ Audio Codec Zero audio HAT.
2652
+
2653
+
### Hardware Configuration Layers
2654
+
2655
+
Hardware configuration is divided into the following layers:
2656
+
2657
+
-__Layer 0__: System on Module (SoM), prefixed with `ov_som_`.
2658
+
-__Layer 1__: Carrier boards, prefixed with `ov_carrier_`.
2659
+
-__Layer 2__: HATs and Cameras, which is usually a concatenation of the carrier name and the hat name or functionality.
2660
+
2661
+
EEPROMs, which store identification IDs, are typically defined on _Layer 1_ and accessible on _I2C1_. Some HATs may also have EEPROMs according to the Raspberry Pi® standard (*ID_SD*, *ID_SC*), accessible on _I2C0_.
2662
+
2663
+
There are some overlays which add specific functionalities. For example:
2664
+
2665
+
-`ov_som_lbee5kl1dx`: Adds Wi-Fi®
2666
+
-`ov_som_x8h7`: Adds the H7 external microcontroller
2667
+
-`ov_carrier_rasptenta_base`: Base support for Portenta Hat Carrier
2668
+
2669
+
When no known carrier is detected and the Portenta X8 is mounted as the main board, the first two overlays mentioned above are applied by default.
2670
+
2671
+
#### Distinction Between System And Hardware Configuration
2672
+
<br></br>
2673
+
2674
+
The distinction between system and hardware configuration is crucial. System configuration includes settings such as user creation and Wi-Fi® passwords, whereas hardware configuration is explicitly defined through the device tree.
2675
+
2676
+
In production environments, the addition of custom compiled device tree overlays is restricted to maintain system integrity and security.
2677
+
2556
2678
## Raspberry Pi® HAT
2557
2679
2558
2680
The Portenta Hat Carrier is notable for its compatibility with __Hardware Attached on Top (HAT)__ add-on boards.
@@ -2871,7 +2993,7 @@ Please, refer to the [board pinout section](#pinout) of the user manual to find
2871
2993
#### Using Linux
2872
2994
<br></br>
2873
2995
2874
-
For Portenta X8, it is possible to use the following commands:
2996
+
With admin (root) access, you can use the following commands within the shell for the Portenta X8:
2875
2997
2876
2998
```
2877
2999
sudo modprobe spidev
@@ -2888,7 +3010,7 @@ sudo systemctl reboot
2888
3010
services:
2889
3011
my_spi_service:
2890
3012
devices:
2891
-
- /dev/spi-1
3013
+
- '/dev/spidev0.0'
2892
3014
```
2893
3015
Following section configures a service named `my_spi_service` to use the SPI device available at `/dev/spi-1`.
2894
3016
@@ -2999,7 +3121,7 @@ Please, refer to the [pinout section](#pinout) of the user manual to find them o
2999
3121
#### Using Linux
3000
3122
<br></br>
3001
3123
3002
-
For Portenta X8, it is possible to use the following commands:
3124
+
For the Portenta X8, it is possible to use the following commands within the shell when you have admin (root) access:
3003
3125
3004
3126
```
3005
3127
sudo modprobe i2c-dev
@@ -3018,7 +3140,7 @@ Following section configures a service named `my_i2c_service` to use the I2C dev
3018
3140
services:
3019
3141
my_i2c_service:
3020
3142
devices:
3021
-
- /dev/i2c-3
3143
+
- `/dev/i2c-3`
3022
3144
```
3023
3145
3024
3146
Within the Portenta X8 shell, you can use specific commands to quickly test I2C communication with compatible devices. The command below lists all the connected I2C devices:
@@ -3183,7 +3305,7 @@ Since the CAN bus pins are integrated within the High-Density connectors, they a
3183
3305
#### Using Linux
3184
3306
<br></br>
3185
3307
3186
-
For Portenta X8, the following instructions can help control CAN bus protocol. The CAN transceiver is enabled using the following command:
3308
+
For the Portenta X8, when you have admin (root) access, you can execute the following commands within the shell to control the CAN bus protocol. The CAN transceiver can be enabled using the following command
@@ -3497,14 +3619,14 @@ Please, refer to the board pinout section of the user manual to find them on the
3497
3619
#### Using Linux
3498
3620
<br></br>
3499
3621
3500
-
Within Portenta X8, the command `ls /dev/ttyUSB* /dev/ttyACM*` can be used to list available serial ports in Linux. Typically, USB serial devices appear as _/dev/ttyUSBx_or _/dev/ttyACMx_.
3622
+
For the Portenta X8, when you have admin (root) access, you can execute the command `ls /dev/ttyUSB* /dev/ttyACM* /dev/ttymxc*` within the shell to list available serial ports in Linux. Typically, USB serial devices could appear as _/dev/ttyUSBx_, _/dev/ttyACMx_, or _/dev/ttymxcx_.
3501
3623
3502
3624
```
3503
-
ls /dev/ttyUSB* /dev/ttyACM*
3504
-
/dev/ttymxc1 // Something similar
3625
+
ls /dev/ttyUSB* /dev/ttyACM* /dev/ttymxc*
3626
+
/dev/ttymxc2 // Something similar
3505
3627
```
3506
3628
3507
-
The output _/dev/ttymxc1_ is an example of a potential serial device you might find on Portenta X8.
3629
+
The output _/dev/ttymxc2_ is an example of a potential serial device you might find on Portenta X8.
3508
3630
3509
3631
Following Python® script uses the _pyserial_ library to communicate with devices over UART. It defines the `processData` function which prints the received data. You can modify this function based on your application's needs.
3510
3632
@@ -3517,7 +3639,7 @@ def processData(data):
3517
3639
print("Received:", data) # For now, just print the data. Modify as needed.
3518
3640
3519
3641
# Set up the serial port
3520
-
ser = serial.Serial('/dev/ttymxc3', 9600) # Use the appropriate port and baud rate for your device
3642
+
ser = serial.Serial('/dev/ttymxc2', 9600) # Use the appropriate port and baud rate for your device
3521
3643
3522
3644
incoming =""
3523
3645
@@ -3540,7 +3662,7 @@ while True:
3540
3662
time.sleep(0.002) # Delay for data buffering, equivalent to Arduino's delay(2);
3541
3663
```
3542
3664
3543
-
The script sets up a serial connection on port _/dev/ttymxc1_ at a baud rate of _9600_. It then continuously checks for incoming data. When a newline character (`\n`) is detected, indicating the end of a message, the script processes the accumulated data and then resets the data string to be ready for the next incoming message.
3665
+
The script sets up a serial connection on port _/dev/ttymxc2_ at a baud rate of _9600_. It then continuously checks for incoming data. When a newline character (`\n`) is detected, indicating the end of a message, the script processes the accumulated data and then resets the data string to be ready for the next incoming message.
3544
3666
3545
3667
The `time.sleep(0.002)` line adds a slight delay, ensuring data has enough time to buffer, similar to using `delay(2);` in Arduino.
0 commit comments