AnsweredAssumed Answered

CAN connection problem

Question asked by Elvar Liiv on Nov 21, 2017

Hi.

 

I am trying to establish CAN connection between STM32F767NUCLEO144 and STM32F4DISCOVERY boards. So far I have maneged to establish connection between 2 STM32F4 boards and between 2 STM32F7 boards(I can transmit data without problems) , but then I connect F4 and F7 to same CAN bus, the connection won't work. To illustrate, what exactly happanes, I made a test. I connected 2 F4-s, started data transmission and everything worked fine. Then I added F7 to same CAN bus and data transmission stopped. It seems like 3 CAN messages are sent between F4-s, before the crash appears -  I think this has something to do with TxMsg or RxMsg mailboxes( there are 3 of them). 

 

I use latest FW for F7 and F4 and following settings for clocks and CAN1:

F7: Clock: HCLK at 200MHz, APB cloks: 21,42,42,84 Mhz

CAN1: Prescalar:10, BS1:8 BS2:1, SJW:1

F4: Clock: HCLK at 168Mhz, APB  cloks: 25,50, 50, 100Mhz

CAN1: Prescalar:3. BS1:11, BS2:2, SJW:1

With these settings, one bit transmission time is 2000ns(500kbit/s).

 

Any suggestions how to make it work beween F4 and F7 ?

And one more question, I know APB clock is used for CAN, but I couldn't find in datasheet, which APB clock exactly is used.I would be happy, if anybody can confirm, if its the APB1 pc clock or not.

 

Thank you!

Outcomes