Other Parts Discussed in Thread: IWR6843
Hello,
hello I use CANFD in iWR6843 and not sure how waht I can properly do after receive CANFD_Reason_PROTOCOL_ERR_ARB_PHASE in CANFDAppErrStatusCallback?
BR
Miroslav
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
hello I use CANFD in iWR6843 and not sure how waht I can properly do after receive CANFD_Reason_PROTOCOL_ERR_ARB_PHASE in CANFDAppErrStatusCallback?
BR
Miroslav
Miroslav,
I believe that this error should be automatically cleared by the CANFD driver, so you should be able to continue normally assuming it only occurs once. However, this error likely indicates an issue with either your bus setup or your CAN configuration, which would mean it's probably occurring consistently. If you are looking for advice on how to avoid this error altogether, you will need to provide more information on what your configuration is.
Let me know your thoughts.
Best Regards,
Alec
Hello Alec,
I need to solve situation, when I have two interconnected devices and one is disconnected (cable removed) and after some time connected back. Simmilar situation when both devices are configured for first time unconnected and then connected together.
Thank you for any hint!
M.
Miroslav,
I see, I think you may need to do a bit of manual setup in order to support this, as disconnecting the devices from the bus will cause the CAN controller to enter an error state. You should be able to track the error state and determine when the bus is disconnected/reconnected, but you may need to look directly at the MCAN device (the onboard CAN controller). If you reference the MCAN user's manual (located at https://www.bosch-semiconductors.com/ip-modules/can-ip-modules/m-can/), you can look at the error passive and error active states, and the correct process to recover from these states.
Let me know if you have any questions about these references.
Best Regards,
Alec
Hi Alex,
yes I can get reason why error occured in ErrStatusCallback but there is no any way to deal with it.
CANFD has only functions for CANFD_init / CANFD_deinit / CANFD_configBitTime / CANFD_createMsgObject / CANFD_createRxRangeMsgObject / CANFD_deleteMsgObject / CANFD_transmitData / CANFD_transmitDataCancel / CANFD_getData /CANFD_getOptions / CANFD_setOptions.
So only what I can do is call CANFD_deinit and then CANFD_init and check CANFD_init state.
But when I use CANFD_deinit after ErrStatusCallback is called it fails (retval < 0).
Is there any way to renew/recheck CAN state? Or working example how to properly deinit can after err callback?
Hi,
What is the retval that you receive from CANFD_deinit? Taking a quick look, it appears that you could only get an error from deinit if you pass in a null pointer, but I can look further into it if I know what retval you received.
Best Regards,
Alec