s12xdp512 CAN modules's init problem.

cancel
Showing results for 
Search instead for 
Did you mean: 

s12xdp512 CAN modules's init problem.

1,727 Views
jennyroma
Contributor I
Anyone can help me ?
All the five CAN modules of my S12XDP512, only the CAN4 and CAN2 can be inited correctly.(I didn't set the LOOPB bit).
When I set the LOOPB bit,all of the five CANs can inited correctly.
The CAN4 is connected to MC33388,and can transmit and receive messages.
Both the another four CAN modules connected with TJA1040.but none of them can work .even the CAN2 module(it can inited correctly). when I use a probe to test the signals of CAN2TX and CAN2RX pins,I found nothing.but by chance i short the CAN2TX and CAN2RX,I get the bus signals,and the buadrate was just what I desired.

I do emphasize that point that all the four modules are accordant in principle and hardware circiut.
why the CAN2 can inited but the another three can not?
why the CAN2 can inited normally but can not transmitmessages?
I get no ideas and really puzzled.

Thanks
Labels (1)
0 Kudos
5 Replies

190 Views
microdynamics
Contributor II
Did you check the STB-pin of the TJA1040-chips?
0 Kudos

190 Views
jaky0
Contributor I
Hi, i v change a new chip (1040), but the problem is the same.
0 Kudos

190 Views
jaky0
Contributor I
now i v the same problem, may i ask how v u solved it, thanks.
0 Kudos

190 Views
colinh
Contributor I
Hi

This is complete guesswork (because I haven't checked the datasheet) but I would check that the module routing control bits are correctly set (Recently I had trouble getting the 2nd SPI working on a S12A128 until I realised that the IO pins could be routed to different peripherals.) This might explain why the loopback worked, but I'm not sure what you were saying occured when you shorted the Rx/Tx pins

Hope this helps
Colin
0 Kudos

190 Views
Lundin
Senior Contributor IV
Just guessing here, but it sounds like a HW problem with the tranceiver(s). Also double-check the MODRR register to make sure that CAN0 and CAN4 are mapped as desired.
0 Kudos