2014-01-10 02:23 AM
2014-01-10 03:09 AM
I'm confused as to which CAN you think your transmitting on, and which your receiving. And where the 30 MHz came from.
2014-01-10 05:03 AM
2014-01-10 06:58 AM
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.2014-01-10 09:28 AM
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.2014-01-10 09:56 AM
What's your external loop back look like?
2014-01-12 11:56 AM
I am using two 3.3v CAN transceiver of Texas instruments.
2014-01-16 01:21 AM
My loopback circuit look like the represented one in the atteched photo.
________________ Attachments : CAN_Bus_transceiver_sch_for_test_.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I02U&d=%2Fa%2F0X0000000bT3%2FGiKrn60av1aBCX5YM48rY.wzNc453W2PnQY73IC.r_0&asPdf=falseCAN_Bus_transceiver_sch.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I04P&d=%2Fa%2F0X0000000bT2%2Fa2lvietYHAVMuSVvHNaB42dyYBUWpiYdYdGYriJBq6U&asPdf=false