Main Content

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:

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

  2. In the Add-On Manager window, start the hardware setup process by clicking the Setup button .

  3. In the Select a Hardware Board dialog box, choose a Hardware Board and click Next.

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

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

  6. The Review Required Packages and Libraries window opens to display the available packages and libraries. Click Next to install.

  7. In the Install ARM Compute Library window, you can select the option to set up the Raspberry Pi for Deep Learning deployment.

  8. 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 the Can 0 channel, the Oscillator frequency(MHz) is 16 and the Interrupt Pin (GPIO) is 25.

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

  10. In the Reboot Raspberry Pi window, select Reboot Now and click Next to apply the changes.

See Also

|