CAN ISO TP FLOW CONTROL FRAME, SOURCE DESTINATION ADDRESS? How to send more than 4096 bytes?
Posted: Mon 8. Apr 2024, 10:05
Hi,
My application is to send a binary file from PC to MCU, so that iam CAN ISO tp protocol.
For To understand well PCAN-ISO TP apis, in example 006 we have heavy data around 8936bytes.so my aim is transmit the data by 4096 bytes at once as standard can tp protocol says.
1) now by using 006 example i compiled successfully.
i am trying to send 300 bytes first with a FC frame as follows.
PC TO MCU
res = CANTP_MsgDataInit_2016(&tx_msg, mapping.can_id, mapping.can_msgtype, 300, HEAVY_DATA, &mapping.netaddrinfo);
MCU TO PC
FC ==>0x03 0x2A 0x14
i sent FC frame successfully but From Vs code its not sending 42 frames every time and some time it sends and some times even it ended up with just send 17 bytes too.
How can i solve the above issue, is it due to loopback or any other timing parameters mismatch?
How can i know the status of whether fc frame received in VS Code or not?
Since iam using for PC to MCU communication and vice versa, is it mandatory to use Source and destination address? but how can i include while sending MCU to PC as FC frame or any other response?
is source and address is it only for Vs code port (USB1 or USB2) to understand the direction or else should i include in my firmware code?
Regards
Sandeep
My application is to send a binary file from PC to MCU, so that iam CAN ISO tp protocol.
For To understand well PCAN-ISO TP apis, in example 006 we have heavy data around 8936bytes.so my aim is transmit the data by 4096 bytes at once as standard can tp protocol says.
1) now by using 006 example i compiled successfully.
i am trying to send 300 bytes first with a FC frame as follows.
PC TO MCU
res = CANTP_MsgDataInit_2016(&tx_msg, mapping.can_id, mapping.can_msgtype, 300, HEAVY_DATA, &mapping.netaddrinfo);
MCU TO PC
FC ==>0x03 0x2A 0x14
i sent FC frame successfully but From Vs code its not sending 42 frames every time and some time it sends and some times even it ended up with just send 17 bytes too.
How can i solve the above issue, is it due to loopback or any other timing parameters mismatch?
How can i know the status of whether fc frame received in VS Code or not?
Since iam using for PC to MCU communication and vice versa, is it mandatory to use Source and destination address? but how can i include while sending MCU to PC as FC frame or any other response?
is source and address is it only for Vs code port (USB1 or USB2) to understand the direction or else should i include in my firmware code?
Regards
Sandeep