Set Up Raspberry Pi CAN Shield on Your Host Computer
This example shows how to configure a Raspberry Pi® CAN shield on your host computer for a Customized Raspbian Linux® operating system using hardware setup screen. Set up Raspberry Pi CAN shield for MathWorks® Raspbian image, using the command line.
To configure the Raspberry Pi CAN Shield:
On the MATLAB® Home tab, in the Environment section, select Add-Ons>Manage Add-Ons. If you have not installed the MATLAB Support Package for Raspberry Pi Hardware, follow the steps described in Install Support Package.
In the Add-On Manager window, start the hardware setup process by clicking the Setup button .
In the Select a Hardware Board dialog box, choose a Hardware Board and click Next.
Select Customize the existing Raspbian OS running on my hardware and follow the instructions on each page of the Hardware Setup window, which allows you to select and deselect individual peripherals. Set up hardware with MathWorks Raspbian image option, which is available only through the command line.
In the Enter Login Credentials window that opens, enter the Device address, Device username, and Device password, and click Test Connection and finally click Next.
The Review Required Packages and Libraries window opens to display the available packages and libraries. Click Next to install.
In the Install ARM Compute Library window, you can select the option to set up the Raspberry Pi for Deep Learning deployment.
In the Configure Peripheral Modules window, set
enabled
on the CAN module drop-down. Select Skip CAN module configuration to configure CAN interfaces with the default configuration. If you select this option, MATLAB selects theCan 0
channel, the Oscillator frequency(MHz) is16
and the Interrupt Pin (GPIO) is25
.If you do not select the Skip CAN module configuration, a Configure Peripheral Modules (CAN module) window opens. You can vary the default value of Oscillator frequency(MHz) and the Interrupt Pin (GPIO) and CAN channel, to change the CAN configuration.
In the Reboot Raspberry Pi window, select Reboot Now and click Next to apply the changes.