set MPC5748G LINFlexD0 in Identifier mask mode

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

set MPC5748G LINFlexD0 in Identifier mask mode

442件の閲覧回数
haiyang
Contributor III

board:DEVKIT-MPC5748G

IDE:S32DS PA 2.1

 

now ,i use the MPC5748G LIN0 interface ,i need to receive all message in the bus ;

so i nned set it to Identifier mask mode ,if there has some demo code?

the "MPC5748G-LINFlex-LIN-Master-Slave-test-GHS616" code is in Identifier list mode , not fit me

can you help me? 

 

0 件の賞賛
返信
5 返答(返信)

435件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you should be able to modify a code for your need. Check chapter 45.4.2.6 Identifier filtering of the device RM and change IFER, IFMR, and IFCRn accordingly.

BR, Petr

0 件の賞賛
返信

410件の閲覧回数
haiyang
Contributor III

HI,

i use Lin0 in slave mode and i set filter as follow:

LINFlexD_0->IFER = 0x03;//
LINFlexD_0->IFMR = 0x01;//
 
 
LINFlexD_0->IFCR[0] = 0x15;//
LINFlexD_0->IFCR[0] |= 0x07<<LINFlexD_IFCR_DFL_SHIFT;
if (g_Lin0Cfg.checksumMode==CLASSIC_MODE)
{
  LINFlexD_0->IFCR[0] |= LINFlexD_IFCR_CCS(1); 
}
 
the Lin0 can receive all id , but it only can receive the message which lenth = 7 ;
i want receive all lenth message , how to config?
 
0 件の賞賛
返信

397件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is proper behavior. It is described in the RM
Screenshot 2024-05-23 134557.png

if there is match with filter then DFL, CCS, DIR is given by value set in IFCR. 
In case of no filter match and BF is set then you get RXI interrupt upon header reception and you can specify BIDR.

BR, Petr

0 件の賞賛
返信

394件の閲覧回数
haiyang
Contributor III

thank  reply

but ,when get into RXI ,i still  don't know how many bytes data will come in,may be 1 byte ,maybe 2 ,maybe 6...

so when into RXI ,what should write to BIDR?

0 件の賞賛
返信

392件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

on LIN systems this must be know in advance, during system specification, thus the ID specify payload, direction, CCS.
You cannot receive unknown payload using LINflexD.

BR, Petr

0 件の賞賛
返信