Page 1 of 1

PCAN_BUSOFF_AUTORESET together with PCAN_RECEIVE_EVENT

Posted: Thu 3. Sep 2020, 13:25
by amozes
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)?

Re: PCAN_BUSOFF_AUTORESET together with PCAN_RECEIVE_EVENT

Posted: Thu 3. Sep 2020, 16:33
by K.Wagner
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.

Re: PCAN_BUSOFF_AUTORESET together with PCAN_RECEIVE_EVENT

Posted: Thu 3. Sep 2020, 16:44
by amozes
Perfect. Thanks!