Balluff - BVS CA-BN Technical Documentation
Capturing Images with Raspberry Pi Not Working

Symptoms

A BVS CA-BN camera attached to a Raspberry Pi (e.g. Raspberry Pi 5) is found correctly and its properties accessed e.g. using ImpactControlCenter. However, trying to capture images fails. Acquisition must be aborted and the application may also crash.

Cause

The standard 64-bit ARM kernel used by the PiOS distribution for Raspberry Pi boards uses 16kB pages for memory operations. At the moment the BVS CA-BN device driver released in Impact Acquire before version 3.5.1 only supports kernels with 4kB pages. Support for 16kB pages or greater has been added in Impact Acquire version 3.5.1.

Note
The image buffers used for the BVS CA-BN PCIe camera must be page-aligned. This means that using an operating system with 16kB pages will place this restriction on any user-supplied image buffers too, which may in turn affect user applications. If an application uses image buffers supplied internally by Impact Acquire then these will automatically be aligned correctly for the system being used.

Resolution

To avoid this situation there are two solutions:

  • Update Impact Acquire to at least version 3.5.1. You may then use either the 4kB page or 16kB page kernel.
  • Or use the alternative 4kB page kernel supplied by the distribution.

To use the 4kB page kernel please edit the file "/boot/firmware/config.txt" as 'root' (e.g. by using 'sudo') and add an extra line to the file like this:

kernel=kernel8.img

After changing this file please reboot the Raspberry Pi to use the new kernel. You will then need to rebuild and install the kernel module as described below.

Note
To rebuild the kernel module at any time e.g. after changing the kernel, please use the following commands and then reboot the Raspberry Pi:
cd /opt/ImpactAcquire/kernelmodules/linux/PCIe/ make sudo make install