LIN Bridge application on S12ZVLA128

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LIN Bridge application on S12ZVLA128

427件の閲覧回数
bigtwisty
Contributor I

The S12ZVLA128 has 2 LIN buses.  I am using SCI0 to drive the LIN Hardware Layer pin as a slave and SCI1 driving a LIN transceiver for the master bus.  I have timer 0 chan 2 and SCI0 set up as software controlled interrupts in Processor Expert named correctly from what I found in the LIN driver code, and I had to perform VERY minor surgery to lin_isr.c to get it to play nicely with the ISR() formatting in Processor Expert.  I also told PE that SCI0 and SCI1 will be manually configured.

When I run as a slave only everything works exactly as expected.  As soon as I add a master bus and add the interrupt for SCI1 to PE it still compiles but the slave bus no longer recognizes incoming messages.  I've placed a break point directly in the ISR routine and it is no longer breaking there.

There are no demos running both master and slave buses on the same micro.  Has anyone run in to this?

Thanks in advance for any help.

0 件の賞賛
1 返信

341件の閲覧回数
bigtwisty
Contributor I

Answer:

As long as there is only a single slave bus set up in the NPF file, the NXP LIN stack automatically configures the PHY register.  As soon as I add a master bus to the other SCI port the stack stops configuring the PHY register for some odd reason.  It does not even enable the PHY at all.  You must manually set the LP0CR register values.

0 件の賞賛