AnsweredAssumed Answered

Memory leak when i call FLEXCAN_DRV_Init to initialize the can controller

Question asked by 何纯 陈 on Mar 28, 2018
Latest reply on Apr 3, 2018 by 何纯 陈

Hi, When i use the can driver, i found that if there's no protect in the creation of semaphore.

When the CAN bus enter busoff state, i use FLEXCAN_DRV_Init to initialize the can controller. But when FLEXCAN_DRV_Init is called, it will call OSIF_SemaCreate((semaphore_t *const)&state->mbs[i].mbSema, 0U)  to create the semaphore, no matter the semaphore is created or not.

So what should i do in this case?