Reg: Can Bus Programming in MPC5607B Controller

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

Reg: Can Bus Programming in MPC5607B Controller

Jump to solution
1,383 Views
teslagalactica
Contributor I

Hello,

 

I am evaluating the mpc5607B controller. I am trying to execute

the Flexcan example given in the cookbook-AN2865. I altered the

pin configuration according to my controller and tried to execute

the same example program. But unfortunately there isn't any

transmission. There is no assertion of interrupt flag on the

receiver. since I am a beginner in using CAN I couldn't able to

figure out what the problem is.

 

I have attached my documented code and the pictures of

jumper configuration on my board.

 

Could you please kindly help me figure out what the problem is.

 

I have also attached the images of can bus, could you please

kindly make sure whether it is the right kind of bus I am using.

Original Attachment has been moved to: main.c.zip

Original Attachment has been moved to: can-images.rar.zip

Labels (1)
Tags (2)
0 Kudos
1 Solution
910 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The CAN(L) transceiver does not have pull-up on TX line. So if your configuration set open drain for TX pin it will not work, unless you will add external pull or enable internal weak. So either select the push-pull mode for the CAN1 TX line

SIU.PCR[42].R = 0x0604;

or

enable week pull-up for open drain config

SIU.PCR[42].R = 0x0627;

Then it should work, assume your external connection (CAN bus) is correct. However I assume it will be working for low baud rates only as there are different transceivers on the EVB.

Also you may use the scenario as it is outlined in AN2865; the CAN modules will be connected externally in an open drain circuit, before the transceiver (no connection done on DB1/DB2 connectors). See chapter 25.1 of the AN2865.

As you can read in the AN, in addition to connecting both Rx pins together and both Tx pins together, at least one FlexCAN needs to be connected to the transceiver. This allows

(1) the CAN bus to sync by allowing the Rx to see an idle bus and

(2) the receiving FlexCAN to transmit an acknowledge from its Tx pin, through the transceiver, which routes it to the transmitting FlexCAN’s Rx pin.

Thus one possible suggestion for EVB connection is

* for CAN(H)
*  J29 all off
*  J27 1-3-5 together      
*  J27 2-4-6 together

Also you may use this kind of EVB connection:

*  J29 all off
*  J27 1-3 together          
*  J27 2-4 together

*  PJ1 3-4 together

*  PJ1 5-6 together

BR,

Petr

View solution in original post

0 Kudos
1 Reply
911 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The CAN(L) transceiver does not have pull-up on TX line. So if your configuration set open drain for TX pin it will not work, unless you will add external pull or enable internal weak. So either select the push-pull mode for the CAN1 TX line

SIU.PCR[42].R = 0x0604;

or

enable week pull-up for open drain config

SIU.PCR[42].R = 0x0627;

Then it should work, assume your external connection (CAN bus) is correct. However I assume it will be working for low baud rates only as there are different transceivers on the EVB.

Also you may use the scenario as it is outlined in AN2865; the CAN modules will be connected externally in an open drain circuit, before the transceiver (no connection done on DB1/DB2 connectors). See chapter 25.1 of the AN2865.

As you can read in the AN, in addition to connecting both Rx pins together and both Tx pins together, at least one FlexCAN needs to be connected to the transceiver. This allows

(1) the CAN bus to sync by allowing the Rx to see an idle bus and

(2) the receiving FlexCAN to transmit an acknowledge from its Tx pin, through the transceiver, which routes it to the transmitting FlexCAN’s Rx pin.

Thus one possible suggestion for EVB connection is

* for CAN(H)
*  J29 all off
*  J27 1-3-5 together      
*  J27 2-4-6 together

Also you may use this kind of EVB connection:

*  J29 all off
*  J27 1-3 together          
*  J27 2-4 together

*  PJ1 3-4 together

*  PJ1 5-6 together

BR,

Petr

0 Kudos