cancel
Showing results for 
Search instead for 
Did you mean: 

CAN 2 problems using examples from Keil.STM32F2xx_DFP.2.5.0.pack

daha0902
Associate II
Posted on January 25, 2016 at 16:30

Hi!

I use the example CANdata from Keil.STM32F1xx_DFP.2.5.0 pack and can not get CAN channel 2 to transmit any messages. The example uses external loopback.

I dont need to show or use the LCD due to I have a CAN logger that can receive the messages sent on CAN.

Channel 1 works but no messages are sending to channel 2.

&sharpdefine  CAN_CONTROLLER         1       // CAN

Is is possible to just change two 2 above to try channel 2 or do I have to change anything else?

My setup is

CAN ch 1 to Saleae logger ch 2

CAN ch 2 to saleae logger ch 2

I use ground even if I dont have to as I understand.

I have the STM32F107VCT6 microcontroller and board MCBSTM32C (http://www.keil.com/boards2/keil/mcbstm32c/) using Keil.

I Attached original example.

#can #canbus #stm32f1
3 REPLIES 3
Amel NASRI
ST Employee
Posted on January 25, 2016 at 17:27

Hi Friendship,

With STM32F107 device, you should be using the STM32F1 software pack (Keil.STM32F1xx_DFP.2.0.0.pack).

If you still have an issue, I suggest you submit your problem in Keil's forum.

I recommend you also to have a look to CAN examples available in our firmware packages.

-Mayla-

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.

daha0902
Associate II
Posted on January 25, 2016 at 18:53

Hi Mayla!

Thank you for the reply. Of course I use the F1XX library. However I also looked into F2XX lib pack to see if there was any changes in the example. So I have used the correct F1XX pack.

When you say firmware packages do you mean the CD that was included in the package?

Thank you in advance

Posted on January 25, 2016 at 19:21

No, ST has SPL and HAL/Cube firmware libraries that you can download from this site. ST and Keil provide their own code, being unrelated companies. In uV4 Keil provided third-party libraries, but was usually lagging the release schedule.

The F1 uses an older CAN IP design, you are best to start off with code/examples tailored to what you are using. The may be many commonalities, but it's the differences that will bite you.

CAN2 is a slave device on STM32 implementation, it uses a lot of the CAN1 peripheral resources they have in common, and CAN1 must be up and functional.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..