cancel
Showing results for 
Search instead for 
Did you mean: 

Simulink code generation support for STM32F407G-Disc1 CAN Bus with LL driver

can_taac
Associate

I have an STM32F407G discovery development kit. We are embedding the software into this kit entirely using Embedded Coder through Simulink. We needed to use CANBUS to transfer the data we read from the board to the computer (via MATLAB). However, when CANBUS is activated through CubeMX, only the HAL library can be selected as a library, and the LL library cannot be selected. When generating code suitable for the board with MATLAB, code generation can only be done if the LL library is selected. We request your support in solving this issue. We would appreciate it if you could help.

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello @can_taac and welcome to the community.

Not sure what you are looking for. 


@can_taac wrote:

However, when CANBUS is activated through CubeMX, only the HAL library can be selected as a library, and the LL library cannot be selected.


To my knowledge there is no CAN LL driver:

Please refer to Drivers\STM32F4xx_HAL_Driver\Src path: there is no LL driver for CAN in the form of stm32f4xx_ll_can.c


@can_taac wrote:

 code generation can only be done if the LL library is selected. 


How? there is no CAN LL driver as stated previously!

For Simulink requests, better to submit your request in Mathworks forum on this link:

https://www.mathworks.com/hardware-support/stm32.html

or 

https://www.mathworks.com/matlabcentral/answers/index

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

View solution in original post

3 REPLIES 3
STTwo-32
ST Employee

Hello @can_taac and welcome to the ST Community.

For this implementation, I suggest you contact Matlab community that is the responsible of the Matlab implementation on the STM32 MCUs.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

SofLit
ST Employee

Hello @can_taac and welcome to the community.

Not sure what you are looking for. 


@can_taac wrote:

However, when CANBUS is activated through CubeMX, only the HAL library can be selected as a library, and the LL library cannot be selected.


To my knowledge there is no CAN LL driver:

Please refer to Drivers\STM32F4xx_HAL_Driver\Src path: there is no LL driver for CAN in the form of stm32f4xx_ll_can.c


@can_taac wrote:

 code generation can only be done if the LL library is selected. 


How? there is no CAN LL driver as stated previously!

For Simulink requests, better to submit your request in Mathworks forum on this link:

https://www.mathworks.com/hardware-support/stm32.html

or 

https://www.mathworks.com/matlabcentral/answers/index

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