Preparation before use

You can refer to AI HAT+ - Raspberry Pi Documentation https://www.raspberrypi.com/documentation/accessories/ai-hat-plus.html#ai-hat-plus

In this section, learn how to set up a Raspberry Pi 5 with the AI HAT+.

Required Content

Hardware:

We used a Raspberry Pi 5 model with the official active cooler and a 27W USB-C power supply. We recommend using the official USB-C power supply or one that supports the Raspberry Pi 5 Power Delivery protocol to ensure the motherboard can provide sufficient power to the AI HAT+.

image-20240809160415806

Install the spacer using the four screws provided. Firmly press the GPIO 40pin header onto the bottom of the Raspberry Pi GPIO pins; confirm that all pins are seated in place. Disconnect the cable from the AI HAT+ and insert the other end into the PCIe port of the Raspberry Pi. Lift the cable brackets from both sides and insert the cable with the copper contacts facing inward, toward the USB port. Once the cable is fully and evenly inserted into the PCIe port, lower the cable brackets from both sides to secure the cable in place.

The installation is as shown below:

For CSI camera connection, please refer to the Raspberry Pi 5 camera case.

Software:

Note: The SD card of the Raspberry Pi 5 needs to contain a bootable image. Please refer to the image burning in the Raspberry Pi 5 tutorial we provided

The interface that appears after successful startup

image-20240809163326019

UPDATE SYSTEM

Note: (The following steps are only required for DIY in your own environment. If you directly use the image we provide, you do not need to rebuild it)

image-20240809163547389

This will update your system to the latest Raspberry Pi core, which includes AI HAT+ driver support.

Next, make sure your Raspberry Pi firmware is up to date. Run the following command to see what firmware you are running:

If you see a date of December 6, 2023 or later, proceed to the next step. If you see a date earlier than December 6, 2023, run the following command to open the Raspberry Pi Configuration CLI:

Under Advanced Options > Bootloader Version, select Latest. Then exit raspi-config using Finish or the Esc key.

Run the following command to update the firmware to the latest version:

Then, reboot

Set PCIe to Gen3

To achieve optimal performance of the AI HAT+ device, it is necessary to set PCIe to Gen3. While using Gen2 is an option, it will result in reduced performance.

Open the Raspberry Pi Configuration Tool:

image-20240809163710629

image-20240809163742441

image-20240809163800234

image-20240809163844925

Select option 6 Advanced options and then option A8 PCIe speed. Select Yes to enable PCIe Gen 3 mode. Click Finish to exit.

Install hailo software

Install all necessary software to make the Raspberry Pi AI HAT+ work properly. To do this, run the following command from a terminal window:

The following picture shows that the installation has been successful

image-20240809164204638

This will install the following software components:

Reboot your Raspberry Pi.

Test the TAPPAS Core installation by running the following command:

Hailotools:

Expected results:

image-20240809164623921

Hailonet:

Expected results:

image-20240809164750292

If found or not, try deleting the GStreamer registry: hailo hailotools

 

Known Issues

The following issues should be handled by the TAPPAS Core installation deb, but if you encounter them, you can fix them manually.

PCIe Page Size Issues

Some hosts do not support certain PCIe descriptor page sizes. If you receive an error like:

Make sure that exists and contains the following line: /etc/modprobe.d/hailo_pci.conf

Check the configuration:

Unable to allocate memory in static TLS block

In some cases (especially aarch64), you may encounter the following error, causing some GStreamer plugins to not load correctly. The error message is:

This should be fixed by adding the following to your file:.bashrc

If you have already encountered this error, you can fix it by running the following command: