CAN_pal mpc5775B problem

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

CAN_pal mpc5775B problem

614 Views
SakuMertaniemi
Contributor I

Hi, i have created a new CAN project from example MPC5777. Changed the processor settings to MPC5775B, and pinout is correct.

Problem is i dont have any sign of life in the canbus pheripheral. First of all i have modified the program code in a way that CAN_Send is placed inside a while(1) loop, to debug the problem more easily and it succesfully reaches there.

While debugging, the program seems to get stuck in the CAN_Send function. It does not reach into breakpoint set into CAN_Send again after once inside the function.

I have oscilloscope, i have probed the canbus, all the pints in the58&60 jumpers (which decide whetever the 1145 can chip is connected to FLEXCAN_RXA/MCAN0_X or FLEXCAN_RXB). Theres no sign of life anywhere. I have tried to send data from PC over canbus to the MPC5775B, but it does NOT get an acknowledge bit. 

I tried the same library with S32K144 EVB, and it works perfectly, acknowledge bit is send even if the main program debugging is stopped.

0 Kudos
Reply
2 Replies

608 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

which board do you use, MPC5775B-EVB?
Seems the TJA1145 is not initialized. 

Following text is copied from application hints:https://www.nxp.com/docs/en/supporting-information/AH1309_v1_1_Application_Hints_TJA1145.pdf

“The CAN block is in Active Mode if
 The TJA1145 is in Normal Mode (MC = 111) AND
 The CAN transceiver has been enabled (CMC = 01 or 10) AND
 The voltage on pin VCC is above the 90% threshold (Provided that BAT<V th(uvd)CAN  and there is no over temperature condition) 
In CAN Active Mode the CAN transceiver is enabled and thus, data can be transmitted and received.”

So did you init transceiver via SPI and set respective registers as mentioned above?

BR, Petr

598 Views
SakuMertaniemi
Contributor I

It is definetly a TJA1145 initialization problem, i noticed that by testing NXP BMS software, and if i upload my own sketch after that, the canbus will work. 

Its only after the powerdown of the device when it doesnt work anymore, indicating that the registers in the tja1145 chip are reset, indeed.

Ill look into setting the registers with SPI, and update back later, thanks priorhand

0 Kudos
Reply