AnsweredAssumed Answered

MPC5634M FlexCAN not working

Question asked by senthil coramutalu padmanabhan on Feb 4, 2015

I am working on MPC5634M and I have connected the freescale CAN port to Microchip CAN Bus analyser to test CAN frames.

I have written a code to transmit the following CAN frame continuously on Channel A of FlexCAN module.

(ID = 0x555, length=5, bytes = “Hello”)

So I have adapted the code from freescale supplied with the board (only main.c is changed), but it is not working. (Please refer the attached FlexCAN.zip file for the code)

I have checked the TX Pin of MPC5634M IC using CRO scope, but I don’t detect any CAN frames at all. (Please refer FlexCAN schematic.jpeg for more info)

FlexCAN schematic.JPG.jpg

My analysis:

In the code, I have chosen oscillator as the base clock for the FlexCAN module. But I feel the clock is not running for the FlexCAN module.

When I debug my code, I see all the registers are loaded with proper values. But after filling the transmit buffer and I set the CODE to Transmit (0x0C) the FlexCAN module does not change back the CODE to 0x08. The code is infinitely executing the while loop (Please refer the highlighted line in FlexCAN Debug.jpeg for more info)

 

FlexCAN Debug.JPG.jpg

Please check the issue and let me know if I have made some mistake.

with regards,

senthil

Original Attachment has been moved to: FlexCAN.zip

Outcomes