CAN-Communication using Raspberry Pi and Simulink

조회 수: 12 (최근 30일)
Henrik Waschke
Henrik Waschke 2021년 5월 24일
댓글: Henrik Waschke 2021년 8월 19일
im trying to send a CAN-Message from a raspi 4 to an other raspi 4. The receiving raspi have to send the data from the can message to an arduino via SPI.For this im using two mcp2515 can-controller Boards and a level converter for the arduino. SPI communication between the arduino and the raspi is working very well. The only thing i don't get is how i can implementate the can communication in Simulink.
I made two pictures of my implementation.
Very thankful for every answer!
  댓글 수: 2
Marius C
Marius C 2021년 8월 18일
Hi Henrik,
does the CAN-communiation between two raspi 4 work for you?
If yes, which CAN-controller boards are you using?
I'm looking forward hearing from you!
Henrik Waschke
Henrik Waschke 2021년 8월 19일
Hey Marius,
yes it works, but i only can send 1 Databyte. Im Using the can mcp2515 Joy-it module.

댓글을 달려면 로그인하십시오.

채택된 답변

Reeno Joseph
Reeno Joseph 2021년 6월 17일
Hi Henrik,
The CAN blocks in Raspberry Pi supportpackage communicate with MCP2515 via SPI interface. So you cannot use SPI blocks and CAN blocks together.
If you need the CAN data at Arduino, please use the MKRCAN shield support that we have.

추가 답변 (0개)


Help CenterFile Exchange에서 Simulink Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by