Skip to content

Commit ae841c0

Browse files
committed
User manual content update
1 parent 0812af5 commit ae841c0

File tree

1 file changed

+32
-23
lines changed
  • content/hardware/04.pro/carriers/portenta-hat-carrier/tutorials/user-manual

1 file changed

+32
-23
lines changed

content/hardware/04.pro/carriers/portenta-hat-carrier/tutorials/user-manual/content.md

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,16 @@ To configure the Ethernet settings, depending on the paired Portenta board, one
18061806
#### Ethernet Interface With Linux
18071807
<br></br>
18081808

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).
18101819

18111820
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).
18121821

@@ -2330,7 +2339,7 @@ Next conditions will help you properly set the hardware to test GPIO controls:
23302339

23312340
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).
23322341

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:
23342343

23352344
```bash
23362345
adb shell
@@ -2573,29 +2582,29 @@ The pins used for the JTAG debug port on the Portenta Hat Carrier are the follow
25732582

25742583
## Understanding Device Tree Blobs (DTB) Overlays
25752584

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.
25772586

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.
25792588

25802589
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.
25812590

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.
25832592

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:
25852594

25862595
```
25872596
/boot/devicetree/overlays.txt
25882597
```
25892598

25902599
After making the desired changes, it is necessary to save and reboot the system to apply desired changes.
25912600

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:
25932602

25942603
```
25952604
fw_setenv overlays=name_ov1 name_ov2
25962605
```
25972606

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.
25992608

26002609
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.
26012610

@@ -2612,7 +2621,7 @@ fw_printenv is_on_carrier
26122621
is_on_carrier=yes
26132622
```
26142623

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`.
26162625

26172626
```bash
26182627
fw_setenv carrier_custom 1
@@ -2627,9 +2636,9 @@ fw_setenv is_on_carrier yes
26272636
fw_setenv overlays "ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_rasptenta_base ov_carrier_rasptenta_pwm_fan ov_carrier_rasptenta_ov5647_camera_mipi ov_rasptenta_iqaudio_codec"
26282637
```
26292638

2630-
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.
26312640

2632-
Hardware configuration is divided into following layers:
2641+
Hardware configuration is divided into the following layers:
26332642

26342643
- __Layer 0__: System on Module (SoM), prefixed with `ov_som_`.
26352644
- __Layer 1__: Carrier boards, prefixed with `ov_carrier_`.
@@ -2640,7 +2649,7 @@ EEPROMs, which store identification IDs, are typically defined on _Layer 1_ and
26402649
Some overlays, such as:
26412650

26422651
- `ov_som_lbee5kl1dx`: Adds Wi-Fi®
2643-
- `ov_som_x8h7`: Adds the Portenta H7 external microcontroller
2652+
- `ov_som_x8h7`: Adds the Portenta H7
26442653
- `ov_carrier_rasptenta_base`: Base support for Portenta Hat Carrier
26452654

26462655
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
29672976
#### Using Linux
29682977
<br></br>
29692978

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:
29712980

29722981
```
29732982
sudo modprobe spidev
@@ -2984,7 +2993,7 @@ sudo systemctl reboot
29842993
services:
29852994
my_spi_service:
29862995
devices:
2987-
- /dev/spi-1
2996+
- '/dev/spidev0.0'
29882997
```
29892998
Following section configures a service named `my_spi_service` to use the SPI device available at `/dev/spi-1`.
29902999

@@ -3095,7 +3104,7 @@ Please, refer to the [pinout section](#pinout) of the user manual to find them o
30953104
#### Using Linux
30963105
<br></br>
30973106

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:
30993108

31003109
```
31013110
sudo modprobe i2c-dev
@@ -3114,7 +3123,7 @@ Following section configures a service named `my_i2c_service` to use the I2C dev
31143123
services:
31153124
my_i2c_service:
31163125
devices:
3117-
- /dev/i2c-3
3126+
- `/dev/i2c-3`
31183127
```
31193128

31203129
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
32793288
#### Using Linux
32803289
<br></br>
32813290

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
32833292

32843293
```
32853294
echo 164 > /sys/class/gpio/export && echo out > /sys/class/gpio/gpio164/direction && echo 0 > /sys/class/gpio/gpio164/value
@@ -3593,14 +3602,14 @@ Please, refer to the board pinout section of the user manual to find them on the
35933602
#### Using Linux
35943603
<br></br>
35953604

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_.
35973606

35983607
```
3599-
ls /dev/ttyUSB* /dev/ttyACM*
3600-
/dev/ttymxc1 // Something similar
3608+
ls /dev/ttyUSB* /dev/ttyACM* /dev/ttymxc*
3609+
/dev/ttymxc2 // Something similar
36013610
```
36023611

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.
36043613

36053614
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.
36063615

@@ -3613,7 +3622,7 @@ def processData(data):
36133622
print("Received:", data) # For now, just print the data. Modify as needed.
36143623

36153624
# 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
36173626

36183627
incoming = ""
36193628

@@ -3636,7 +3645,7 @@ while True:
36363645
time.sleep(0.002) # Delay for data buffering, equivalent to Arduino's delay(2);
36373646
```
36383647

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.
36403649

36413650
The `time.sleep(0.002)` line adds a slight delay, ensuring data has enough time to buffer, similar to using `delay(2);` in Arduino.
36423651

0 commit comments

Comments
 (0)