cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to receive CAN interrupt on STM32F0 when send data from STM32f4 to STM32f0 hardware.

schou
Associate II

Greetings to all,

I want to send and receive the data via CAN between STM32F4 and STM32f0. But when I send the data from STM32F4 to STM32F0 I cannot get the interrupt at F0 end. I have tried to communicate between F0 and F0 that works fine I can receive the interrupt and send the data. Also when communicating between F4 and F4 that also works. But when communicating between F4 and F0 I cannnot get the receive interrupt at F0 end. Below are the configurations of F0.

schou_0-1719207081227.pngschou_1-1719207127138.png

I am unable to understand why do I cannot get the interrupt.

 

 

12 REPLIES 12

Have set PA11 (CAN_RX) in No pull-up/pull-down.

I have a question both the "Time Quantum" are different, for F0 and F4 will it cause any problem ?

 

The values will be different if your APB1 clock are different between the two. What baud rate are you trying to achieve? Did you use a calculator? http://www.bittiming.can-wiki.info/

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

@schou wrote:

Have set PA11 (CAN_RX) in No pull-up/pull-down.

I have a question both the "Time Quantum" are different, for F0 and F4 will it cause any problem ?

 


No. The time quantum could be different. The most important thing is the bitrate that needs to be the same and minimize the time quantum as much as possible for the same bitrate value (to increase the bit time sampling resolution).

In your config I don't see an issue. You need need to share your schematics and a sketch of your CAN bus config: You need to do that otherwise, we cannot help you efficiently.

Another question: are you sure about your Filter config? do the frames sent by F4 correspond well to the filter config on F0? As F4-F4 is working, do you have the same filter config on F0 as the F4 receiver?

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.