CAN总线通信

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

CAN总线通信

2,470 Views
935512732
Contributor I

我使用的是MPC5604B芯片,外接MCP2551CAN收发器,搭好硬件平台后,往单片机里烧写飞思卡尔的官方CAN例程后,没有信号发出来,是怎么回事?求解!

Labels (1)
0 Kudos
Reply
3 Replies

2,300 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

not sure what is your HW connections and FlexCAN init code. So try to check following...

- be sure FlexCAN and SIUL modules are clocked properly, check respective Mode Entry registers

- be sure pins are properly configured for FlexCAN functionality, check respective SIUL PCR registers and PSMI as well if needed.

- do not use open-drain config for TX line, if yes then external pull-up will be needed.

Regards,

Petr

0 Kudos
Reply

2,295 Views
935512732
Contributor I

The file include the simplified SCH of CAN-BUS module and the official routine of CAN-BUS module.And my problem is that Tx can not transmit any

signal,also the Rx can not receive any signal.Can you help me?Thank you!

0 Kudos
Reply

2,295 Views
PetrS
NXP TechSupport
NXP TechSupport

The code looks normal. What looks wrong is the connection you have.  There are swapped RX and TX pins between MCU and PHY. But maybe it is just mistake on the SCH.

If the connection is correct, means PB0/PC10 to TXD and PB1/PC3 to RXD then you can try this:

- set weak pull ups on RX pins

  SIU.PCR[35].R = 0x0103;

  SIU.PCR[17].R = 0x0103;

- look at ECR and ESR registers to know if there is any error

BR.

Petr

0 Kudos
Reply