cancel
Showing results for 
Search instead for 
Did you mean: 

G474 How to enable FDCAN error callback?

wang_mo_mo
Associate II

G474 How to enable FDCAN error callback?

1 REPLY 1
Semer CHERNI
ST Employee

Hello @wang_mo_mo 

First let me thank you for posting.

To activate the error callback you activate the FDCAN interrupt and it will generate a call to the interrupt service routine which will process all the interrupt sources including the errors.

SemerCHERNI_0-1706016605163.png

Then you overwrite the callback function with the wanted behavior:

__weak void HAL_FDCAN_ErrorStatusCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t ErrorStatusITs)

KR,
Semer.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.