Skip to main content
abdou si
Associate III
April 18, 2017
Question

CAN for STM32F3 in Simulink (STM32-MAT/TARGET)

  • April 18, 2017
  • 3 replies
  • 3574 views
Posted on April 18, 2017 at 23:52

Hello 

i am traing to use CAN (controller area network) of STM32F3 in Simulink with package STM32-MAT/TARGET 

i started to add ico file in config 

0690X00000603lYQAQ.jpg

whene i start adding the CAN i get this 

0690X00000603eJQAQ.jpg

please any help 

#stm32-mat/target-matlab #stm32f3 #can
This topic has been closed for replies.

3 replies

Technical Moderator
April 19, 2017
Posted on April 19, 2017 at 14:32

Hi,

May be CAN is not configured in used ioc file, or Simulink model has not been configured to be used with STM See attached 'STM32_MAT-TARGET_HandsOn.pdf' file Page.20

Please check these solutions, then if these do not solve your issue, please send ioc file.

Thanks

Imen

________________

Attachments :

STM32_MAT-TARGET_HandsOn_v1_0.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyiI&d=%2Fa%2F0X0000000bBQ%2FmysgLHfgbKK4EDrp2yumNCK_oymsY2pDKCPqN9t_MVg&asPdf=false
"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
abdou si
abdou siAuthor
Associate III
April 19, 2017
Posted on April 19, 2017 at 14:48

Hi

i know where is the problem, the problem in the configuration of ioc file i dont know how i can configurate the CAN of STM32F303K8

my ico file

________________

Attachments :

pi.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hyd9&d=%2Fa%2F0X0000000bBO%2FrgSjyiotKKHhEfg8RxM.u7WaNUie_ZM.XTGYEriyIJo&asPdf=false
Technical Moderator
April 24, 2017
Posted on April 24, 2017 at 10:19

Hi abdou si,

When you open block, you drag & drop CAN block : default selected CAN is CAN1.

But name is CAN. 

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
tianchen.fan
Visitor II
August 16, 2017
Posted on August 16, 2017 at 09:01

I spent many time to test the CAN mode ,but it still have some error,please give a example of  stm32f107 for can1,

thank you very much!

abdou si
abdou siAuthor
Associate III
August 16, 2017
Posted on August 16, 2017 at 14:24

hello 

what kind of error 

can you share your code 

you can find an example in C:\Users\yourcomputer\STM32Cube\Repository

tianchen.fan
Visitor II
August 16, 2017
Posted on August 16, 2017 at 16:55

1.I had created the demo board for can1 ofstm32f107 ,it can run in simulink by any error and genrate code.but it compiled by keil ARM 5.20 ,it prompt the error,

system :win7 64bit and matlab 2016

I had already replace the cansend.tlc and canfilter.tlc in STM_MAT.

1.../../slxfile/../iocfile/CANtest1/Inc/CANtest1_CAN.h(35): error: #5: cannot open source input file ''CANtest1_STMh'': No such file or directory

how to deal with it ,thank you very much!0690X00000607vXQAQ.png

________________

Attachments :

CANtest1.slx.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyUu&d=%2Fa%2F0X0000000b8k%2FxYFQ3Xwh.z50gwiMsiWnNZMbj3P8UgU_eOc4TqMH.k8&asPdf=false

cantest.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyUp&d=%2Fa%2F0X0000000b8h%2FSqaWiFaYBISLWM59m9IqOFctUdRJkhnE4ajWzCOhAWA&asPdf=false
abdou si
abdou siAuthor
Associate III
August 16, 2017
Posted on August 16, 2017 at 17:16

sorry i didn't understand exactly the problem  

please i wanna see screenshot for :

the project in simulinkand the error and the configuration 

tianchen.fan
Visitor II
August 17, 2017
Posted on August 17, 2017 at 05:44

I had refresh the question,thank you very much!