Problem in sending array data using ld_send_message() function.

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

Problem in sending array data using ld_send_message() function.

Jump to solution
1,621 Views
pankajprasad100
Contributor III

Hi @namnguyenviet ,

I am working on LIN based bootloader, in which I need to send large data which is store in an array.

When I send the data which is divided into 0x82 size of block then the first block is sent on the bus but remaining blocks are getting corrupted.

While debugging I checked the data which was send by us which is perfectly fine, but while getting the data on the LIN bus the data is modified expect the first block.

From the below images we can see that block sequence number is increasing and data which is in the array are perfectly placed.

image (4).png

image (4).png

image (5).png

image (6).png

From the LIN bus images we can see after the transmitting of block-0 the next block sequence number became -0x6d,0xe0,0x53 instead of 0x01,0x02,0x03

image (4).png

image (5).png

image (6).png

  

image (7).png

 

 Any suggestion how to solve the issue would be highly appreciated.

Compiler-IAR

MCU-s32k116

LIN analyzer-PLIN

0 Kudos
Reply
1 Solution
1,538 Views
pankajprasad100
Contributor III

Hi,

I solved the issue, due to ECU going into sleep condition it stops at the 7th block.

 

Regards,

Pankaj prasad

View solution in original post

0 Kudos
Reply
4 Replies
1,571 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

Which software are you using? Is that the LIN-stack or any NXP SW product, or the SW that you have written by your own?

Best Regards,

Nam

0 Kudos
Reply
1,570 Views
pankajprasad100
Contributor III

Hi,

I am using the LIN-stack, in which  ld_send_message() is used.

 

Best Regards,

Pankaj

0 Kudos
Reply
1,556 Views
pankajprasad100
Contributor III

hi,

While debugging I got to know that inside of  ld_send_message(),has IF condition which checks the message status. If the status is not completed then the buffer gets corrupted.

pankajprasad100_0-1648617405221.png

So I written a condition for that, using the ld_tx_status() as show in the below image

pankajprasad100_1-1648617571884.png

After the implementation, Now the data is coming as expected, but up to block number-7 

below are the images of the data on the bus.

 

pankajprasad100_2-1648619925150.png

pankajprasad100_3-1648619977227.png

pankajprasad100_4-1648620007127.png

 

After the 7th block, no data is transmitting on the bus.

 

 

Compiler-IAR

MCU-S32K116

LIN analyzer-Canoe

 

 

Regards,

Pankaj prasad

 

0 Kudos
Reply
1,539 Views
pankajprasad100
Contributor III

Hi,

I solved the issue, due to ECU going into sleep condition it stops at the 7th block.

 

Regards,

Pankaj prasad

0 Kudos
Reply