The free CAN Software API (Application Programming Interface) for Windows®
-
amozes
- Posts: 2
- Joined: Thu 3. Sep 2020, 13:10
Post
by amozes » Thu 3. Sep 2020, 13:25
I am troubleshooting an issue where we are not receiving the receive signal even though data is available to be read from the channel.
I have a question about the combination of these two options that wasn't clear to me after reviewing the documentation.
The PCAN_RECEIVE_EVENT has this information:
Note that when you need to reinitialize a PCAN-Channel, you will need to set the event again each time after initializing the channel, since the event will have again its default value of 0 after initialization.
Would an autoreset of the bus cause the channel to be reinitialized (disabling the signalling behavior of the previously prepared receive event)?
-
K.Wagner
- Software Development

- Posts: 1080
- Joined: Wed 22. Sep 2010, 13:36
Post
by K.Wagner » Thu 3. Sep 2020, 16:33
Hello,
This is more a question about the PCAN-Basic Api. I will move this post to the corresponding place.
amozes wrote: ↑Thu 3. Sep 2020, 13:25
Would an autoreset of the bus cause the channel to be reinitialized (disabling the signalling behavior of the previously prepared receive event)?
No. When you configure the PCAN_BUSOFF_AUTORESET parameter, the hardware reset occurs when a bus off status is detected but the current configuration like filters and event are maintained. The information you have quoted is referring to the case when you re-initialize a channel (calling first CAN_Uninitialize, followed by CAN_Initialize). In this case, the configuration made to the channel is lost and you need to call CAN_SetValue to set the read event again.
Best regards,
Keneth
-
amozes
- Posts: 2
- Joined: Thu 3. Sep 2020, 13:10
Post
by amozes » Thu 3. Sep 2020, 16:44
Perfect. Thanks!