CAN Read
Add-On Required: This feature requires the Embedded Coder Support Package for STMicroelectronics STM32 Processors add-on.
Libraries:
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32F2xx Based Boards
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32F3xx Based Boards
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32F4xx Based Boards
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32F7xx Based Boards
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32L4xx Based Boards
Simulink Coder Support Package for STMicroelectronics Nucleo Boards /
STM32H7
Description
The CAN Read block reads messages from a Controller Area Network (CAN) network connected to the hardware.
The CAN Read block outputs a CAN data when operation mode is set to
Data
. The block outputs values received as [8x1]
array
of type uint8
when output type is set to
Unpacked
.
The block outputs Simulink® bus signal when output type is set to Packed
. To extract data
from Simulink bus signal, connect it to CAN Unpack block. The CAN Unpack block
is available from the Vehicle Network Toolbox™.
Select the Operation mode and its properties using the block parameters dialog box. Configure the properties of CAN module in the Model Configuration Parameters for STM32 Processor Based Boards.
Examples
Ports
Output
Parameters
Extended Capabilities
Version History
Introduced in R2023a