Timeout ? +problem with getting RX frames
-
- Posts: 9
- Joined: Mon 20. Mar 2017, 11:11
Timeout ? +problem with getting RX frames
Hello everyone,
is there a way to detect a timeout when waiting for reception of a frame: I send a CAN frame ( some sort of command) and I am waiting for a response, and if I dont get a response, the program will go on forever)
Another thing, Sometimes the Peak CAN doesnt detect message but still able to send, even in PCAN Viewer, I always have to reconnect it to usb so it will detect incoming CAN frames again, i d like an explanation for that too please.
I am using the PCAN USB Pro .
Thanks.
is there a way to detect a timeout when waiting for reception of a frame: I send a CAN frame ( some sort of command) and I am waiting for a response, and if I dont get a response, the program will go on forever)
Another thing, Sometimes the Peak CAN doesnt detect message but still able to send, even in PCAN Viewer, I always have to reconnect it to usb so it will detect incoming CAN frames again, i d like an explanation for that too please.
I am using the PCAN USB Pro .
Thanks.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Timeout ? +problem with getting RX frames
No, this must be implemented in your code - simpl set the Filter up in front to read only the Msgs you are waiting for, and setup a Receive Event /Thread based receiving - see Help File and sample code.s there a way to detect a timeout when waiting for reception of a frame: I send a CAN frame ( some sort of command) and I am waiting for a response, and if I dont get a response, the program will go on forever)
Looks like you didi not check the MsgType of the incomming CAN Data - you will see that you have errors on your BUS - check cable, termination etc.Another thing, Sometimes the Peak CAN doesnt detect message but still able to send, even in PCAN Viewer, I always have to reconnect it to usb so it will detect incoming CAN frames again, i d like an explanation for that too please.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 9
- Joined: Mon 20. Mar 2017, 11:11
Re: Timeout ? +problem with getting RX frames
No it is all good, i have the CAN bus linking the microcontroller and the PCAN Pro
Even in PCAN viewer, it looks like that i dont receive anything and theres no Bus off or buss passive ... errors
This problem happens once in a while, not everytime but it's really bothering me and making it harder to detect it in my GUI
Thank you for the reply anyways !
Even in PCAN viewer, it looks like that i dont receive anything and theres no Bus off or buss passive ... errors
This problem happens once in a while, not everytime but it's really bothering me and making it harder to detect it in my GUI
Thank you for the reply anyways !

- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Timeout ? +problem with getting RX frames
TIP: Run your application and call CAN_Init(..) red LED is flahsing .. run PCAN-View and connect to the same HW (ignore warning) - now PCAN-View use the same Hardware as your Application and see all Messages that your Application see, you also could send from the PCAN-View data to your Application. Do not close PCAN-View when you finish your Application - if you restart your Application again, it will reconnect to the hardware without stop PCAN-View First.
This is a nice tool to debug your Application. You also could use the Tracer inside PCAN-View, set Logging features to "Error only" start logging - than you will only see massages in the trace windows when you have error frames on the bus.
This is a nice tool to debug your Application. You also could use the Tracer inside PCAN-View, set Logging features to "Error only" start logging - than you will only see massages in the trace windows when you have error frames on the bus.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 9
- Joined: Mon 20. Mar 2017, 11:11
Re: Timeout ? +problem with getting RX frames
thank you for the reply, yes that's what I am doing actually, I open my application and PCANviewer to see all messages using the trace, but the problem is that the microcontroller sometimes sends a CAN frame but it won't be detected by neither of the two programs ( PCAN viewer and my program)
I guess it could be a bug in the driver
I guess it could be a bug in the driver
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Timeout ? +problem with getting RX frames
check it with a scope if you realy send out a "complete" CAN Frame.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Timeout ? +problem with getting RX frames
I have this problem. This tool from Tesla connects via Pcan to the car interface via CAN_H,CAH_L. They recommend this PCAN-USB peak device. And I have these time out errors that repeat.
****link removed by admin**** see forum rules!
****link removed by admin**** see forum rules!
Re: Timeout ? +problem with getting RX frames
MarianP wrote: ↑Tue 8. Apr 2025, 13:33I have this problem. This tool from Tesla connects via Pcan to the car interface via CAN_H,CAH_L. They recommend this PCAN-USB peak device. And I have these time out errors that repeat.
Usage ID Attempt #1:Operation has timed out
Reading Sub Usage Id
Sub Usage Id Attempt #1:Operation has timed out
It tells me it is connected to the MCU but it does not read the values in the tool.The RX errors are shown above
Re: Timeout ? +problem with getting RX frames
Hi,
please contact the developer of that tool. We don't know this tool and can't tell you the reason for this problems.
regards
Michael
please contact the developer of that tool. We don't know this tool and can't tell you the reason for this problems.
regards
Michael