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
Copy file name to clipboardExpand all lines: content/hardware/04.pro/carriers/portenta-hat-carrier/tutorials/user-manual/content.md
+32-23Lines changed: 32 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -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
@@ -2330,7 +2339,7 @@ Next conditions will help you properly set the hardware to test GPIO controls:
2330
2339
2331
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).
2332
2341
2333
-
When all conditions are set and in place, access the ADB shell on the Portenta X8 as follows:
2342
+
When all conditions are set and in place, access the Portenta X8's shell with admin (root) access as follows:
2334
2343
2335
2344
```bash
2336
2345
adb shell
@@ -2573,29 +2582,29 @@ The pins used for the JTAG debug port on the Portenta Hat Carrier are the follow
2573
2582
2574
2583
## Understanding Device Tree Blobs (DTB) Overlays
2575
2584
2576
-
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 allows for a unified main source tree to be used across different board configurations, ensuring consistency.
2585
+
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.
2577
2586
2578
-
The boards, acting as carriers, allow various peripherals to be connected, such as temperature sensors or accelerometers. These carriers serve as expansion connectors. Users might want to connect various peripherals and be able to add or remove them easily.
2587
+
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.
2579
2588
2580
2589
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.
2581
2590
2582
-
During the early boot stage, these overlays are merged together into a single DTB and loaded into RAM. This approach enables 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.
2591
+
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.
2583
2592
2584
-
The Device Tree Blob (DTB) overlays can be modified and maintained through a couple of methods. In builds that do not prioritize security, the file located at the following location can be edited.
2593
+
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:
2585
2594
2586
2595
```
2587
2596
/boot/devicetree/overlays.txt
2588
2597
```
2589
2598
2590
2599
After making the desired changes, it is necessary to save and reboot the system to apply desired changes.
2591
2600
2592
-
On the other hand, the builds that prioritizes security, the *fw_setenv tool* accessible in user space must be used to apply according changes to the U-boot settings as follows:
2601
+
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:
2593
2602
2594
2603
```
2595
2604
fw_setenv overlays=name_ov1 name_ov2
2596
2605
```
2597
2606
2598
-
While the current implementation does not allow passing parameters directly to the overlays, this functionality will be introduced in the future through enhancements to U-boot.
2607
+
Currently, parameters are passed indirectly to the overlays; however, upcoming enhancements to U-boot will introduce direct parameter passing functionality.
2599
2608
2600
2609
U-boot can be configured to automatically load specific DTB overlays based on the carrier board it detects, in this case Portenta Hat Carrier, either by probing specific hardware or by reading an identification ID from an EEPROM.
2601
2610
@@ -2612,7 +2621,7 @@ fw_printenv is_on_carrier
2612
2621
is_on_carrier=yes
2613
2622
```
2614
2623
2615
-
This information is written by U-boot during boot in a step referred to as _auto carrier detection_. The variables can be modified from user space, but after a reboot, it reverts to its default state unless the `carrier_custom` variable is set to `1`.
2624
+
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`.
The commands above enables functionalities such as a speed-controlled fan connector, an OV5647 based RPi v1.3 camera, and an IQ Audio Codec Zero audio HAT.
2639
+
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.
2631
2640
2632
-
Hardware configuration is divided into following layers:
2641
+
Hardware configuration is divided into the following layers:
2633
2642
2634
2643
-__Layer 0__: System on Module (SoM), prefixed with `ov_som_`.
2635
2644
-__Layer 1__: Carrier boards, prefixed with `ov_carrier_`.
@@ -2640,7 +2649,7 @@ EEPROMs, which store identification IDs, are typically defined on _Layer 1_ and
2640
2649
Some overlays, such as:
2641
2650
2642
2651
-`ov_som_lbee5kl1dx`: Adds Wi-Fi®
2643
-
-`ov_som_x8h7`: Adds the Portenta H7 external microcontroller
2652
+
-`ov_som_x8h7`: Adds the Portenta H7
2644
2653
-`ov_carrier_rasptenta_base`: Base support for Portenta Hat Carrier
2645
2654
2646
2655
add functionalities like Wi-Fi® and external microcontroller support. If no known carrier is detected, the first two overlays are applied by default if the Portenta X8 is mounted as the main board.
@@ -2967,7 +2976,7 @@ Please, refer to the [board pinout section](#pinout) of the user manual to find
2967
2976
#### Using Linux
2968
2977
<br></br>
2969
2978
2970
-
For Portenta X8, it is possible to use the following commands:
2979
+
With admin (root) access, you can use the following commands within the shell for the Portenta X8:
2971
2980
2972
2981
```
2973
2982
sudo modprobe spidev
@@ -2984,7 +2993,7 @@ sudo systemctl reboot
2984
2993
services:
2985
2994
my_spi_service:
2986
2995
devices:
2987
-
- /dev/spi-1
2996
+
- '/dev/spidev0.0'
2988
2997
```
2989
2998
Following section configures a service named `my_spi_service` to use the SPI device available at `/dev/spi-1`.
2990
2999
@@ -3095,7 +3104,7 @@ Please, refer to the [pinout section](#pinout) of the user manual to find them o
3095
3104
#### Using Linux
3096
3105
<br></br>
3097
3106
3098
-
For Portenta X8, it is possible to use the following commands:
3107
+
For the Portenta X8, it is possible to use the following commands within the shell when you have admin (root) access:
3099
3108
3100
3109
```
3101
3110
sudo modprobe i2c-dev
@@ -3114,7 +3123,7 @@ Following section configures a service named `my_i2c_service` to use the I2C dev
3114
3123
services:
3115
3124
my_i2c_service:
3116
3125
devices:
3117
-
- /dev/i2c-3
3126
+
- `/dev/i2c-3`
3118
3127
```
3119
3128
3120
3129
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:
@@ -3279,7 +3288,7 @@ Since the CAN bus pins are integrated within the High-Density connectors, they a
3279
3288
#### Using Linux
3280
3289
<br></br>
3281
3290
3282
-
For Portenta X8, the following instructions can help control CAN bus protocol. The CAN transceiver is enabled using the following command:
3291
+
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
@@ -3593,14 +3602,14 @@ Please, refer to the board pinout section of the user manual to find them on the
3593
3602
#### Using Linux
3594
3603
<br></br>
3595
3604
3596
-
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_.
3605
+
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_.
3597
3606
3598
3607
```
3599
-
ls /dev/ttyUSB* /dev/ttyACM*
3600
-
/dev/ttymxc1 // Something similar
3608
+
ls /dev/ttyUSB* /dev/ttyACM* /dev/ttymxc*
3609
+
/dev/ttymxc2 // Something similar
3601
3610
```
3602
3611
3603
-
The output _/dev/ttymxc1_ is an example of a potential serial device you might find on Portenta X8.
3612
+
The output _/dev/ttymxc2_ is an example of a potential serial device you might find on Portenta X8.
3604
3613
3605
3614
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.
3606
3615
@@ -3613,7 +3622,7 @@ def processData(data):
3613
3622
print("Received:", data) # For now, just print the data. Modify as needed.
3614
3623
3615
3624
# Set up the serial port
3616
-
ser = serial.Serial('/dev/ttymxc3', 9600) # Use the appropriate port and baud rate for your device
3625
+
ser = serial.Serial('/dev/ttymxc2', 9600) # Use the appropriate port and baud rate for your device
3617
3626
3618
3627
incoming =""
3619
3628
@@ -3636,7 +3645,7 @@ while True:
3636
3645
time.sleep(0.002) # Delay for data buffering, equivalent to Arduino's delay(2);
3637
3646
```
3638
3647
3639
-
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.
3648
+
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.
3640
3649
3641
3650
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