We are developing the CAN bootloader under Windows and we need to transfer several Mb of data fast.
We use request-response protocol: Windows host sends CAN frame and ECU responds with ACK frame
I have found one related topic viewtopic.php?f=181&t=7664&p=19896&hilit=latency#p19896
I used slightly modified PCANBasicExample for test: two PCANBasicExample apps wait for received CAN frame and send own CAN frame when some foreign frame comes
The pseudocode of CANReadThreadFunc looks like
Code: Select all
if (m_ReceiveEvent.WaitOne(50))
{
do
{
result = PCANBasic.Read(m_PcanHandle, out CANMsg, out CANTimeStamp);
if (result == TPCANStatus.PCAN_ERROR_OK) WriteFrame(1);
if (result == TPCANStatus.PCAN_ERROR_ILLOPERATION) break;
} while (btnRelease.Enabled && (!Convert.ToBoolean(stsResult & TPCANStatus.PCAN_ERROR_QRCVEMPTY)));
}
What can be done to reduce interframe delay?
- Use Linux?
-Use PCI adapter?
Thank You in advance
Best regards, Fedor Solodovnik