FlexCAN example for DEVKIT MPC5744P using CAN0

cancel
Showing results for 
Search instead for 
Did you mean: 

FlexCAN example for DEVKIT MPC5744P using CAN0

582 Views
vernonhawes
Contributor I

I'm trying to send and receive CAN signals periodically using the DEVKIT MPC5744P on the CAN0 port. The FlexCAN example program included with the S32 Design Studio for this DEVKIT sends signals on CAN2 with loopback. I've tried to modify the same code to send and receive on CAN0 since this port has the transceiver signals with CANH, CANL and Gnd output pins with which I can monitor the CAN communication. I'm trying to monitor the CAN bus using a Vector CANcase HW and Vector CANoe software. But all I see is error frames even though I've connected a termination resistance of 120 ohm across the CANH and CANL. 

I'm not sure what is wrong with my code. 

Could someone please share example code for the above scenario?

Also are there any hardware/jumper pin settings that need to be taken care on the DEVKIT?

0 Kudos
9 Replies

227 Views
arthur_grondine
Contributor I

Ah Ha!   Any jumpers I need to set for external power?  Can I still debug with the USB interface to PC?

0 Kudos

222 Views
arthur_grondine
Contributor I

I added the 12V power supply  still no CAN0 activity.

0 Kudos

352 Views
mikedoidge
NXP Employee
NXP Employee

Hello vernonhawes@gmail.com‌,

There are 3 possible examples that you could be working from. 2 are from the SDK, and one is without SDK. 

pastedImage_1.png

Which example are you using as your reference?

Would you mind providing your project from the workspace so we could examine it?

If you are using the SDK, then perhaps there are some settings in the SDK which you need to change, but missed.

There's no jumpers which directly affect the CAN. You can check for yourself.  https://www.nxp.com/downloads/en/schematics/SCH-29333.pdf 

Best Regards,

Mike

0 Kudos

243 Views
arthur_grondine
Contributor I

Hello - this question was never answered and I have the same problem.

How to use CAN0 - don't want loop back ok.  Just want CAN0.

This should be easy - but it isn't.  There has to be something simple - not sure why there isn't a demo for this as it seems the pins for CAN0 are designed for easy using.

 

Thanks,

 

={> Art

Tags (1)
0 Kudos

237 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

For CAN bus functionality you need to connect external 12V power supply to your board, are you using it or your board is powered from USB? 

 

Jiri 

0 Kudos

214 Views
arthur_grondine
Contributor I

I made some progress - the directions are incomplete.  I found the 4 jumpers and was able to debug with the usb little connection while using the 12V source for the analog.  But this debugger isn't well behaved - can't reliably single step - jumps around, not good. 

So I tried to use the USBMultilinkFx - on the JTAG port.  But how to power up the digital section (CPU).  I tried various jumper configurations ... no luck.

This is so frustrating ..... please provide clear directions on how to actually use this board to debug in real time CAN bus application.

Thanks,

={> Art 

0 Kudos

208 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

here are details related to power settings: 

chrome_2021-03-30_13-12-43.png

What about optimizations? If optimizations are enabled, the debug may behave in strange way. 

 

Jiri

 

0 Kudos

201 Views
arthur_grondine
Contributor I

Turning of optimizations helped.  Still no CAN0 working yet.  The sample project doesn't work either:

arthur_grondine_0-1617116086606.png

 

0 Kudos

204 Views
arthur_grondine
Contributor I

Hi - This doesn't explain how to use the JTAG port.  It covers using the built in port only.

 

0 Kudos