Hello,
First of all, can you share with me what MATLAB version do you use and what version of the toolbox did you install?
In the Model Based Design Toolbox for S32K3, there are two example that might help you develop your application:
- s32k3xx_can_receive_s32ct: Shows how to receive CAN messages with interrupts. When a message is received, an onboard LED is toggled.
- s32k342_can_transmit_s32ct: Shows how to send CAN messages and increments a counter every time a message is successfully send.
The later example is configured for a S32K342 board, but you can take a look at the example to see the workflow. Further details about these examples can be found inside the help file (html files), located next to the model.
Regarding your screenshots:
- You don't need to use the CAN_MainFunction_Read and CAN_MainFunction_Write block if you want to use IRQ handlers. These two blocks are for polling receive/transmit.
An example implementation can look like below. If a CAN message with ID = 10 (decimal) is received, a CAN message with ID = 255 (decimal) is sent back to the CAN bus. Data is echoed.

- Another important aspect is that you need to make sure the Can Hw Filter Code and Can Hw Filter Mask are properly set for each CanHardwareObject. A message is received if the following rule is true (bitwise operations), otherwise the CAN message is discarded.
RECEIVED_ID & FILTER_MASK = FILTER_CODE & FILTER_MASK

Best regards,
Sorin Bancila