Skip to main content
Visitor II
May 14, 2026
Solved

CubeMX Configuration and Wiring for CAN Communication Using Simulink Models

  • May 14, 2026
  • 1 reply
  • 152 views

We are considering a system configuration in which a model created in Simulink is programmed onto an STM32 microcontroller, and CAN communication (both transmission and reception) is performed.

In this context, we would like to ask for your recommendations regarding:

  • STM32CubeMX configuration required for CAN communication
  • Key hardware wiring points and precautions when using CAN

We would appreciate it if you could share any recommended settings or best practices from STMicroelectronics.

In particular, we would be grateful for your advice on any points to consider regarding consistency between CubeMX configuration/initialization code and code generated using Simulink and Embedded Coder.

Best answer by Andrew Neil

@Hikaru wrote:

consistency between CubeMX configuration/initialization code and code generated using Simulink and Embedded Coder.


Not quite sure what you mean by this ?

The operation of Simulink is beyond the scope of this forum - it's nothing to do with ST - so you'd need to discuss that with MathWorks:

https://uk.mathworks.com/support/contact_us.html?s_tid=hc_resources

https://uk.mathworks.com/help/?s_tid=nav_help_doc

https://uk.mathworks.com/help/simulink/index.html?s_tid=hc_panel

https://uk.mathworks.com/matlabcentral/?s_tid=user_nav_community

1 reply

Andrew Neil
Andrew NeilBest answer
Super User
May 14, 2026

@Hikaru wrote:

consistency between CubeMX configuration/initialization code and code generated using Simulink and Embedded Coder.


Not quite sure what you mean by this ?

The operation of Simulink is beyond the scope of this forum - it's nothing to do with ST - so you'd need to discuss that with MathWorks:

https://uk.mathworks.com/support/contact_us.html?s_tid=hc_resources

https://uk.mathworks.com/help/?s_tid=nav_help_doc

https://uk.mathworks.com/help/simulink/index.html?s_tid=hc_panel

https://uk.mathworks.com/matlabcentral/?s_tid=user_nav_community

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Technical Moderator
May 14, 2026

Hello @Hikaru ,

I confirm @Andrew Neil 's saying.

We can help you with CAN issues using HAL but unfortunately not with Simulink.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.