DEVKIT-COMM CAN Example

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

DEVKIT-COMM CAN Example

Jump to solution
1,518 Views
joãopaulo
Contributor III

Hello,

I'm using DEVKIT-MPC5748G and DEVKIT-COMM.

To do the software I'm using Processor Expert.

I've already done a routine using CAN0 that doesn't uses the DEVKIT_COMM and worked well, now I need to use CAN1 so I need to use the DEVKIT_COMM, I did exactly the same I did for CAN0 but it's not working.

It's returning FLEXCAN_EVENT_ERROR.

Is there any example or idea of whats is wrong?

Thanks,

Regards 

João Paulo

Labels (1)
1 Solution
1,193 Views
joãopaulo
Contributor III

Hi,

I don't know why the images are invisible..

But after I saw them... everything seemed to be fine, them I checked if the RXCAN_A pin of devkit-comm was really connected to the correspondente pin of devkit-mpc5748g, and it wasn't.

It's strange because VDD and P5V0 pins were connected.. then I removed the shield and reconnected it, and everyting is working now...

Thanks very much,

Best Regards

João

View solution in original post

0 Kudos
8 Replies
1,193 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

which MCU pins you configured for CAN1 TX/RX? Are those really connected to DEVKIT-COMM transceiver?

Check schematics or user guides of both boards. Also be sure you do not tied low transceiver's /STB pins, per schematics connected to PD8-PD12.

BR, Petr

0 Kudos
1,193 Views
joãopaulo
Contributor III

Hello, 

I've configured STB pin PD12 and checked the voltage on TP15 of DEVKIT-COMM, it's 3,23V seems normal... but there are no messages on CAN bus. 

It still returns FLEXCAN_EVENT_ERROR.

0 Kudos
1,193 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

do you have a scope to measure CAN TX/RX lines (PC10/PC11)?

Also if FLEXCAN_EVENT_ERROR is given in error callback, read the ESR1 register using FLEXCAN_DRV_GetErrorStatus function.

BR, Petr

0 Kudos
1,193 Views
joãopaulo
Contributor III

Hi,

I have Saleae Logic Analyzer and PCAN-USB from Peak System...

The FLEXCAN_DRV_GetErrorStatus function returns 0x4036.

0 Kudos
1,193 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so can you measure PC10/PC11 with Saleae? ESR1 value shows bit error and bus off condition.

If you see some signal on RX line, the bit timing could be wrong. If nothing is there, most probably the transceiver is disabled.

BR, Petr

1,194 Views
joãopaulo
Contributor III

Hi,

I don't know why the images are invisible..

But after I saw them... everything seemed to be fine, them I checked if the RXCAN_A pin of devkit-comm was really connected to the correspondente pin of devkit-mpc5748g, and it wasn't.

It's strange because VDD and P5V0 pins were connected.. then I removed the shield and reconnected it, and everyting is working now...

Thanks very much,

Best Regards

João

0 Kudos
1,193 Views
joãopaulo
Contributor III

Hello,

Here are some views of saleae:

Using CAN0 (P5 conector of devkit-mpc5748g):

Zoom in of the view above:

Using CAN1 (J4 conector of devkit-comm):

Zoom in of the view above:

Note: The CAN bus only have two nodes, the GPS and the DEVKIT.

When I use CAN0 every thing works fine but when I change to CAN1 the bus behaves as there are only one node (the GPS), and then keep sending the same message forever (there are no ACK, just NAK).

Measurements on DEVKIT-COMM:

P5V0: 4,8V;

VDD: 3,28V;

TP15: 3,27V;

TP16: 3,25V.

Using CAN1/RXCAN_A (J19-pin8 - conector of devkit-comm):

Zoom in of the view above:

0 Kudos
1,193 Views
joãopaulo
Contributor III

Hello,

I configured PC10 and PC11. Yes, they are connected to the transceiver according to schematics.

I didn't configured the STB pins... I'll do it and check if it works!

Thanks,

Regards

João Paulo

0 Kudos