cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Bus communication between CAN1 and CAN2 discoveryf4

hadjrami
Associate II
Posted on January 10, 2014 at 11:23

The original post was too long to process during our migration. Please click on the attachment to read the original post.
7 REPLIES 7
Posted on January 10, 2014 at 12:09

I'm confused as to which CAN you think your transmitting on, and which your receiving. And where the 30 MHz came from.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hadjrami
Associate II
Posted on January 10, 2014 at 14:03

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6ni&d=%2Fa%2F0X0000000bvk%2Fo7ZVlxWZH7HU8K5LfbDGQQPU5gimPpyYJL.DQjfbm0M&asPdf=false
Posted on January 10, 2014 at 15:58

  CAN_FilterInitStructure.CAN_FilterNumber = 14;  // 0..13 for CAN1, 14..27 for CAN2

Receiving on CAN1, So not 14 then?

The DSP examples generally assume EVAL series boards, with 25 MHz HSE crystals. You'd need to adapt system_stm32f4xx.c and HSE_VALUE to reflect an 8 MHz HSE.

Never the less I find it HIGHLY IMPROBABLE that the CAN clock is 30 MHz, you're looking at the example, rather than the reference manual. Assume the premise expressed by the example is wrong. Use a scope, confirm what baud rate you have actually generated.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hadjrami
Associate II
Posted on January 10, 2014 at 18:28

The issue that I couldn't find any application note or reference manual for the CAN application and for the HSE_VALUE tried the same  value as used  in the STM32F4-Discovery_FW_V1.1.0 and it doesn't change the result even when disabling filters or changing the filter number to 0. But the trasmission function return each time a different value (the first time 0x00 which refer to CAN transmission failed the second time 0x01: CAN transmission succeeded  then 0x02 : CAN transmission pending to finally end in the CAN cell did not provide an empty mailbox and it doesn't change any more). 

I think that the baud rate can't be the problem; the to controller are initialized using the same structure. 

Posted on January 10, 2014 at 18:56

What's your external loop back look like?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hadjrami
Associate II
Posted on January 12, 2014 at 20:56

I am using two 3.3v CAN transceiver of Texas instruments.

hadjrami
Associate II