Issue when connect between two flexcan modules??

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue when connect between two flexcan modules??

1,825 Views
feather
Contributor I
Hi all,
I repot a flexcan driver from MCF5213 to MCF5223x board, and I tested the loop-back mode, it works well. But when I connect the MCF5213 board with the 5223x board, errors happen. It seems the frame transmited isn't correctly received(I'm sure hardware is OK).because 5213 use 80MHZ fsys, so the clock to flexcan is 80/(2*(1+15))=2.5MHZ, so I changed the MCF_FlexCAN_CANCTRL[31-24]=0x17, which means 60/(1+0x17)=2.5MHZ too, and the other bits the same, so they get the same baudrate(?),but errors is the same.
I have no anther 5223x board to test with two same boards. so any ideas?
Labels (1)
0 Kudos
3 Replies

353 Views
feather
Contributor I
Now it is OK
I forgot to change the pin configuration when repot the driver from 5213 to 5223x

thanks
0 Kudos

353 Views
feather
Contributor I
Hi    mjbcswitzerland
The 2.5MHZ means the clock, the baud rate equal 2.5MHZ / times , in my option, the times equal 25, so the baud rate is 100kbs
which baud rate do you select? and I'm puzzled with how to modify the RJW,PSEG1,PSEG2,PROPSEG bits of CANCTRL, I simply changed them to the max value, any idea?
and I found the offset of IMASK and IFLAG should be 0x30 and 0x32,which are different from datasheet?

thanks
0 Kudos

353 Views
mjbcswitzerland
Specialist V
Hi

I have successfully used the M5223X and the M5213 eval boards connected together by a CAN bus.
Are you using a 2.5M bit rate? The maximum bit rate of CAN is 1M. I would try with slow speeds at first to be sure that this is not the problem.

Regards

Mark Butcher

www.uTasker.com

0 Kudos