S32K1xx-SDK 3.0.2 RTM 4.0.3 linstack diagnostic service marked complete before full packet received

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

S32K1xx-SDK 3.0.2 RTM 4.0.3 linstack diagnostic service marked complete before full packet received

323 Views
cf_st
Contributor I

Hi all, 

 

I am developing a LIN bootloader on S32K118 using linstack. I am trying to pass a packet of 4090 bytes, i configured the linstack mex file but for having max messages length of 4095 bytes.

but during the reception of the messages it appears that the as the queue value gets to 190 (0xA9) the driver considers the reception as complete. I expect in this case a queue of 682 elements (0x2A9);The amount of the element in the queue can be roughly computed as (message_lenght-5)/6 rounded up to the higher value,  so the main issue may be due to the overflowing of some variable containing this information. 

 

cf_st_0-1718900348959.png

Within the stack, in lin_commontl_api.c in function ld_send_message() modifying the size of message_size variable (l_8u to l_16_u) and not recasting does the trick for tx messages, but i could not find equivalent for rx messages; I also checked lin_commontl_proto.c file and tl_receive_message() function (line 1440). but it appears that length related variable are all 16 bits; furthermore, the iteration count in consecutive frame while structure correspond to the expected 680 cycles (for message of 4090 bytes). 

Can you please point me out where in the stack may be coded this information? With the actual structure a 4kb buffer can not be used to transfer data using diagnostic services, the limitation may be reduced to about 1.5kb (queue value 0xFF).

 

Thanks in advance,  BR

 

0 Kudos
Reply
3 Replies

280 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @cf_st,

Please share the project so that we can reproduce it.

If you don't want to share it here, create a ticket.


Regards,

Daniel

0 Kudos
Reply

238 Views
cf_st
Contributor I

Hi Daniel, 

I am not able to provide you a lite version of the project here aand I never opened a ticket here,  for the moment we bypassed the problem by transferring smaller packets. 

To investigate the problem, it is sufficient to try to send via LIN a 4095 packet data from a K311 microcontroller Linstack v2.0.3 to a K118 microcontroller (S32K1xx-SDK 3.0.2 RTM 4.0.3), if this can be helpful. 

 

Best regards, 

 

0 Kudos
Reply

220 Views
danielmartynek
NXP TechSupport
NXP TechSupport

I'm not sure how to interpret this S32K1xx-SDK 3.0.2 RTM 4.0.3.

Is it 3.0.2 or 4.0.3?

Can you give me full names of both the SDK and the LIN Stack versions?

 

Thank you,

Daniel

0 Kudos
Reply