Reg: Can Bus Programming in MPC5607B Controller

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Reg: Can Bus Programming in MPC5607B Controller

跳至解决方案
2,270 次查看
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

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,797 次查看
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 项奖励
回复
1 回复
1,798 次查看
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 项奖励
回复