Problem in sending array data using ld_send_message() function.

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

Problem in sending array data using ld_send_message() function.

跳至解决方案
1,245 次查看
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 项奖励
回复
1 解答
1,162 次查看
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 项奖励
回复
4 回复数
1,195 次查看
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 项奖励
回复
1,194 次查看
pankajprasad100
Contributor III

Hi,

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

 

Best Regards,

Pankaj

0 项奖励
回复
1,180 次查看
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 项奖励
回复
1,163 次查看
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 项奖励
回复