I met a question, when S32K118 ECU enter busoff interrupt , I want to clear mesage buffer in flexcan.
I tried some function , such as FLEXCAN_DRV_AbortTransfer and FLEXCAN_ClearRAM. Such action will cause reset, and busoff cannot go on. If I don't clear the buffer. After bus off recover, flexcan will send unintended frame which influence judgement of busoff recovery time.
So could you provide a useful interface function which can clear message buffer.
Thank you very much!
I have already repplied to you another of your same topic.
you can use FLEXCAN_DRV_Deinit,then -> FLEXCAN_DRV_Init,the bus off count is incremented by one,and the time base for fast and slow recovery is adjusted according to the bus off count.