CAN message Buffer Overflow problem

I have been experiencing a couple problems with the CAN utilities on DrivePX2.
I would like to hear if other people have experienced the same issues and what solutions/work-arounds they came up with.
I have been using the Tegra CAN (e.g. CAN_5 for Tegra A) and DriveWorks version 0.3 in these tests.

  1. Adding CAN message receive processes
    I created a simple test function to send a cyclic CAN message (every 10ms), but I am getting a buffer overflow error after a lengh of time testing (shortest being 5 seconds, longest being 10 minutes).
    As the same phenomenon occurs even when just running dwSensor_start (without running anything else), I was able to solve the buffer overflow issue by running a CAN message receive process before attempting a CAN message send process (this was based on how the sample code is laid out).
    Is it fair to assume that we have to execute a message receive process in order to keep the buffer clear even when we are only transmitting and not receiving?

  2. Desynchronization in CAN message reception.
    I created a process to send a CAN message based on a received CAN message, with the transmission set to a fixed interval, with the thread sleeping between sends (to produce a cyclic CAN message).
    However I ran into the same buffer overflow problem as above.
    Even with the buffer being cleared regularly each time the thread is woken, it seems that the buffer overflow is being caused by the length of the interval.
    If I ove the message receive process into a different thread and run asynchronously, then the occurances of buffer overflow errors are reduced.

What have been other people’s experiences using CAN under Drive PX2?
What are the recommended ways to deal with cyclic CAN messages to avoid buffer overflows?

Dear hyt131,

Could you please refer to below links for your topic? Thanks.

https://devtalk.nvidia.com/default/topic/1031778/faq/drive-px2-time-sync-guide/
https://devtalk.nvidia.com/default/topic/1032296/faq/drivepx2-easycan-setup-guide/

I solved this problem on my own.
When I upgraded DriveWorks to the latest version, the buffer overflow error stopped occurring, even without the special code I had used before.

Thanks.