s12xdp512 CAN modules's init problem.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

s12xdp512 CAN modules's init problem.

2,000 次查看
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
标签 (1)
0 项奖励
5 回复数

463 次查看
microdynamics
Contributor II
Did you check the STB-pin of the TJA1040-chips?
0 项奖励

463 次查看
jaky0
Contributor I
Hi, i v change a new chip (1040), but the problem is the same.
0 项奖励

463 次查看
jaky0
Contributor I
now i v the same problem, may i ask how v u solved it, thanks.
0 项奖励

463 次查看
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 项奖励

463 次查看
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 项奖励