Hardware using: PCAN-USB FD
So as i gone through CAN protocol if want send huge data we have use ISO TP (ISO 15765-2). PCAN-USB FD it supports this iso format.
I gone through the complete (ISO 15765-2) address formatting and can tp working.
Links removed! Please read the rules. no external links, please rules.php
I downloaded resources from peak website:
https://www.peak-system.com/PCAN-ISO-TP ... .html?&L=1
I gone through the all examples and i am able to build and run the 06_isotp_segmented_read_write successfully.
MCU configuration: CAN Reception ID =0xA1,CAN Transmission ID: 0xA2
i have few queries on mapping:
This ID is my MCU ID?
Code: Select all
mapping.can_id = 0xA1;
Code: Select all
mapping.can_id_flow_ctrl = 0xA2;
mapping.can_msgtype = PCANTP_CAN_MSGTYPE_STANDARD;
Code: Select all
mapping.can_tx_dlc = 0x0;
Code: Select all
mapping.netaddrinfo.extension_addr = 0x00;
mapping.netaddrinfo.format = PCANTP_ISOTP_FORMAT_NORMAL;
mapping.netaddrinfo.msgtype = PCANTP_ISOTP_MSGTYPE_DIAGNOSTIC;
Code: Select all
mapping.netaddrinfo.source_addr = 0xF1;
mapping.netaddrinfo.target_addr = 0x01;
Code: Select all
mapping.netaddrinfo.target_type = PCANTP_ISOTP_ADDRESSING_PHYSICAL;
Code: Select all
// Create the associated reversed mapping:
reverse_mapping = mapping;
reverse_mapping.can_id = mapping.can_id_flow_ctrl;
reverse_mapping.can_id_flow_ctrl = mapping.can_id;
reverse_mapping.netaddrinfo.source_addr = mapping.netaddrinfo.target_addr;
reverse_mapping.netaddrinfo.target_addr = mapping.netaddrinfo.source_addr;
to send huge data i configured as below
Code: Select all
mapping.can_id = 0xA1;
mapping.can_id_flow_ctrl = 0xA2;
mapping.can_msgtype = PCANTP_CAN_MSGTYPE_STANDARD;
mapping.can_tx_dlc = 0x0;
mapping.netaddrinfo.extension_addr = 0x00;
mapping.netaddrinfo.format = PCANTP_ISOTP_FORMAT_NORMAL;
mapping.netaddrinfo.msgtype = PCANTP_ISOTP_MSGTYPE_FLAG_INDICATION_TX;
Code: Select all
mapping.netaddrinfo.source_addr = 0xF1;
mapping.netaddrinfo.target_addr = 0x01;
Code: Select all
mapping.netaddrinfo.source_addr = 0x00;
mapping.netaddrinfo.target_addr = 0x00;
mapping.netaddrinfo.target_type = PCANTP_ISOTP_ADDRESSING_PHYSICAL;
// Create the associated reversed mapping:
reverse_mapping = mapping;
reverse_mapping.can_id = mapping.can_id_flow_ctrl;
reverse_mapping.can_id_flow_ctrl = mapping.can_id;
reverse_mapping.netaddrinfo.source_addr = mapping.netaddrinfo.target_addr;
reverse_mapping.netaddrinfo.target_addr = mapping.netaddrinfo.source_addr;
when i use above configuration(PCANTP_ISOTP_MSGTYPE_FLAG_INDICATION_TX) vs code does not sending any messages it self, why?
If want to send huge what are the modification required in 06 example?
Regards,
Sandeep C