Reset Can
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
void resetCan();
Function
Resets the CAN controller. Can be used to reset the CAN controller after a BUSOFF or to activate configuration changes. Since execution of the function takes some time and the CAN controller is disconnected from the bus briefly, messages can be lost when this is performed.
Note With this function you can reset CAN1 and CAN2. If only one specific CAN channel is used, resetCan stops with an error and the CAN channels keep offline. In this case the ResetCanEx function has to be used. |
Parameters
—
Return Values
—
Reference example from the CANoe 12 help. Check the required configuration, database objects and API availability in your installed version; this is not a recorded compiler or runtime test.
on key 'r' { // Controller is reset after BUSOFF
resetCan();
}
Related APIs
setOcr | setBtr
Source detail restored from the authorized CANoe 12 help. Hardware support and API availability must be checked against the installed product version.